Linux Framebuffer Layer development
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Svyatoslav Ryhel <clamor95@gmail.com>
Cc: "Lee Jones" <lee@kernel.org>, "Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Jonathan Cameron" <jic23@kernel.org>,
	"Lars-Peter Clausen" <lars@metafoo.de>,
	"Pavel Machek" <pavel@ucw.cz>,
	"Daniel Thompson" <danielt@kernel.org>,
	"Jingoo Han" <jingoohan1@gmail.com>,
	"Helge Deller" <deller@gmx.de>,
	"Uwe Kleine-König" <u.kleine-koenig@baylibre.com>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-iio@vger.kernel.org, linux-leds@vger.kernel.org,
	dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org
Subject: Re: [PATCH v2 2/2] mfd: lm3533: convert to use OF
Date: Wed, 19 Feb 2025 17:06:41 +0200	[thread overview]
Message-ID: <Z7XzgfHcjyK_UZKv@smile.fi.intel.com> (raw)
In-Reply-To: <CAPVz0n1_WQyOHhtEVAh53uhEUhZvqqZSEJh6XALtSrVfkMSLYw@mail.gmail.com>

On Wed, Feb 19, 2025 at 04:36:38PM +0200, Svyatoslav Ryhel wrote:
> ср, 19 лют. 2025 р. о 16:27 Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> пише:
> > On Tue, Feb 18, 2025 at 03:27:00PM +0200, Svyatoslav Ryhel wrote:
> > > Remove platform data and fully relay on OF and device tree
> > > parsing and binding devices.
> >
> > Thanks for following the advice, but the problem with this change as it does
> > too much at once. It should be split to a few simpler ones.
> > On top of that, this removes MFD participation from the driver but leaves it
> > under MFD realm. Moreover, looking briefly at the code it looks like it open
> > codes the parts of MFD. The latter needs a very goo justification which commit
> > message is missing.

...

> Splitting this into a set of commits would be nearly impossible,

I don't buy this.
One patch can introduce device property support.
Another one removes the old platform data interface.

So, at bare minimum there will be two patches. (Besides the advice to have
two more.)

> original driver does not relay on OF, it relays on platform data.

And?..

> Ripping out platform data will leave behind a broken useless driver.

Hmm... This cna be the case if and only if we have the user in kernel.
Is this the case?

> So it has to be done simultaneously.

Nope.

> MFD part is removed since MFD cells binding is unconditional, while
> the device supports any amount of children grater then one. For
> example, my  device uses only backlight at bank A, while all other
> subdevices are not present and used. This patch switches to dynamic
> bind of children.

MFD does the same. Please, take your time and get familiar with how MFD works.

...

> > > +     device_property_read_string(&pdev->dev, "linux,default-trigger",
> > > +                                 &led->cdev.default_trigger);
> >
> > One prerequisite patch you probably want is an introduction of
> >
> >         struct device *dev = &pdev->dev;
> >
> > in the respective ->probe() implementations. This, in particular, makes the
> > above lines shorter and fit one line.
> 
> This is not a scope of this patchset. Original driver uses &pdev->dev

Indirectly it is. The change you are proposing tries to continue using this
construction with making needlessly longer.

...

> > > +             if (!strcmp(comatible, "ti,lm3533-als"))
> > > +                     lm3533->have_als = 1;
> >
> > If you end up having this, it's not the best what we can do. OF ID tables have
> > a driver_data field exactly for the cases like this.
> 
> This is required by core driver to handle some attributes and is here
> solely not to touch those in this patch.

What does this mean?

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2025-02-19 15:07 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-18 13:26 [PATCH v2 0/2] mfd: lm3533: convert to use OF Svyatoslav Ryhel
2025-02-18 13:26 ` [PATCH v2 1/2] dt-bindings: mfd: Document TI LM3533 MFD Svyatoslav Ryhel
2025-02-21 20:38   ` Rob Herring
2025-02-22  7:01     ` Svyatoslav Ryhel
2025-02-22 14:26       ` Jonathan Cameron
2025-02-22 14:29   ` Jonathan Cameron
2025-02-22 14:39     ` Svyatoslav Ryhel
2025-02-22 17:27       ` Jonathan Cameron
2025-02-18 13:27 ` [PATCH v2 2/2] mfd: lm3533: convert to use OF Svyatoslav Ryhel
2025-02-19 14:26   ` Andy Shevchenko
2025-02-19 14:36     ` Svyatoslav Ryhel
2025-02-19 15:06       ` Andy Shevchenko [this message]
2025-02-19 15:13         ` Svyatoslav Ryhel
2025-02-19 15:23           ` Andy Shevchenko
2025-02-19 17:39             ` Svyatoslav Ryhel
2025-02-19 20:18               ` Andy Shevchenko
2025-02-19 16:02   ` kernel test robot
2025-02-19 20:20     ` Andy Shevchenko
2025-02-19 23:51   ` kernel test robot

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=Z7XzgfHcjyK_UZKv@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=clamor95@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=danielt@kernel.org \
    --cc=deller@gmx.de \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jic23@kernel.org \
    --cc=jingoohan1@gmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=lars@metafoo.de \
    --cc=lee@kernel.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=robh@kernel.org \
    --cc=u.kleine-koenig@baylibre.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox