mfd / platform: cros_ec: Add sensor_count and make check_features public
Add a new function to return the number of MEMS sensors available in a ChromeOS Embedded Controller. It uses MOTIONSENSE_CMD_DUMP if available or a specific memory map ACPI registers to find out. Also, make check_features public as it can be useful for other drivers to know what the Embedded Controller supports. Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
This commit is contained in:
parent
c9b465683a
commit
a16b2e2819
3 changed files with 122 additions and 32 deletions
|
|
@ -12,6 +12,7 @@
|
|||
#include <linux/mutex.h>
|
||||
#include <linux/notifier.h>
|
||||
|
||||
#include <linux/mfd/cros_ec.h>
|
||||
#include <linux/platform_data/cros_ec_commands.h>
|
||||
|
||||
#define CROS_EC_DEV_NAME "cros_ec"
|
||||
|
|
@ -213,4 +214,8 @@ int cros_ec_get_next_event(struct cros_ec_device *ec_dev, bool *wake_event);
|
|||
|
||||
u32 cros_ec_get_host_event(struct cros_ec_device *ec_dev);
|
||||
|
||||
int cros_ec_check_features(struct cros_ec_dev *ec, int feature);
|
||||
|
||||
int cros_ec_get_sensor_count(struct cros_ec_dev *ec);
|
||||
|
||||
#endif /* __LINUX_CROS_EC_PROTO_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue