mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
platform/chrome: cros_ec_dev - Register cros-ec sensors
Check whether the ChromeOS Embedded Controller is a sensor hub and in such case issue a command to get the number of sensors and register them all. Signed-off-by: Gwendal Grignou <[email protected]> Signed-off-by: Enric Balletbo i Serra <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Acked-by: Olof Johansson <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
This commit is contained in:
parent
e4244ebdda
commit
5668bfdd90
2 changed files with 124 additions and 2 deletions
|
|
@ -51,7 +51,7 @@ static int cros_ec_sensors_read(struct iio_dev *indio_dev,
|
|||
s16 data = 0;
|
||||
s64 val64;
|
||||
int i;
|
||||
int ret = IIO_VAL_INT;
|
||||
int ret;
|
||||
int idx = chan->scan_index;
|
||||
|
||||
mutex_lock(&st->core.cmd_lock);
|
||||
|
|
@ -137,7 +137,7 @@ static int cros_ec_sensors_write(struct iio_dev *indio_dev,
|
|||
{
|
||||
struct cros_ec_sensors_state *st = iio_priv(indio_dev);
|
||||
int i;
|
||||
int ret = 0;
|
||||
int ret;
|
||||
int idx = chan->scan_index;
|
||||
|
||||
mutex_lock(&st->core.cmd_lock);
|
||||
|
|
|
|||
Loading…
Reference in a new issue