aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorGwendal Grignou <gwendal@chromium.org>2018-03-23 13:42:47 -0400
committerBenson Leung <bleung@chromium.org>2018-04-11 01:25:07 -0400
commitc1d1e91aff3d1183d6b16a282c2575e3e006cee4 (patch)
treec28563a8b73ebda8598b47f059ab328df9cc65e9 /include/linux
parentb082b2e1454c3e0217d7cf70f2211966c3d54301 (diff)
platform/chrome: mfd/cros_ec_dev: Add sysfs entry to set keyboard wake lid angle
This adds a sysfs attribute (/sys/class/chromeos/cros_ec/kb_wake_angle) used to set and get the keyboard wake lid angle. This attribute is present only if 2 accelerometers are controlled by the EC. This patch also moves the cros_ec features check before the device is added so the features map obtained from the EC is ready on time. Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Benson Leung <bleung@chromium.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mfd/cros_ec.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/mfd/cros_ec.h b/include/linux/mfd/cros_ec.h
index c61535979b8f..2d4e23c9ea0a 100644
--- a/include/linux/mfd/cros_ec.h
+++ b/include/linux/mfd/cros_ec.h
@@ -183,6 +183,7 @@ struct cros_ec_debugfs;
183 * @ec_dev: cros_ec_device structure to talk to the physical device 183 * @ec_dev: cros_ec_device structure to talk to the physical device
184 * @dev: pointer to the platform device 184 * @dev: pointer to the platform device
185 * @debug_info: cros_ec_debugfs structure for debugging information 185 * @debug_info: cros_ec_debugfs structure for debugging information
186 * @has_kb_wake_angle: true if at least 2 accelerometer are connected to the EC.
186 * @cmd_offset: offset to apply for each command. 187 * @cmd_offset: offset to apply for each command.
187 */ 188 */
188struct cros_ec_dev { 189struct cros_ec_dev {
@@ -191,6 +192,7 @@ struct cros_ec_dev {
191 struct cros_ec_device *ec_dev; 192 struct cros_ec_device *ec_dev;
192 struct device *dev; 193 struct device *dev;
193 struct cros_ec_debugfs *debug_info; 194 struct cros_ec_debugfs *debug_info;
195 bool has_kb_wake_angle;
194 u16 cmd_offset; 196 u16 cmd_offset;
195 u32 features[2]; 197 u32 features[2];
196}; 198};