[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190308221307.GB16125@amd>
Date: Fri, 8 Mar 2019 23:13:07 +0100
From: Pavel Machek <pavel@....cz>
To: Dmitry Torokhov <dtor@...omium.org>
Cc: Nick Crews <ncrews@...omium.org>, enric.balletbo@...labora.com,
Benson Leung <bleung@...omium.org>, linux-leds@...r.kernel.org,
jacek.anaszewski@...il.com, lkml <linux-kernel@...r.kernel.org>,
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
Hi!
> > This patch is meant to be applied on top of the for-next
> > branch of the platform/chrome repository, as it uses some of
> > the code staged there.
> >
> > The EC is in charge of controlling the keyboard backlight on
> > the Wilco platform. We expose a standard LED class device at
> > /sys/class/leds/wilco::kbd_backlight. This driver is modeled
> > after the standard Chrome OS keyboard backlight driver at
> > drivers/platform/chrome/cros_kbd_led_backlight.c
> >
> > 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.
>
> > + 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.
Hmm. Seeing get method there... can the EC change the brightness
without command from kernel?
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Download attachment "signature.asc" of type "application/pgp-signature" (182 bytes)
Powered by blists - more mailing lists