[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Y3cqwEIueri63XzH@google.com>
Date: Fri, 18 Nov 2022 14:48:32 +0800
From: Tzung-Bi Shih <tzungbi@...nel.org>
To: Gwendal Grignou <gwendal@...omium.org>
Cc: dtor@...omium.org, jwerner@...omium.org, bleung@...omium.org,
enric.balletbo@...labora.com, groeck@...omium.org,
linux-kernel@...r.kernel.org, chrome-platform@...ts.linux.dev
Subject: Re: [PATCH v3 1/1] platform/chrome: Poke kb_wake_angle attribute
visibility when needed
On Thu, Nov 17, 2022 at 10:41:06PM -0800, Gwendal Grignou wrote:
> On Thu, Nov 17, 2022 at 6:01 PM Tzung-Bi Shih <tzungbi@...nel.org> wrote:
> >
> > On Wed, Nov 16, 2022 at 10:23:38AM -0800, Gwendal Grignou wrote:
> > > [+chrome-platform@...ts.linux.dev]
> >
> > Please also Cc to the mailing list if the patch gets chance to have
> > next version.
> >
> > > On Mon, Nov 14, 2022 at 8:10 PM Gwendal Grignou <gwendal@...omium.org> wrote:
> > [...]
> > > > > Expose the attribute group to alter to close a potiential race between
> > > > > cros-ec-sensorhub and cros-ec-sysfs (that creates the attribute group
> > > > > on behalf of the class driver).
> >
> > I failed to realize the potential race. Could you explain it a bit?
> The decision to show or not an attribute is done at the attribute file
> creation time, once. If the module cros_ec_sysfs is loaded before
> cros_ec_sensorhub, the attribute kb_wake_angle will never be shown. If
> it is loaded after, and there are 2 accelerometers, the is_visible()
> function will return true and the attribute is shown.
>
> This patch ensures the attribute is_visible() is run again after the
> sensorhub driver is loaded.
I see. Thanks.
Powered by blists - more mailing lists