lkml.org 
[lkml]   [2021]   [Apr]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH v2 0/2] platform/chrome: Update cros_ec sysfs attribute after sensors are found
Date
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

\
 
 \ /
  Last update: 2021-04-05 22:30    [W:0.250 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site