]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - include/linux/platform_data/cros_ec_proto.h
cros_ec: treewide: Remove 'include/linux/mfd/cros_ec.h'
[linux.git] / include / linux / platform_data / cros_ec_proto.h
index 30098a5515231dd2d7fee2f36442736594bc001d..119b9951c055cad7f54c2469a32252176b086024 100644 (file)
@@ -12,7 +12,6 @@
 #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"
@@ -185,6 +184,28 @@ struct cros_ec_platform {
        u16 cmd_offset;
 };
 
+/**
+ * struct cros_ec_dev - ChromeOS EC device entry point.
+ * @class_dev: Device structure used in sysfs.
+ * @ec_dev: cros_ec_device structure to talk to the physical device.
+ * @dev: Pointer to the platform device.
+ * @debug_info: cros_ec_debugfs structure for debugging information.
+ * @has_kb_wake_angle: True if at least 2 accelerometer are connected to the EC.
+ * @cmd_offset: Offset to apply for each command.
+ * @features: Features supported by the EC.
+ */
+struct cros_ec_dev {
+       struct device class_dev;
+       struct cros_ec_device *ec_dev;
+       struct device *dev;
+       struct cros_ec_debugfs *debug_info;
+       bool has_kb_wake_angle;
+       u16 cmd_offset;
+       u32 features[2];
+};
+
+#define to_cros_ec_dev(dev)  container_of(dev, struct cros_ec_dev, class_dev)
+
 int cros_ec_suspend(struct cros_ec_device *ec_dev);
 
 int cros_ec_resume(struct cros_ec_device *ec_dev);