mfd / platform / iio: cros_ec: Register sensor through sensorhub
Remove the duplicated code in MFD, since MFD just registers cros-ec-sensorhub if at least one sensor is present. Change IIO cros-ec driver to get the pointer to the cros-ec-dev through cros-ec-sensorhub. Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
This commit is contained in:

committed by
Enric Balletbo i Serra

parent
5306747118
commit
d60ac88a62
@@ -168,14 +168,6 @@ struct cros_ec_device {
|
||||
struct platform_device *pd;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct cros_ec_sensor_platform - ChromeOS EC sensor platform information.
|
||||
* @sensor_num: Id of the sensor, as reported by the EC.
|
||||
*/
|
||||
struct cros_ec_sensor_platform {
|
||||
u8 sensor_num;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct cros_ec_platform - ChromeOS EC platform information.
|
||||
* @ec_name: Name of EC device (e.g. 'cros-ec', 'cros-pd', ...)
|
||||
|
@@ -10,6 +10,14 @@
|
||||
|
||||
#include <linux/platform_data/cros_ec_commands.h>
|
||||
|
||||
/**
|
||||
* struct cros_ec_sensor_platform - ChromeOS EC sensor platform information.
|
||||
* @sensor_num: Id of the sensor, as reported by the EC.
|
||||
*/
|
||||
struct cros_ec_sensor_platform {
|
||||
u8 sensor_num;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct cros_ec_sensorhub - Sensor Hub device data.
|
||||
*
|
||||
|
Reference in New Issue
Block a user