History

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.

Gwendal Grignou committed 6 years ago

Commit a16b2e21 parent c9b46563 files · +122 −32Browse files

Showing the changes to include/linux (1 of 3 files). Show all

Unified · Split

include/linux/platform_data/cros_ec_proto.h+5−0
@@ -12,6 +12,7 @@ · 11 unmodified lines
1212 #include <linux/mutex.h>
1313 #include <linux/notifier.h>
1414
15+#include <linux/mfd/cros_ec.h>
1516 #include <linux/platform_data/cros_ec_commands.h>
1617
1718 #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
213214
214215 u32 cros_ec_get_host_event(struct cros_ec_device *ec_dev);
215216
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+
216221 #endif /* __LINUX_CROS_EC_PROTO_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t