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

iio: gyro: st_gyro: Move platform data from header to C file

Platform data is solely used by one file. Don't share it with others.

While at it, drop unneeded anymore __maybe_unused and fix kernel doc
to avoid warning:

  st_gyro_core.c:366: error: Cannot parse struct or union!

by converting to a simple comment. It is described at the declaration.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20210414195454.84183-2-andriy.shevchenko@linux.intel.comSigned-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 3b914520
...@@ -24,14 +24,6 @@ ...@@ -24,14 +24,6 @@
#define LSM330_GYRO_DEV_NAME "lsm330_gyro" #define LSM330_GYRO_DEV_NAME "lsm330_gyro"
#define LSM9DS0_GYRO_DEV_NAME "lsm9ds0_gyro" #define LSM9DS0_GYRO_DEV_NAME "lsm9ds0_gyro"
/**
* struct st_sensors_platform_data - gyro platform data
* @drdy_int_pin: DRDY on gyros is available only on INT2 pin.
*/
static __maybe_unused const struct st_sensors_platform_data gyro_pdata = {
.drdy_int_pin = 2,
};
const struct st_sensor_settings *st_gyro_get_settings(const char *name); const struct st_sensor_settings *st_gyro_get_settings(const char *name);
int st_gyro_common_probe(struct iio_dev *indio_dev); int st_gyro_common_probe(struct iio_dev *indio_dev);
void st_gyro_common_remove(struct iio_dev *indio_dev); void st_gyro_common_remove(struct iio_dev *indio_dev);
......
...@@ -357,6 +357,11 @@ static const struct st_sensor_settings st_gyro_sensors_settings[] = { ...@@ -357,6 +357,11 @@ static const struct st_sensor_settings st_gyro_sensors_settings[] = {
}, },
}; };
/* DRDY on gyros is available only on INT2 pin */
static const struct st_sensors_platform_data gyro_pdata = {
.drdy_int_pin = 2,
};
static int st_gyro_read_raw(struct iio_dev *indio_dev, static int st_gyro_read_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *ch, int *val, struct iio_chan_spec const *ch, int *val,
int *val2, long mask) int *val2, long mask)
......
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