Attribute "kb_wake_angle" in /sys/<cros_ec hw path>/chromeos/cros_ec,
used to set at which angle the embedded controller must wake up the
host, is only set when there is at least 2 accelerometers in the
chromebook.

The detection of these sensors is done in cros_ec_sensorhub, driver that
can be probed after the cros_ec_sysfs driver that sets the attribute.
Therefore, we need to upgrade the cros_ec sysfs groups in the sensorhub
probe routine.

The first patch cleans up cros_ec_sysfs by using .dev_groups driver
field, the second patch fixes the problem.

Gwendal Grignou (2):
  platform/chrome: Use dev_groups to set device sysfs attributes
  platform/chrome: Update cros_ec sysfs attributes on sensors discovery

 drivers/platform/chrome/cros_ec_sensorhub.c |  5 ++++-
 drivers/platform/chrome/cros_ec_sysfs.c     | 22 +++++++--------------
 include/linux/platform_data/cros_ec_proto.h |  2 ++
 3 files changed, 13 insertions(+), 16 deletions(-)

-- 
2.31.0.208.g409f899ff0-goog

Reply via email to