All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sebastian Gottschall <s.gottschall@dd-wrt.com>
To: "Rafał Miłecki" <zajec5@gmail.com>,
	"open list:LED SUBSYSTEM" <linux-leds@vger.kernel.org>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	Kalle Valo <kvalo@codeaurora.org>,
	ath10k@lists.infradead.org,
	Sebastian Gottschall <s.gottschall@newmedia-net.de>
Subject: Re: [PATCH v12] ath10k: add LED and GPIO controlling support for various chipsets
Date: Wed, 28 Feb 2018 02:49:44 +0100	[thread overview]
Message-ID: <82d8ac0c-b391-6099-4c7f-991cc35445aa@dd-wrt.com> (raw)
In-Reply-To: <CACna6rzD6z3DC6yjMCgBxgxx+DF+GGu69Ot5QA6xpJ41Ewb2=A@mail.gmail.com>

Am 27.02.2018 um 23:08 schrieb Rafał Miłecki:
> On 26 February 2018 at 09:44,  <s.gottschall@dd-wrt.com> wrote:
>> From: Sebastian Gottschall <s.gottschall@newmedia-net.de>
>>
>> Adds LED and GPIO Control support for 988x, 9887, 9888, 99x0, 9984 based chipsets with on chipset connected led's
>> using WMI Firmware API.
>> The LED device will get available named as "ath10k-phyX" at sysfs and can be controlled with various triggers.
>> adds also debugfs interface for gpio control.
> Hi Sebastian,
>
> I just noticed this patch and have one question. It seems you register
> GPIO chip and that WiFi LED is controller by a GPIO. Shouldn't you use
> leds-gpio driver and just register platform device with
> gpio_led_platform_data? That way you could avoid some code duplication
> I think? It seems to be the purpose of leds-gpio driver.
leds-gpio is crap and limited. you can just register one platform data 
at kernel runtime since its identified by its object name "led-gpio" but 
the kernel forbidds to register 2 platform datas with the same name
consider the ar71xx devices with qca988x wifi chipsets. they all have 
already a led platform data registered
at boottime. a second can't be registered anymore so gpio_led is useless 
at all for most developers on such platforms. its mainly used for early 
kernel platform data initialisation for system leds.
at the beginning of development of this patch i started in that way and 
found out this limitation, so i had to rewrite everything.
the good point now is, it works even without gpiolib support since the 
gpio device is just a option, but not required for led control.

-- 
Mit freundlichen Grüssen / Regards

Sebastian Gottschall / CTO

NewMedia-NET GmbH - DD-WRT
Firmensitz:  Stubenwaldallee 21a, 64625 Bensheim
Registergericht: Amtsgericht Darmstadt, HRB 25473
Geschäftsführer: Peter Steinhäuser, Christian Scheele
http://www.dd-wrt.com
email: s.gottschall@dd-wrt.com
Tel.: +496251-582650 / Fax: +496251-5826565

WARNING: multiple messages have this Message-ID (diff)
From: Sebastian Gottschall <s.gottschall@dd-wrt.com>
To: "Rafał Miłecki" <zajec5@gmail.com>,
	"open list:LED SUBSYSTEM" <linux-leds@vger.kernel.org>
Cc: Sebastian Gottschall <s.gottschall@newmedia-net.de>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	ath10k@lists.infradead.org, Kalle Valo <kvalo@codeaurora.org>
Subject: Re: [PATCH v12] ath10k: add LED and GPIO controlling support for various chipsets
Date: Wed, 28 Feb 2018 02:49:44 +0100	[thread overview]
Message-ID: <82d8ac0c-b391-6099-4c7f-991cc35445aa@dd-wrt.com> (raw)
In-Reply-To: <CACna6rzD6z3DC6yjMCgBxgxx+DF+GGu69Ot5QA6xpJ41Ewb2=A@mail.gmail.com>

Am 27.02.2018 um 23:08 schrieb Rafał Miłecki:
> On 26 February 2018 at 09:44,  <s.gottschall@dd-wrt.com> wrote:
>> From: Sebastian Gottschall <s.gottschall@newmedia-net.de>
>>
>> Adds LED and GPIO Control support for 988x, 9887, 9888, 99x0, 9984 based chipsets with on chipset connected led's
>> using WMI Firmware API.
>> The LED device will get available named as "ath10k-phyX" at sysfs and can be controlled with various triggers.
>> adds also debugfs interface for gpio control.
> Hi Sebastian,
>
> I just noticed this patch and have one question. It seems you register
> GPIO chip and that WiFi LED is controller by a GPIO. Shouldn't you use
> leds-gpio driver and just register platform device with
> gpio_led_platform_data? That way you could avoid some code duplication
> I think? It seems to be the purpose of leds-gpio driver.
leds-gpio is crap and limited. you can just register one platform data 
at kernel runtime since its identified by its object name "led-gpio" but 
the kernel forbidds to register 2 platform datas with the same name
consider the ar71xx devices with qca988x wifi chipsets. they all have 
already a led platform data registered
at boottime. a second can't be registered anymore so gpio_led is useless 
at all for most developers on such platforms. its mainly used for early 
kernel platform data initialisation for system leds.
at the beginning of development of this patch i started in that way and 
found out this limitation, so i had to rewrite everything.
the good point now is, it works even without gpiolib support since the 
gpio device is just a option, but not required for led control.

-- 
Mit freundlichen Grüssen / Regards

Sebastian Gottschall / CTO

NewMedia-NET GmbH - DD-WRT
Firmensitz:  Stubenwaldallee 21a, 64625 Bensheim
Registergericht: Amtsgericht Darmstadt, HRB 25473
Geschäftsführer: Peter Steinhäuser, Christian Scheele
http://www.dd-wrt.com
email: s.gottschall@dd-wrt.com
Tel.: +496251-582650 / Fax: +496251-5826565


_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

  reply	other threads:[~2018-02-28  1:49 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-26  8:44 [PATCH v12] ath10k: add LED and GPIO controlling support for various chipsets s.gottschall
2018-02-26  8:44 ` s.gottschall
2018-02-27 17:03 ` Steve deRosier
2018-02-27 17:03   ` Steve deRosier
2018-02-27 17:43   ` Sebastian Gottschall
2018-02-27 17:43     ` Sebastian Gottschall
2018-02-27 22:08 ` Rafał Miłecki
2018-02-27 22:08   ` Rafał Miłecki
2018-02-28  1:49   ` Sebastian Gottschall [this message]
2018-02-28  1:49     ` Sebastian Gottschall
2018-03-02  9:03     ` Pavel Machek
2018-03-02  9:03       ` Pavel Machek
2018-03-02  9:22       ` Sebastian Gottschall
2018-03-02  9:22         ` Sebastian Gottschall
2018-03-02  9:22         ` Sebastian Gottschall
2018-03-07 16:22         ` Rafał Miłecki
2018-03-07 16:22           ` Rafał Miłecki
2018-03-07 17:54           ` Sebastian Gottschall
2018-03-07 17:54             ` Sebastian Gottschall
2018-03-08  9:02             ` Pavel Machek
2018-03-08  9:02               ` Pavel Machek
2018-03-08 12:33               ` Sebastian Gottschall
2018-03-08 12:33                 ` Sebastian Gottschall
2018-03-08 14:05                 ` Pavel Machek
2018-03-08 14:05                   ` Pavel Machek
2018-03-08 14:29                   ` Kalle Valo
2018-03-08 14:29                     ` Kalle Valo
2018-03-08 14:29                     ` Kalle Valo
2018-03-08 14:43                     ` Sebastian Gottschall
2018-03-08 14:43                       ` Sebastian Gottschall
2018-03-08 14:34                   ` Sebastian Gottschall
2018-03-08 14:34                     ` Sebastian Gottschall
2018-03-08 15:04                     ` Pavel Machek
2018-03-08 15:04                       ` Pavel Machek
2018-03-08 15:04                       ` Pavel Machek
2018-03-08 15:31                       ` Sebastian Gottschall
2018-03-08 15:31                         ` Sebastian Gottschall
2018-03-08 15:46                   ` Felix Fietkau
2018-03-08 15:46                     ` Felix Fietkau
2018-03-10  7:44                     ` Julian Calaby
2018-03-10  7:44                       ` Julian Calaby
2018-03-10  7:56                       ` Sebastian Gottschall
2018-03-10  7:56                         ` Sebastian Gottschall
2018-03-12  7:53                         ` Mathias Kresin
2018-03-12  7:53                           ` Mathias Kresin
2018-03-12  7:53                           ` Mathias Kresin
2018-03-12  9:09                           ` Sebastian Gottschall
2018-03-12  9:09                             ` Sebastian Gottschall
2018-03-12  9:09                             ` Sebastian Gottschall
2018-04-05 14:44 ` Kalle Valo
2018-04-05 14:44   ` Kalle Valo
2018-04-05 18:01   ` Sebastian Gottschall
2018-04-05 18:01     ` Sebastian Gottschall
2018-04-05 20:00     ` Sebastian Gottschall
2018-04-05 20:00       ` Sebastian Gottschall
2018-04-06  8:07       ` Kalle Valo
2018-04-06  8:07         ` Kalle Valo
2018-04-06  8:10         ` Sebastian Gottschall
2018-04-06  8:10           ` Sebastian Gottschall
     [not found]       ` <1d917688-9f59-39ad-46a6-527d9e3dec03@dd-wrt.com>
2018-04-06  8:09         ` Kalle Valo
2018-04-06  8:09           ` Kalle Valo
2018-04-06  8:11           ` Sebastian Gottschall
2018-04-06  8:11             ` Sebastian Gottschall
2018-04-06  8:25             ` Kalle Valo
2018-04-06  8:25               ` Kalle Valo
     [not found]               ` <f3617290-34d5-0cca-6442-4a37c06701b1@dd-wrt.com>
2018-04-06  9:17                 ` Kalle Valo
2018-04-06  9:17                   ` Kalle Valo
2018-04-06  8:05     ` Kalle Valo
2018-04-06  8:05       ` Kalle Valo

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=82d8ac0c-b391-6099-4c7f-991cc35445aa@dd-wrt.com \
    --to=s.gottschall@dd-wrt.com \
    --cc=ath10k@lists.infradead.org \
    --cc=kvalo@codeaurora.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=s.gottschall@newmedia-net.de \
    --cc=zajec5@gmail.com \
    /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.