All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Evan McClain <aeroevan@gmail.com>
Cc: Jacek Anaszewski <j.anaszewski@samsung.com>,
	Richard Purdie <rpurdie@rpsys.net>, Bryan Wu <cooloney@gmail.com>,
	Simon Que <sque@chromium.org>,
	Olof Johansson <olofj@chromium.org>,
	Duncan Laurie <dlaurie@chromium.org>,
	Guenter Roeck <groeck@chromium.org>,
	linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org
Subject: Re: [PATCH] leds: Add Chrome OS keyboard backlight LEDs driver
Date: Fri, 4 Mar 2016 12:56:44 -0800	[thread overview]
Message-ID: <20160304205644.GF17145@dtor-ws> (raw)
In-Reply-To: <1457124096.29260.30.camel@gmail.com>

On Fri, Mar 04, 2016 at 03:41:36PM -0500, Evan McClain wrote:
> On Fri, 2016-03-04 at 11:13 -0800, Dmitry Torokhov wrote:
> > On Fri, Mar 04, 2016 at 10:38:40AM +0100, Jacek Anaszewski wrote:
> > > 
> > > Hi Evan,
> > > 
> > > On 03/04/2016 09:38 AM, Evan McClain wrote:
> > > > 
> > > > On Thu, 2016-03-03 at 15:46 -0800, Dmitry Torokhov wrote:
> > > > > 
> > > > > From: Simon Que <sque@chromium.org>
> > > > > 
> > > > > This is a driver for ACPI-based keyboard backlight LEDs found
> > > > > on
> > > > > Chromebooks. The driver locates \\_SB.KBLT ACPI device and
> > > > > exports
> > > > > backlight as "chromeos::kbd_backlight" LED class device in
> > > > > sysfs.
> > > > Was it ever decided where this driver should live? I was planning
> > > > on
> > > > submitting to platform/chrome since most keyboard backlights seem
> > > > to
> > > > live over there but I don't think I got a response.
> > > > 
> > > It hasn't been decided yet. I can take it, but could you submit one
> > > more
> > > version, without
> > > 
> > > 'owner	= THIS_MODULE' in struct platform_driver
> > > keyboard_led_driver ?
> > > 
> > > It is redundant, because the core will do it.
> > > 
> > > Also the line with devm_kzalloc has over 80 characters.
> > Also:
> > 
> > - preferably use sizeof(*cdev) instead of sizeof(struct ...)
> > - do not check cdev->flags & LED_SUSPENDED in
> >   keyboard_led_set_brightness() as it is not going to be called when
> > led
> >   device is suspended anyway
> 
> Your patch is definitely better, I was only taking Simon's original
> submission and doing the minimal cleanup to help get it submitted (as
> someone using mainline linux on a pixel 2/samus).
> 
> > - change the MODULE_LICENSE from "GPL v2" to "GPL" as to match the
> >   actual license notice
> 
> I think this got changed in one of the revisions in error.
> 
> > - report ACPI errors in error messages (since we clobber them)
> > - preferably use ENXIO instead of ENODEV
> 
> Most other drivers seem to use ENODEV on probe, but I'm in the 'learn
> through grep' level of understanding for parts of linux.
> 
> > - maybe add "depends on CHROME_PLATFORMS || COMPILE_TEST" so that we
> > do
> >   not prompt for it on non-Chrome platforms
> 
> Adding depends on CHROME_PLATFORMS definitely makes sense, but also
> might support putting this driver in platform/chrome. Either way I just

Olof, do you want it in platform/chrome?

> selfishly want better mainline support for this laptop.
> 
> The only change I made (other than the changes suggested by Jacek) was
> to remove the line setting brightness to max_brightness on probe. I can

I wonder if we should actually read the current brightness before
registering the led device.

Thanks.

-- 
Dmitry

  reply	other threads:[~2016-03-04 20:56 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-03 23:46 [PATCH] leds: Add Chrome OS keyboard backlight LEDs driver Dmitry Torokhov
2016-03-04  8:38 ` Evan McClain
2016-03-04  9:38   ` Jacek Anaszewski
2016-03-04 19:13     ` Dmitry Torokhov
2016-03-04 20:41       ` Evan McClain
2016-03-04 20:56         ` Dmitry Torokhov [this message]
2016-03-04 22:09           ` Olof Johansson
2016-03-04 20:55       ` Jacek Anaszewski
2016-03-04 20:59         ` Dmitry Torokhov
2016-03-04 21:48           ` Jacek Anaszewski
2016-03-04  9:38 ` Jacek Anaszewski
2016-03-04 19:19   ` Dmitry Torokhov
2016-03-04 19:22     ` Olof Johansson

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=20160304205644.GF17145@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=aeroevan@gmail.com \
    --cc=cooloney@gmail.com \
    --cc=dlaurie@chromium.org \
    --cc=groeck@chromium.org \
    --cc=j.anaszewski@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=olofj@chromium.org \
    --cc=rpurdie@rpsys.net \
    --cc=sque@chromium.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.