Linux-IIO Archive on lore.kernel.org
 help / color / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: linux-iio@vger.kernel.org, Hartmut Knaack <knaack.h@gmx.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Subject: Re: [PATCH v1 1/2] iio: magnetometer: ak8975: Get rid of platform data
Date: Sat, 18 Jan 2020 11:38:23 +0000
Message-ID: <20200118113823.5b68bdd1@archlinux> (raw)
In-Reply-To: <20200115174425.70728-1-andriy.shevchenko@linux.intel.com>

On Wed, 15 Jan 2020 19:44:24 +0200
Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:

> Since IIO framework supports device property API and driver has been moved
> already to the use of GPIO descriptors the logical continuation is to
> get rid of platform data completely. We are on the safe side here since
> there are no users of it in the kernel.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Hmm. Fair enough I guess.

Applied to the togreg branch of iio.git and pushed out as testing

Thanks,

Jonathan

> ---
>  drivers/iio/magnetometer/ak8975.c       | 14 +++-----------
>  include/linux/iio/magnetometer/ak8975.h | 15 ---------------
>  2 files changed, 3 insertions(+), 26 deletions(-)
>  delete mode 100644 include/linux/iio/magnetometer/ak8975.h
> 
> diff --git a/drivers/iio/magnetometer/ak8975.c b/drivers/iio/magnetometer/ak8975.c
> index 55cffaa82456..8e50e073bcbf 100644
> --- a/drivers/iio/magnetometer/ak8975.c
> +++ b/drivers/iio/magnetometer/ak8975.c
> @@ -28,8 +28,6 @@
>  #include <linux/iio/trigger_consumer.h>
>  #include <linux/iio/triggered_buffer.h>
>  
> -#include <linux/iio/magnetometer/ak8975.h>
> -
>  /*
>   * Register definitions, as well as various shifts and masks to get at the
>   * individual fields of the registers.
> @@ -857,8 +855,6 @@ static int ak8975_probe(struct i2c_client *client,
>  	int err;
>  	const char *name = NULL;
>  	enum asahi_compass_chipset chipset = AK_MAX_TYPE;
> -	const struct ak8975_platform_data *pdata =
> -		dev_get_platdata(&client->dev);
>  
>  	/*
>  	 * Grab and set up the supplied GPIO.
> @@ -883,13 +879,9 @@ static int ak8975_probe(struct i2c_client *client,
>  	data->eoc_gpiod = eoc_gpiod;
>  	data->eoc_irq = 0;
>  
> -	if (!pdata) {
> -		err = iio_read_mount_matrix(&client->dev, "mount-matrix",
> -					    &data->orientation);
> -		if (err)
> -			return err;
> -	} else
> -		data->orientation = pdata->orientation;
> +	err = iio_read_mount_matrix(&client->dev, "mount-matrix", &data->orientation);
> +	if (err)
> +		return err;
>  
>  	/* id will be NULL when enumerated via ACPI */
>  	if (id) {
> diff --git a/include/linux/iio/magnetometer/ak8975.h b/include/linux/iio/magnetometer/ak8975.h
> deleted file mode 100644
> index df3697183800..000000000000
> --- a/include/linux/iio/magnetometer/ak8975.h
> +++ /dev/null
> @@ -1,15 +0,0 @@
> -/* SPDX-License-Identifier: GPL-2.0 */
> -#ifndef __IIO_MAGNETOMETER_AK8975_H__
> -#define __IIO_MAGNETOMETER_AK8975_H__
> -
> -#include <linux/iio/iio.h>
> -
> -/**
> - * struct ak8975_platform_data - AK8975 magnetometer driver platform data
> - * @orientation: mounting matrix relative to main hardware
> - */
> -struct ak8975_platform_data {
> -	struct iio_mount_matrix orientation;
> -};
> -
> -#endif


      parent reply index

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-15 17:44 Andy Shevchenko
2020-01-15 17:44 ` [PATCH v1 2/2] iio: magnetometer: ak8975: Convert to use device_get_match_data() Andy Shevchenko
2020-01-18 11:41   ` Jonathan Cameron
2020-01-18 11:38 ` Jonathan Cameron [this message]

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200118113823.5b68bdd1@archlinux \
    --to=jic23@kernel.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=pmeerw@pmeerw.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-IIO Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-iio/0 linux-iio/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-iio linux-iio/ https://lore.kernel.org/linux-iio \
		linux-iio@vger.kernel.org
	public-inbox-index linux-iio

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-iio


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git