1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * ChromeOS EC multi-function device
5 * Copyright (C) 2012 Google, Inc
8 #ifndef __LINUX_MFD_CROS_EC_H
9 #define __LINUX_MFD_CROS_EC_H
11 #include <linux/device.h>
14 * struct cros_ec_dev - ChromeOS EC device entry point.
15 * @class_dev: Device structure used in sysfs.
16 * @ec_dev: cros_ec_device structure to talk to the physical device.
17 * @dev: Pointer to the platform device.
18 * @debug_info: cros_ec_debugfs structure for debugging information.
19 * @has_kb_wake_angle: True if at least 2 accelerometer are connected to the EC.
20 * @cmd_offset: Offset to apply for each command.
21 * @features: Features supported by the EC.
24 struct device class_dev;
25 struct cros_ec_device *ec_dev;
27 struct cros_ec_debugfs *debug_info;
28 bool has_kb_wake_angle;
33 #define to_cros_ec_dev(dev) container_of(dev, struct cros_ec_dev, class_dev)
35 #endif /* __LINUX_MFD_CROS_EC_H */