devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lee Jones <lee@kernel.org>
To: Naresh Solanki <naresh.solanki@9elements.com>
Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	Patrick Rudolph <patrick.rudolph@9elements.com>,
	Marcello Sylvester Bauer <sylv@sylv.io>
Subject: Re: [PATCH v11 2/2] mfd: max597x: Add support for MAX5970 and MAX5978
Date: Fri, 23 Dec 2022 12:36:04 +0000	[thread overview]
Message-ID: <Y6WgtNZfeLMwPhCh@google.com> (raw)
In-Reply-To: <50212c7a-6525-4a91-f9a3-c60024b5e91d@9elements.com>

On Wed, 14 Dec 2022, Naresh Solanki wrote:

> Hi Lee,
> 
> On 14-12-2022 03:17 pm, Lee Jones wrote:
> > On Wed, 14 Dec 2022, Naresh Solanki wrote:
> > 
> > > Hi Lee
> > > 
> > > On 08-12-2022 05:53 pm, Lee Jones wrote:
> > > > On Fri, 18 Nov 2022, Naresh Solanki wrote:
> > > > 
> > > > > 
> > > > > 
> > > > > On 17-11-2022 03:45 pm, Lee Jones wrote:
> > > > > > On Wed, 16 Nov 2022, Naresh Solanki wrote:
> > > > > > 
> > > > > > > From: Patrick Rudolph <patrick.rudolph@9elements.com>
> > > > > > > 
> > > > > > > Implement a regulator driver with IRQ support for fault management.
> > > > > > > Written against documentation [1] and [2] and tested on real hardware.
> > > > > > > 
> > > > > > > Every channel has its own regulator supplies nammed 'vss1-supply' and
> > > > > > > 'vss2-supply'. The regulator supply is used to determine the output
> > > > > > > voltage, as the smart switch provides no output regulation.
> > > > > > > The driver requires the 'shunt-resistor-micro-ohms' property to be
> > > > > > > present in Device Tree to properly calculate current related
> > > > > > > values.
> > > > > > > 
> > > > > > > Datasheet links:
> > > > > > > 1: https://datasheets.maximintegrated.com/en/ds/MAX5970.pdf
> > > > > > > 2: https://datasheets.maximintegrated.com/en/ds/MAX5978.pdf
> > > > > > > 
> > > > > > > Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
> > > > > > > Co-developed-by: Marcello Sylvester Bauer <sylv@sylv.io>
> > > > > > > Signed-off-by: Marcello Sylvester Bauer <sylv@sylv.io>
> > > > > > > Co-developed-by: Naresh Solanki <Naresh.Solanki@9elements.com>
> > > > > > > Signed-off-by: Naresh Solanki <Naresh.Solanki@9elements.com>
> > > > > > > ---
> > > > > > >     drivers/mfd/Kconfig         |  12 +++++
> > > > > > >     drivers/mfd/Makefile        |   1 +
> > > > > > >     drivers/mfd/max597x.c       |  93 +++++++++++++++++++++++++++++++++
> > > > > > >     include/linux/mfd/max597x.h | 101 ++++++++++++++++++++++++++++++++++++
> > > > > > >     4 files changed, 207 insertions(+)
> > > > > > >     create mode 100644 drivers/mfd/max597x.c
> > > > > > >     create mode 100644 include/linux/mfd/max597x.h
> > > > > > 
> > > > > > Ignoring my comments won't make them go away. :)
> > > > > > 
> > > > > > Please tell me why you need a whole new driver, instead of adding
> > > > > > support to simple-mfd-i2c?
> > > > > > 
> > > > > I felt current implementation to be simpler, clearer & straight forward.
> > > > 
> > > > If you can make it work with simple-mfd-i2c, please do so.
> > > simple-mfd-i2c doesn't has mechanism to pass device type(max5978 vs
> > > max5970).
> > 
> > `git grep silergy,sy7636a -- drivers/mfd`
> I did check the driver but there is no mechanism to distinguish between chip
> variant i.e., 597x-regulator driver should be able to distinguish between
> max5978 vs max5970 chip type.

How is it doing that presently?

Why can't the Regulator driver read the DT or match on the parent's
compatible for itself?

Providing a 100 line driver just to figure out a single value that is
only going to be used in a single driver is a no-go.  Please find a
better way to solve this.

-- 
Lee Jones [李琼斯]

  reply	other threads:[~2022-12-23 12:36 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-16 20:58 [PATCH v11 0/2] mfd: max597x: Add support for max597x Naresh Solanki
2022-11-16 20:58 ` [PATCH v11 1/2] dt-bindings: mfd: Add MAX5970 and MAX5978 Naresh Solanki
2022-11-17 16:53   ` Krzysztof Kozlowski
2022-11-16 20:58 ` [PATCH v11 2/2] mfd: max597x: Add support for " Naresh Solanki
2022-11-17 10:15   ` Lee Jones
2022-11-18  8:50     ` Naresh Solanki
2022-12-08 12:23       ` Lee Jones
2022-12-14  8:40         ` Naresh Solanki
2022-12-14  9:47           ` Lee Jones
2022-12-14 10:31             ` Naresh Solanki
2022-12-23 12:36               ` Lee Jones [this message]
2023-01-03  6:04                 ` Naresh Solanki
2023-01-09 17:33                   ` Lee Jones

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=Y6WgtNZfeLMwPhCh@google.com \
    --to=lee@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=naresh.solanki@9elements.com \
    --cc=patrick.rudolph@9elements.com \
    --cc=sylv@sylv.io \
    /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).