[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPUE2uvZzXUoG+Fr7c3q0ysMUz0eb36PrdknG37FkG1v2h7zUg@mail.gmail.com>
Date: Thu, 27 May 2021 14:01:34 -0700
From: Gwendal Grignou <gwendal@...omium.org>
To: Benson Leung <bleung@...omium.org>,
Enric Balletbo i Serra <enric.balletbo@...labora.com>,
Guenter Roeck <groeck@...omium.org>
Cc: linux-kernel <linux-kernel@...r.kernel.org>,
Gwendal Grignou <gwendal@...gle.com>,
Dmitry Torokhov <dtor@...omium.org>
Subject: Re: [PATCH v2 0/2] platform/chrome: Update cros_ec sysfs attribute
after sensors are found
[+dtor]
Is this change acceptable? I was worried it could break when
asynchronous probing is used [https://lwn.net/Articles/629895/], but
since all probes are deferred in a single thread, it is safe.
Gwendal.
Gwendal.
On Mon, Apr 5, 2021 at 1:29 PM Gwendal Grignou <gwendal@...omium.org> wrote:
>
> 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