aboutsummaryrefslogtreecommitdiff
path: root/include/cros_ec.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/cros_ec.h')
-rw-r--r--include/cros_ec.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/cros_ec.h b/include/cros_ec.h
index 26e3f3ba0cb..cb91343e3d8 100644
--- a/include/cros_ec.h
+++ b/include/cros_ec.h
@@ -279,6 +279,16 @@ struct dm_cros_ec_ops {
* @return number of bytes in response, or -ve on error
*/
int (*packet)(struct udevice *dev, int out_bytes, int in_bytes);
+
+ /**
+ * get_switches() - Get value of EC switches
+ *
+ * This is currently supported on the LPC EC.
+ *
+ * @dev: Device to use
+ * @return current switches value, or -ENOSYS if not supported
+ */
+ int (*get_switches)(struct udevice *dev);
};
#define dm_cros_ec_get_ops(dev) \
@@ -577,4 +587,13 @@ int cros_ec_get_features(struct udevice *dev, u64 *featuresp);
*/
int cros_ec_check_feature(struct udevice *dev, uint feature);
+/**
+ * cros_ec_get_switches() - Get switches value
+ *
+ * @dev: CROS-EC device
+ * @return switches value, or -ENOSYS if not supported, or other -ve value on
+ * other error
+ */
+int cros_ec_get_switches(struct udevice *dev);
+
#endif