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.
Showing the changes to include/linux (1 of 3 files). Show all
Unified · Split
| @@ -12,6 +12,7 @@ · 11 unmodified lines | |||
| 12 | #include <linux/mutex.h> | 12 | #include <linux/mutex.h> |
| 13 | #include <linux/notifier.h> | 13 | #include <linux/notifier.h> |
| 14 | 14 | ||
| 15 | #include <linux/mfd/cros_ec.h> | ||
| 15 | #include <linux/platform_data/cros_ec_commands.h> | 16 | #include <linux/platform_data/cros_ec_commands.h> |
| 16 | 17 | ||
| 17 | #define CROS_EC_DEV_NAME "cros_ec" | 18 | #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); · 195 unmodified lines | |||
| 213 | 214 | ||
| 214 | u32 cros_ec_get_host_event(struct cros_ec_device *ec_dev); | 215 | u32 cros_ec_get_host_event(struct cros_ec_device *ec_dev); |
| 215 | 216 | ||
| 217 | int cros_ec_check_features(struct cros_ec_dev *ec, int feature); | ||
| 218 | |||
| 219 | int cros_ec_get_sensor_count(struct cros_ec_dev *ec); | ||
| 220 | |||
| 216 | #endif /* __LINUX_CROS_EC_PROTO_H */ | 221 | #endif /* __LINUX_CROS_EC_PROTO_H */ |