All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Rob Herring <robh@kernel.org>
Cc: Dan Murphy <dmurphy@ti.com>,
	jacek.anaszewski@gmail.com, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org,
	lee.jones@linaro.org, tony@atomide.com
Subject: Re: [PATCH v4 5/7] dt-bindings: ti-lmu: Modify dt bindings for the LM3633
Date: Wed, 24 Oct 2018 20:38:35 +0200	[thread overview]
Message-ID: <20181024183835.GA17911@amd> (raw)
In-Reply-To: <20181024143506.GA9327@bogus>

[-- Attachment #1: Type: text/plain, Size: 3864 bytes --]

On Wed 2018-10-24 09:35:06, Rob Herring wrote:
> On Wed, Oct 24, 2018 at 11:23:28AM +0200, Pavel Machek wrote:
> > On Tue 2018-10-23 12:06:21, Dan Murphy wrote:
> > > The LM3633 is a single function LED driver. The single function LED
> > > driver needs to reside in the LED directory as a dedicated LED driver
> > > and not as a MFD device.  The device does have common brightness and ramp
> > > features and those can be accomodated by a TI LMU framework.
> > > 
> > > The LM3633 dt binding needs to be moved from the ti-lmu.txt and a dedicated
> > > LED dt binding needs to be added.  The new LM3633 LED dt binding will then
> > > reside in the Documentation/devicetree/bindings/leds directory and follow the
> > > current LED and general bindings guidelines.
> > 
> > What?
> > 
> > >  .../devicetree/bindings/leds/leds-lm3633.txt  | 102 ++++++++++++++++++
> > >  .../devicetree/bindings/mfd/ti-lmu.txt        |  48 ---------
> > >  2 files changed, 102 insertions(+), 48 deletions(-)
> > >  create mode 100644
> > >  Documentation/devicetree/bindings/leds/leds-lm3633.txt
> > 
> > > index 920f910be4e9..573e88578d3d 100644
> > > --- a/Documentation/devicetree/bindings/mfd/ti-lmu.txt
> > > +++ b/Documentation/devicetree/bindings/mfd/ti-lmu.txt
> > > @@ -7,7 +7,6 @@ TI LMU driver supports lighting devices below.
> > >    LM3532       Backlight
> > >    LM3631       Backlight and regulator
> > >    LM3632       Backlight and regulator
> > > -  LM3633       Backlight, LED and fault monitor
> > >    LM3695       Backlight
> > 
> > Are you seriously proposing to take one binding and split it into 6
> > copy&pasted ones?
> > 
> > That's not the way we do development. NAK.
> > 
> > We don't want to have copy & pasted code. We also don't want to have
> > copy & pasted bindings. Nor changelogs, for that matter.
> 
> I looked at the LM3633 and LM3632 datasheets. They look quite different 
> to me and should be separate IMO. Just looking at different LED 
> functions and GPIO control lines is enough to make that determination. 
> The LM3697 looks like a subset of LM3633 at least at a schematic 
> diagram level, so maybe those can be shared.

Well, they have blocks in common, and are currently handled by one
driver. Two .c files proposed here shared 80% code when I reviewed
previous version. Original merge documentation is:

https://groups.google.com/forum/#!msg/fa.linux.kernel/hWvxahP7INw/Y2EDZmjoAQAJ

TI LMU(Lighting Management Unit) driver supports lighting devices
below.
 
 	                 Enable pin  Backlights  HWMON  LEDs   Regulators
	                 ----------  ----------  -----  ----  ------------
		  LM3532       o           o         x     x        x
		  LM3631       o           o         x     x    5 regulators
		  LM3632       o           o         x     x    3 regulators
		  LM3633       o           o         o     o        x
		  LM3695       o           o         x     x        x
		  LM3697       o           o         o     x        x


I thought I understood that table, but maybe I'm confused. Anyway,
there seemed to be "enough" to share.

> While we could litter the binding with conditions on properties 
> depending on specific compatible strings (such as which GPIO properties 
> apply to which compatible), that is going to be problematic down the 
> line when we convert to json-schema[1].

Well, situation where different devices share common features /
function blocks is going to be somehow common. Not sure how to solve
it in json, maybe the properties can simply be marked optional?, but I
guess it will need solving somehow.

> [1] https://lkml.org/lkml/2018/10/5/883

								Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

  reply	other threads:[~2018-10-24 18:38 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-23 17:06 [PATCH v4 1/7] leds: add TI LMU backlight driver Dan Murphy
2018-10-23 17:06 ` Dan Murphy
2018-10-23 17:06 ` [PATCH v4 2/7] dt-bindings: ti-lmu: Modify dt bindings for the LM3697 Dan Murphy
2018-10-23 17:06   ` Dan Murphy
2018-10-24  9:04   ` Pavel Machek
2018-10-24 12:07     ` Dan Murphy
2018-10-24 12:07       ` Dan Murphy
2018-10-24 13:43       ` Pavel Machek
2018-10-24 14:54       ` Rob Herring
2018-10-25 18:07         ` Dan Murphy
2018-10-25 18:07           ` Dan Murphy
2018-10-25 18:27           ` Jacek Anaszewski
2018-10-25 18:32             ` Dan Murphy
2018-10-25 18:32               ` Dan Murphy
2018-10-25 19:54             ` Rob Herring
2018-10-26  8:30             ` Pavel Machek
2018-10-26  8:37             ` Pavel Machek
2018-10-30 13:40               ` Dan Murphy
2018-10-30 13:40                 ` Dan Murphy
2019-03-02 23:07                 ` Pavel Machek
2019-03-04 19:14                   ` Dan Murphy
2019-03-04 19:14                     ` Dan Murphy
2018-10-24 14:49   ` Rob Herring
2018-10-25 17:56     ` Dan Murphy
2018-10-25 17:56       ` Dan Murphy
2018-10-23 17:06 ` [PATCH v4 3/7] mfd: ti-lmu: Remove support for LM3697 Dan Murphy
2018-10-23 17:06   ` Dan Murphy
2018-10-23 17:06 ` [PATCH v4 4/7] leds: lm3697: Introduce the lm3697 driver Dan Murphy
2018-10-23 17:06   ` Dan Murphy
2018-10-23 17:06 ` [PATCH v4 5/7] dt-bindings: ti-lmu: Modify dt bindings for the LM3633 Dan Murphy
2018-10-23 17:06   ` Dan Murphy
2018-10-24  9:23   ` Pavel Machek
2018-10-24 14:35     ` Rob Herring
2018-10-24 18:38       ` Pavel Machek [this message]
2018-10-24 21:50         ` Rob Herring
2018-10-25 18:01     ` Dan Murphy
2018-10-25 18:01       ` Dan Murphy
2018-10-23 17:06 ` [PATCH v4 6/7] mfd: ti-lmu: Remove support for LM3633 Dan Murphy
2018-10-23 17:06   ` Dan Murphy
2018-10-23 17:06 ` [PATCH v4 7/7] leds: lm3633: Introduce the lm3633 driver Dan Murphy
2018-10-23 17:06   ` Dan Murphy
2018-10-24  9:14 ` [PATCH v4 1/7] leds: add TI LMU backlight driver Pavel Machek
2018-10-24 12:27   ` Dan Murphy
2018-10-24 12:27     ` Dan Murphy
2018-10-24 13:17     ` 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=20181024183835.GA17911@amd \
    --to=pavel@ucw.cz \
    --cc=devicetree@vger.kernel.org \
    --cc=dmurphy@ti.com \
    --cc=jacek.anaszewski@gmail.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=tony@atomide.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.