LKML Archive mirror
 help / color / mirror / Atom feed
From: Gwendal Grignou <gwendal@chromium.org>
To: bleung@chromium.org, enric.balletbo@collabora.com, groeck@chromium.org
Cc: linux-kernel@vger.kernel.org, Gwendal Grignou <gwendal@google.com>
Subject: [PATCH v2 0/2] platform/chrome: Update cros_ec sysfs attribute after sensors are found
Date: Mon,  5 Apr 2021 13:28:55 -0700	[thread overview]
Message-ID: <20210405202857.1265308-1-gwendal@google.com> (raw)

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	other threads:[~2021-04-05 20:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-05 20:28 Gwendal Grignou [this message]
2021-04-05 20:28 ` [PATCH v2 1/2] platform/chrome: Use dev_groups to set device sysfs attributes Gwendal Grignou
2021-04-05 20:28 ` [PATCH v2 2/2] platform/chrome: Update cros_ec sysfs attributes on sensors discovery Gwendal Grignou
2021-05-27 21:01 ` [PATCH v2 0/2] platform/chrome: Update cros_ec sysfs attribute after sensors are found Gwendal Grignou
2021-05-31  5:36   ` Dmitry Torokhov
2021-08-04 21:09     ` Gwendal Grignou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210405202857.1265308-1-gwendal@google.com \
    --to=gwendal@chromium.org \
    --cc=bleung@chromium.org \
    --cc=enric.balletbo@collabora.com \
    --cc=groeck@chromium.org \
    --cc=gwendal@google.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).