All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Murphy <dmurphy@ti.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: Jacek Anaszewski <jacek.anaszewski@gmail.com>,
	robh+dt@kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org
Subject: Re: [PATCH v6 1/2] dt-bindings: leds: Add bindings for lm3697 driver
Date: Tue, 11 Sep 2018 16:05:40 -0500	[thread overview]
Message-ID: <ff9f932f-a9ae-b4fd-54d0-60be549534cb@ti.com> (raw)
In-Reply-To: <20180911205504.GA31219@amd>

On 09/11/2018 03:55 PM, Pavel Machek wrote:
> Hi!
> 
>>>>>>>> And I think Jacek pointed out that the bindings references in this bindings
>>>>>>>> don't even exist.
>>>>>>>>
>>>>>>>> I am thinking we need to deprecate this MFD driver and consolidate these drivers
>>>>>>>> in the LED directory as we indicated before.  I did not find any ti-lmu support
>>>>>>>> code.
>>>>>>>>
>>>>>>>> ti-lmu common core code and then the LED children appending the feature differentiation.
>>>>>>>
>>>>>>>> Need some maintainer weigh in here.
>>>>>>>
>>>>>>> Hehe. I'm maintnainer. Fun.
>>>>>>
>>>>>> I know.  I want to see if there was any other opinion.  Especially for the LED driver.
>>>>>>
>>>>> [...]
>>>>>
>>>>> I have a question - is this lm3697 LED controller a cell of some MFD
>>>>> device? Or is it a self-contained chip?
>>>>>
>>>>
>>>> This is a self contained chip.  And the LM3697 only function is a LED driver.
>>>> It does not have any other special functions like the LM363X drivers for GPIO and Regulator support.
>>>
>>> This is an argument for merging it as a standalone LED class driver
>>> then. It is even more justifiable, taking into account uncertainties
>>> related to the proper way of adding the support for it to the existing
>>> MFD driver, whereas the code reuse would be the only advantage of having
>>> thus support in MFD subsystem.
>>
>> Does the argument carry over to the other devices?
> 
> We really need something reasonable, that works for stand-alone LEDs,
> and also works for LEDs that are part of MFD when the hardware is similar.

I agree that LED drivers that have other functional blocks beyond driving a LED
chain belongs in the MFD space.  The amount of code that is similar is very small.

And like I pointed out Droid 4 may be only one use case where it makes sense to combine
all the LED code into a central place.  But most customers will just want a LED specific
driver to maintain.

> 
>> Like the LM3632 (part of the ti-lmu) has flash and torch and no other special functions
>> so it would look like the lm3601x family with different register mappings.
>>
>> The LM3631 seems to also be just a LED driver with no extra functionality
>>
>> I could go buy an EVM and put together a driver for that device as well using the lm3601x as
>> reference.
> 
> I do have hardware with lm3532. I can test patches, and I guess I can
> port driver easily if it is obvious how to do that.


I can get the LM3532 EVM.  I wrote a similar driver for the original Droid 10 years ago.
Upstreaming was not a priority for that company.

Here is a reference to the LM3530 code from back in the day on Google OMAP kernel.
https://android.googlesource.com/kernel/omap/+/android-omap-3.0/drivers/leds/leds-lm3530.c

Otherwise I can create the LM3532 driver as well and look at the LM3530

Dan

> 
> 									Pavel
> 


-- 
------------------
Dan Murphy

WARNING: multiple messages have this Message-ID (diff)
From: Dan Murphy <dmurphy@ti.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: Jacek Anaszewski <jacek.anaszewski@gmail.com>,
	<robh+dt@kernel.org>, <devicetree@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <linux-leds@vger.kernel.org>
Subject: Re: [PATCH v6 1/2] dt-bindings: leds: Add bindings for lm3697 driver
Date: Tue, 11 Sep 2018 16:05:40 -0500	[thread overview]
Message-ID: <ff9f932f-a9ae-b4fd-54d0-60be549534cb@ti.com> (raw)
In-Reply-To: <20180911205504.GA31219@amd>

On 09/11/2018 03:55 PM, Pavel Machek wrote:
> Hi!
> 
>>>>>>>> And I think Jacek pointed out that the bindings references in this bindings
>>>>>>>> don't even exist.
>>>>>>>>
>>>>>>>> I am thinking we need to deprecate this MFD driver and consolidate these drivers
>>>>>>>> in the LED directory as we indicated before.  I did not find any ti-lmu support
>>>>>>>> code.
>>>>>>>>
>>>>>>>> ti-lmu common core code and then the LED children appending the feature differentiation.
>>>>>>>
>>>>>>>> Need some maintainer weigh in here.
>>>>>>>
>>>>>>> Hehe. I'm maintnainer. Fun.
>>>>>>
>>>>>> I know.  I want to see if there was any other opinion.  Especially for the LED driver.
>>>>>>
>>>>> [...]
>>>>>
>>>>> I have a question - is this lm3697 LED controller a cell of some MFD
>>>>> device? Or is it a self-contained chip?
>>>>>
>>>>
>>>> This is a self contained chip.  And the LM3697 only function is a LED driver.
>>>> It does not have any other special functions like the LM363X drivers for GPIO and Regulator support.
>>>
>>> This is an argument for merging it as a standalone LED class driver
>>> then. It is even more justifiable, taking into account uncertainties
>>> related to the proper way of adding the support for it to the existing
>>> MFD driver, whereas the code reuse would be the only advantage of having
>>> thus support in MFD subsystem.
>>
>> Does the argument carry over to the other devices?
> 
> We really need something reasonable, that works for stand-alone LEDs,
> and also works for LEDs that are part of MFD when the hardware is similar.

I agree that LED drivers that have other functional blocks beyond driving a LED
chain belongs in the MFD space.  The amount of code that is similar is very small.

And like I pointed out Droid 4 may be only one use case where it makes sense to combine
all the LED code into a central place.  But most customers will just want a LED specific
driver to maintain.

> 
>> Like the LM3632 (part of the ti-lmu) has flash and torch and no other special functions
>> so it would look like the lm3601x family with different register mappings.
>>
>> The LM3631 seems to also be just a LED driver with no extra functionality
>>
>> I could go buy an EVM and put together a driver for that device as well using the lm3601x as
>> reference.
> 
> I do have hardware with lm3532. I can test patches, and I guess I can
> port driver easily if it is obvious how to do that.


I can get the LM3532 EVM.  I wrote a similar driver for the original Droid 10 years ago.
Upstreaming was not a priority for that company.

Here is a reference to the LM3530 code from back in the day on Google OMAP kernel.
https://android.googlesource.com/kernel/omap/+/android-omap-3.0/drivers/leds/leds-lm3530.c

Otherwise I can create the LM3532 driver as well and look at the LM3530

Dan

> 
> 									Pavel
> 


-- 
------------------
Dan Murphy

  reply	other threads:[~2018-09-11 21:05 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-06 13:50 [PATCH v6 1/2] dt-bindings: leds: Add bindings for lm3697 driver Dan Murphy
2018-09-06 13:50 ` Dan Murphy
2018-09-06 13:50 ` [PATCH v6 2/2] leds: lm3697: Introduce the " Dan Murphy
2018-09-06 13:50   ` Dan Murphy
2018-09-06 21:16 ` [PATCH v6 1/2] dt-bindings: leds: Add bindings for " Pavel Machek
2018-09-07 13:20   ` Dan Murphy
2018-09-07 13:20     ` Dan Murphy
2018-09-07 13:32     ` Pavel Machek
2018-09-07 13:52       ` Dan Murphy
2018-09-07 13:52         ` Dan Murphy
2018-09-08 19:53         ` Jacek Anaszewski
2018-09-10 14:37           ` Dan Murphy
2018-09-10 14:37             ` Dan Murphy
2018-09-10 19:07             ` Jacek Anaszewski
2018-09-10 19:51               ` Dan Murphy
2018-09-10 19:51                 ` Dan Murphy
2018-09-11 18:27                 ` Jacek Anaszewski
2018-09-11 18:37                   ` Dan Murphy
2018-09-11 18:37                     ` Dan Murphy
2018-09-11 20:55                 ` Pavel Machek
2018-09-11 21:05                   ` Dan Murphy [this message]
2018-09-11 21:05                     ` Dan Murphy
2018-09-10 15:41           ` Pavel Machek

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=ff9f932f-a9ae-b4fd-54d0-60be549534cb@ti.com \
    --to=dmurphy@ti.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jacek.anaszewski@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --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 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.