From: Christian Mauderer <oss@c-mauderer.de>
To: Jacek Anaszewski <jacek.anaszewski@gmail.com>,
Pavel Machek <pavel@ucw.cz>
Cc: Rob Herring <robh+dt@kernel.org>,
Linux LED Subsystem <linux-leds@vger.kernel.org>,
devicetree@vger.kernel.org, Dan Murphy <dmurphy@ti.com>,
Mark Rutland <mark.rutland@arm.com>
Subject: Re: [PATCH v3 1/2] dt-bindings: leds: Add binding for spi-byte LED.
Date: Sat, 11 May 2019 08:56:47 +0200 [thread overview]
Message-ID: <82b27718-3a58-6692-02e4-41b45c16b81e@c-mauderer.de> (raw)
In-Reply-To: <ccddfde6-e60c-605c-beb4-9b89e8b81be9@gmail.com>
Hello Jacek,
On 10/05/2019 22:42, Jacek Anaszewski wrote:
> Hi Christian,
>
> On 5/10/19 9:50 PM, Christian Mauderer wrote:
>> On 07/05/2019 11:52, Christian Mauderer wrote:
>>> On 06/05/2019 22:25, Pavel Machek wrote:
>>>> Hi!
>>>>
>>>>>>> Ok, I'm afraid I caused this. What should the compatible be, then?
>>>>>>
>>>>>> Knowing nothing about the h/w other than the above description:
>>>>>> ubiquiti,aircube-leds
>>>>>>
>>>>>> Not sure if that's a registered or correct vendor prefix though.
>>>>>>
>>>>>> Rob
>>>>>>
>>>>>
>>>>> Where would such a vendor prefix be registered? Does that mean that
>>>>> only
>>>>> the vendor is allowed to use it? In that case: How would a reverse
>>>>> engineered prefix look like?
>>>>
>>>> You can use it, too. It is in
>>>> Documentation/devicetree/bindings/vendor-prefixes.txt :
>>>>
>>>> ubnt��� Ubiquiti Networks
>>>>
>>>> So you can probably use ubnt, prefix.
>>>>
>>>>> (still with some missing parts like U-Boot) about two weeks later.
>>>>> I had
>>>>> a look at it and they are not using a device tree. So there is no
>>>>> "official" string that I could deduce from that archive.
>>>>
>>>> Mainline is the master. You are more "official" than them ;-).
>>>> ����������������������������������� Pavel
>>>>
>>>
>>> Hello
>>>
>>> let me summarize the direction before I create a v4:
>>>
>>> Rob Herring suggested "ubnt,acb-spi-led" for the binding name in his
>>> Mail from 06.05.2019 17:59 UTC. If no one objects, I'll use that.
>>>
>>> With the more specific name I'll remove the off-value and max-value from
>>> the device tree. Instead I'll create some look up table in the driver.
>>> based on the name or go back to the defines like in the v1 patch. What
>>> kind of solution would be preferable depends on the next question:
>>>
>>> How should I name the driver? Should I use a device specific name like
>>> in v1 again (most likely now acb-spi-led)? That would allow to
>>> potentially add a hardware supported blinking in that driver. The
>>> alternative would be the more generic name that it has now
>>> (leds-spi-byte) without any plans to add the blinking but it could be
>>> potentially used for example for a digital potentiometer based
>>> brightness setting.
>>>
>>> Note that I didn't really had planned to implement the blinking support
>>> because I don't have a use case for it. So it would be either a feature
>>> that I would add because someone insists. Or it could be added in the
>>> future by a user who wants that feature (maybe Ubiquiti when they
>>> upgrade their kernel?).
>>>
>>> If it is a required feature for that driver: Please note that although
>>> of course I would do some basic tests during development it would be a
>>> mostly unused and therefore untested feature.
>>>
>>> Best regards
>>>
>>> Christian
>>>
>>
>> Hello,
>>
>> sorry for repeating my question. I assume I wrote to much text hiding
>> it: How should I name the driver?
>>
>> The name for the binding is clear (ubnt,acb-spi-led). Only the driver is
>> left (keep leds-spi-byte or rename to leds-ubnt-acb-spi or something
>> else).
>
> Why leds-spi-byte name would prevent addition of blink support? It can
> be always added basing on OF compatible. If it is to be generic SPI
> byte driver, then I'd use leds-spi-byte. Actually also the things
> like allowed brightness levels could be determined basing on that,
> and not in device tree, but in the driver.
>
> Please compare how e.g. drivers/leds/leds-is31fl32xx.c accomplishes
> that.
>
I would have expected that adding a lot of device specific code (in that
case blinking) to a multi-purpose driver would be bad style. But I'll go
for the generic name if that is the accepted way. I already mentioned
multiple times that my target is currently only the brightness. So the
device specific code maybe is added quite a bit in the future anyway in
which case it would still be possible to rename a part (if it isn't used
otherwise) or at least split it into it's own c-file.
I'll prepare a v4 in the near future and send it to the list. I only
learned that it would be a good idea to wait for at least a day for some
other opinions before doing that ;-)
Best regards
Christian
next prev parent reply other threads:[~2019-05-11 6:56 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-05 20:00 [PATCH v3 1/2] dt-bindings: leds: Add binding for spi-byte LED oss
2019-05-05 20:00 ` [PATCH v3 2/2] leds: spi-byte: add single byte SPI LED driver oss
2019-05-05 20:09 ` Jacek Anaszewski
2019-05-05 20:14 ` Christian Mauderer
2019-05-06 12:05 ` Dan Murphy
2019-05-06 12:59 ` Christian Mauderer
2019-05-06 14:58 ` Dan Murphy
2019-05-06 15:15 ` Pavel Machek
2019-05-06 15:29 ` Christian Mauderer
2019-05-06 17:40 ` Dan Murphy
2019-05-06 19:12 ` Christian Mauderer
2019-05-06 15:19 ` Christian Mauderer
2019-05-06 15:37 ` Dan Murphy
2019-05-06 15:42 ` Christian Mauderer
2019-05-06 16:21 ` [PATCH v3 1/2] dt-bindings: leds: Add binding for spi-byte LED Rob Herring
2019-05-06 16:28 ` Pavel Machek
2019-05-06 17:44 ` Rob Herring
2019-05-06 19:21 ` Christian Mauderer
2019-05-06 20:25 ` Pavel Machek
2019-05-07 9:52 ` Christian Mauderer
2019-05-10 19:50 ` Christian Mauderer
2019-05-10 20:42 ` Jacek Anaszewski
2019-05-11 6:56 ` Christian Mauderer [this message]
2019-05-11 9:11 ` Jacek Anaszewski
2019-05-06 17:03 ` Christian Mauderer
2019-05-06 17:59 ` Rob Herring
2019-05-06 19:28 ` Christian Mauderer
2019-05-06 19:06 ` Jacek Anaszewski
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=82b27718-3a58-6692-02e4-41b45c16b81e@c-mauderer.de \
--to=oss@c-mauderer.de \
--cc=devicetree@vger.kernel.org \
--cc=dmurphy@ti.com \
--cc=jacek.anaszewski@gmail.com \
--cc=linux-leds@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=pavel@ucw.cz \
--cc=robh+dt@kernel.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 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).