diff options
author | Gwendal Grignou <gwendal@chromium.org> | 2022-04-27 22:08:04 +0300 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2022-06-11 16:35:26 +0300 |
commit | 7cbb6681d7e5b88688234ad370e027a9346ff7a9 (patch) | |
tree | 09dddb1df50413005ce43054c96efef798a2b67f /drivers/iio/pressure | |
parent | cc0bb2f106cb6293997e9114caa7887d91d22b26 (diff) | |
download | linux-7cbb6681d7e5b88688234ad370e027a9346ff7a9.tar.xz |
iio: common: cros_ec_sensors: Add label attribute
When sensor location is known, populate iio sysfs "label" attribute:
* "accel-base" : the sensor is in the base of the convertible (2-1)
device.
* "accel-display" : the sensor is in the lid/display plane of the
device.
* "accel-camera" : the sensor is in the swivel camera subassembly.
The non-standard |location| attribute is removed, the field |loc| in
cros_ec_sensors_core_state is removed.
It apply to standalone accelerometer as well as IMU (accelerometer +
gyroscope) and sensors where the location is known (light).
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Link: https://lore.kernel.org/r/20220427190804.961697-3-gwendal@chromium.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/pressure')
-rw-r--r-- | drivers/iio/pressure/cros_ec_baro.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/iio/pressure/cros_ec_baro.c b/drivers/iio/pressure/cros_ec_baro.c index 2f882e109423..1d9d34ae3c0a 100644 --- a/drivers/iio/pressure/cros_ec_baro.c +++ b/drivers/iio/pressure/cros_ec_baro.c @@ -145,8 +145,6 @@ static int cros_ec_baro_probe(struct platform_device *pdev) indio_dev->info = &cros_ec_baro_info; state = iio_priv(indio_dev); - state->core.type = state->core.resp->info.type; - state->core.loc = state->core.resp->info.location; channel = state->channels; /* Common part */ channel->info_mask_separate = BIT(IIO_CHAN_INFO_RAW); |