[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210405202857.1265308-1-gwendal@google.com>
Date: Mon, 5 Apr 2021 13:28:55 -0700
From: Gwendal Grignou <gwendal@...omium.org>
To: bleung@...omium.org, enric.balletbo@...labora.com,
groeck@...omium.org
Cc: linux-kernel@...r.kernel.org, Gwendal Grignou <gwendal@...gle.com>
Subject: [PATCH v2 0/2] platform/chrome: Update cros_ec sysfs attribute after sensors are found
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
Powered by blists - more mailing lists