Commit 60818478 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Jonathan Cameron

iio: magnetometer: ak8975: Get rid of platform data

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: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 79ef9149
...@@ -28,8 +28,6 @@ ...@@ -28,8 +28,6 @@
#include <linux/iio/trigger_consumer.h> #include <linux/iio/trigger_consumer.h>
#include <linux/iio/triggered_buffer.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 * Register definitions, as well as various shifts and masks to get at the
* individual fields of the registers. * individual fields of the registers.
...@@ -857,8 +855,6 @@ static int ak8975_probe(struct i2c_client *client, ...@@ -857,8 +855,6 @@ static int ak8975_probe(struct i2c_client *client,
int err; int err;
const char *name = NULL; const char *name = NULL;
enum asahi_compass_chipset chipset = AK_MAX_TYPE; 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. * Grab and set up the supplied GPIO.
...@@ -883,13 +879,9 @@ static int ak8975_probe(struct i2c_client *client, ...@@ -883,13 +879,9 @@ static int ak8975_probe(struct i2c_client *client,
data->eoc_gpiod = eoc_gpiod; data->eoc_gpiod = eoc_gpiod;
data->eoc_irq = 0; data->eoc_irq = 0;
if (!pdata) { err = iio_read_mount_matrix(&client->dev, "mount-matrix", &data->orientation);
err = iio_read_mount_matrix(&client->dev, "mount-matrix", if (err)
&data->orientation); return err;
if (err)
return err;
} else
data->orientation = pdata->orientation;
/* id will be NULL when enumerated via ACPI */ /* id will be NULL when enumerated via ACPI */
if (id) { if (id) {
......
/* 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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment