lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHX4x85Ve+AHvcO1dPN9x6P3X8RV=rSzoWbYp=S-OeDnjGmOaQ@mail.gmail.com>
Date:   Tue, 12 Mar 2019 10:05:38 -0600
From:   Nick Crews <ncrews@...omium.org>
To:     Pavel Machek <pavel@....cz>
Cc:     Dmitry Torokhov <dtor@...omium.org>,
        Enric Balletbo i Serra <enric.balletbo@...labora.com>,
        Benson Leung <bleung@...omium.org>, linux-leds@...r.kernel.org,
        jacek.anaszewski@...il.com, lkml <linux-kernel@...r.kernel.org>,
        Duncan Laurie <dlaurie@...omium.org>,
        Daniel Erat <derat@...gle.com>,
        Guenter Roeck <groeck@...gle.com>
Subject: Re: [PATCH] platform/chrome: Add Wilco EC keyboard backlight LEDs support

> > > Some Wilco devices do not support a keyboard backlight. This
> > > is checked in probe(), and in this case the sysfs entry will
> > > not appear, and everything will behave normally.
> >
> > It would be even better if we did not register platform device if EC
> > does not support backlight.

Good point Dmitry. I would imagine this would entail exposing the
keyboard_leds_exist() function. What is the best practice for doing that?
I could either imagine EXPORT_SYMBOL_GPL()ing that function, but
that would require making the core driver dependent upon this keyboard
backlight driver in a circular dependency, so there would have to be some
refactoring. The other option I see would be to add this entire driver to
the core module.

Just so I learn something, I don't see performance or stability
concerns with adding one unused platform device, is your rationale
that it would just be cleaner code?

> >
> > > +       data->led.brightness_set = keyboard_led_set_brightness;
> > > +       data->led.brightness_get = keyboard_led_get_brightness;
> >
> > wilco_ec_mailbox() may sleep, so you need to assign it to
> > led.brightness_set_blocking.

Yes, thanks for the catch.

>
> Hmm. Seeing get method there... can the EC change the brightness
> without command from kernel?

No, the EC will never do that, good point. Therefore it looks like
I can just remove the get_brightness() function and the core
library will do the right thing.

Thanks,
Nick

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ