linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Shree Ramamoorthy <s-ramamoorthy@ti.com>
Cc: Julien Panis <jpanis@baylibre.com>,
	Gairuboina Sirisha <sirisha.gairuboina@ltts.com>,
	arnd@arndb.de, krzysztof.kozlowski+dt@linaro.org, lee@kernel.org,
	linux-kernel@vger.kernel.org, d-gole@ti.com
Subject: Re: [PATCH v1 0/3] TPS65224 PMIC driver
Date: Fri, 10 Nov 2023 05:26:44 +0100	[thread overview]
Message-ID: <2023111007-siamese-crepe-9775@gregkh> (raw)
In-Reply-To: <818ecf7b-cd91-45ca-bb92-65f10f1ca1f0@ti.com>

On Thu, Nov 09, 2023 at 10:22:00AM -0600, Shree Ramamoorthy wrote:
> > I compared 'tps65224.h' with 'tps6594.h', especially register mapping.
> > There are less resources in TPS65224, but I don't see any incompatibility
> > between both PMIC register mappings. Some registers are not used by
> > your TPS65224, and some interrupts are not used either (that's not a
> > problem, they will not trigger, so). Beyond that, I2C and PFSM drivers
> > perform the same things for both PMICs. That's why according to me,
> > nothing prevents from re-using TPS6594 drivers. Even for ADC, which is
> > specific to your TPS65224 indeed, the register range does not overlap
> > with any of TPS6594 registers. You could conditionally add this driver
> > (that's what we did in  'tps6594-core.c' for RTC driver, which is not
> > used
> > for one of the compatibles: you can do something similar for ADC).
> > You will probably add support for others TPS65224 drivers over the next
> > weeks: SPI, ESM, RTC, GPIOs, regulators, watchdog, and ADC. Most of them
> > should be compatible with both TPS6594 and TPS65224, I think (even
> > watchdog driver, which was not developed for TPS6594). ADC will not,
> > but as explained above you can easily deal with this one thanks to
> > the compatible.
> > For 'tps65224-core.c' only, a little bit of work might be necessary to
> > handle your TPS65224 specific functionalities. By using a different DT
> > compatible string, your driver can then select different options (or
> > maybe
> > even different register ranges) for some features based on the
> > compatible.
> > But except for 'tps65xx-core.c', there is "sufficient overlap" to justify
> > sharing as much as possible between TPS65224 and TPS6594, in my
> > opinion.
> 
> 
> TI is positioning TPS65224 as a separate family from TPS6594, but shared
> software drivers for PMICs that have different use cases would lead to
> confusion.

Why?  No one cares what a driver's name is, only that it works for their
hardware.  What different "use case" would cause problems here?

> Re-scoping the project to accommodate these suggestions would
> negatively affect the timeline we are trying to meet.

There are no timelines/deadlines with kernel development, sorry, that's
not our issue.

> We want to include the
> restructure that addresses the compatibility, register maps, and
> functionality similarities, but it would best solved after the upcoming
> deadline has been met.

Again, no deadline here.  Please do the work properly, that's all we
care about.

> With the growth of PMIC software device drivers, we
> would prefer to have a separate series with the suggested changes and proper
> naming convention to address that while they overlap, the two PMICs devices
> are not a subset.

Why does the name matter?  Again, all that a user cares about is if
their hardware device is supported, the name means nothing here.

Please do the correct thing and add support for this device to the
existing drivers, that's the correct thing to do.  You will save time
and energy and code in the long-run, which is the important thing.

There is a reason that Linux drivers are, on average, 1/3 smaller than
other operating systems.  And that's because they share common code with
other drivers.  You aren't allowed to just copy an existing one and add
a few changes and make a whole new driver, you need to modify the
current one.

thanks,

greg k-h

  reply	other threads:[~2023-11-10 18:23 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-26 13:32 [PATCH v1 0/3] TPS65224 PMIC driver Gairuboina Sirisha
2023-10-26 13:32 ` [PATCH v1 1/3] drivers: mfd: Add support for TPS65224 Gairuboina Sirisha
2023-10-27  7:02   ` Greg KH
2023-11-07 11:40     ` Gairuboina Sirisha
2023-10-26 13:32 ` [PATCH v1 2/3] drivers: mfd: Add support for TPS65224 i2c driver Gairuboina Sirisha
2023-10-27  7:02   ` Greg KH
2023-11-07 11:42     ` Gairuboina Sirisha
2023-10-27  8:08   ` Krzysztof Kozlowski
2023-11-07 11:50     ` Gairuboina Sirisha
2023-10-26 13:32 ` [PATCH v1 3/3] drivers: misc: Add support for TPS65224 pfsm driver Gairuboina Sirisha
2023-10-27  7:05   ` Greg KH
2023-11-07 11:44     ` Gairuboina Sirisha
2023-10-27  8:05   ` Krzysztof Kozlowski
2023-11-07 11:48     ` Gairuboina Sirisha
2023-11-03  8:52 ` [PATCH v1 0/3] TPS65224 PMIC driver Julien Panis
2023-11-07 11:37   ` Gairuboina Sirisha
2023-11-08  9:19     ` Julien Panis
2023-11-09 16:22       ` Shree Ramamoorthy
2023-11-10  4:26         ` Greg KH [this message]
2023-11-10 20:07           ` [EXTERNAL] " Shree Ramamoorthy
2023-11-17 11:05           ` 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=2023111007-siamese-crepe-9775@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=arnd@arndb.de \
    --cc=d-gole@ti.com \
    --cc=jpanis@baylibre.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lee@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=s-ramamoorthy@ti.com \
    --cc=sirisha.gairuboina@ltts.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;
as well as URLs for NNTP newsgroup(s).