linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: "Pali Rohár" <pali.rohar@gmail.com>
Cc: Darren Hart <dvhart@infradead.org>,
	Matthew Garrett <mjg59@srcf.ucam.org>,
	Richard Purdie <rpurdie@rpsys.net>,
	Jacek Anaszewski <j.anaszewski@samsung.com>,
	platform-driver-x86@vger.kernel.org, linux-leds@vger.kernel.org
Subject: Re: [PATCH 2/2] platform: x86: dell-*: Call led_notify_brightness_change on kbd brightness change
Date: Wed, 19 Oct 2016 18:09:27 +0200	[thread overview]
Message-ID: <10c3baa9-db2f-3cf2-d924-70a77243e7f8@redhat.com> (raw)
In-Reply-To: <20161019140614.GF1689@pali>

Hi,

On 19-10-16 16:06, Pali Rohár wrote:
> On Wednesday 19 October 2016 15:33:55 Hans de Goede wrote:
>> diff --git a/drivers/platform/x86/dell-smbios.c b/drivers/platform/x86/dell-smbios.c
>> index d2412ab..7934953 100644
>> --- a/drivers/platform/x86/dell-smbios.c
>> +++ b/drivers/platform/x86/dell-smbios.c
>> @@ -21,6 +21,7 @@
>>  #include <linux/mutex.h>
>>  #include <linux/slab.h>
>>  #include <linux/io.h>
>> +#include <linux/leds.h>
>>  #include "../../firmware/dcdbas.h"
>>  #include "dell-smbios.h"
>>
>> @@ -40,6 +41,9 @@ static int da_command_code;
>>  static int da_num_tokens;
>>  static struct calling_interface_token *da_tokens;
>>
>> +struct led_classdev *dell_kbd_backlight_led;
>> +EXPORT_SYMBOL_GPL(dell_kbd_backlight_led);
>> +
>>  int dell_smbios_error(int value)
>>  {
>>  	switch (value) {
>
> This is ugly! dell-smbios.c file have nothing to do with led and
> keyboard backlight. It is generic interface for sending and receiving
> smbios requests.
>
> I know, there are "layering problems" and something better should be
> invented. Drivers dell-wmi.ko and dell-rbtn.ko provides events and
> dell-laptop.ko want to listen for them. There is already hack in
> dell-rbnt.ko which I really would like to fix and then delete...
>
> So I rather do not want to see another hacks in that code.

I agree that this is not pretty, but I could not come up with a
simple other solution. If you've any suggestions on how you want
to see this implemented instead I can give that a try.

Regards,

Hans

  reply	other threads:[~2016-10-19 16:09 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-19 13:33 [PATCH 0/2] Add led_notify_brightness_change led-core function and use in dell-wmi driver Hans de Goede
2016-10-19 13:33 ` [PATCH 1/2] leds: core: Add led_notify_brightness_change helper function Hans de Goede
2016-10-19 13:59   ` Pali Rohár
2016-10-19 16:07     ` Hans de Goede
2016-10-20  6:42       ` Jacek Anaszewski
2016-10-20  8:41         ` Hans de Goede
2016-10-20  9:15           ` Jacek Anaszewski
2016-10-20 10:02             ` Hans de Goede
2016-10-20 20:31               ` Jacek Anaszewski
2016-10-20  7:40       ` Pali Rohár
2016-10-19 13:33 ` [PATCH 2/2] platform: x86: dell-*: Call led_notify_brightness_change on kbd brightness change Hans de Goede
2016-10-19 14:06   ` Pali Rohár
2016-10-19 16:09     ` Hans de Goede [this message]
2016-10-20  7:48       ` Pali Rohár
2016-10-20  8:42         ` Hans de Goede
2016-10-19 14:10 ` [PATCH 0/2] Add led_notify_brightness_change led-core function and use in dell-wmi driver Pali Rohár

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=10c3baa9-db2f-3cf2-d924-70a77243e7f8@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=dvhart@infradead.org \
    --cc=j.anaszewski@samsung.com \
    --cc=linux-leds@vger.kernel.org \
    --cc=mjg59@srcf.ucam.org \
    --cc=pali.rohar@gmail.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=rpurdie@rpsys.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).