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>
This commit is contained in:
parent
cc0bb2f106
commit
7cbb6681d7
5 changed files with 10 additions and 28 deletions
|
|
@ -41,7 +41,6 @@ typedef irqreturn_t (*cros_ec_sensors_capture_t)(int irq, void *p);
|
|||
* @param: motion sensor parameters structure
|
||||
* @resp: motion sensor response structure
|
||||
* @type: type of motion sensor
|
||||
* @loc: location where the motion sensor is placed
|
||||
* @range_updated: True if the range of the sensor has been
|
||||
* updated.
|
||||
* @curr_range: If updated, the current range value.
|
||||
|
|
@ -67,7 +66,6 @@ struct cros_ec_sensors_core_state {
|
|||
struct ec_response_motion_sense *resp;
|
||||
|
||||
enum motionsensor_type type;
|
||||
enum motionsensor_location loc;
|
||||
|
||||
bool range_updated;
|
||||
int curr_range;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue