devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lee Jones <lee@kernel.org>
To: Matt Ranostay <mranostay@ti.com>
Cc: nm@ti.com, linux-rtc@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
	Keerthy <j-keerthy@ti.com>
Subject: Re: [PATCH 2/4] MFD: TPS6594x: Add new mfd device for TPS6594x PMIC
Date: Thu, 11 Aug 2022 08:04:01 +0100	[thread overview]
Message-ID: <YvSp4TOgRhoet1eY@google.com> (raw)
In-Reply-To: <YvSiuElc/LM5g7hl@ubuntu>

On Wed, 10 Aug 2022, Matt Ranostay wrote:

> On Wed, Aug 10, 2022 at 12:27:25PM +0100, Lee Jones wrote:
> > On Thu, 04 Aug 2022, Matt Ranostay wrote:
> > 
> > > From: Keerthy <j-keerthy@ti.com>
> > > 
> > > The TPS6594x chip is a PMIC, and contains the following components:
> > > 
> > > - Regulators
> > > - GPIO controller
> > > - RTC
> > > 
> > > However initially only RTC is supported.
> > > 
> > > Signed-off-by: Keerthy <j-keerthy@ti.com>
> > > Signed-off-by: Matt Ranostay <mranostay@ti.com>
> > > ---
> > >  drivers/mfd/Kconfig          |  14 +++++
> > >  drivers/mfd/Makefile         |   1 +
> > >  drivers/mfd/tps6594x.c       | 106 +++++++++++++++++++++++++++++++++++
> > >  include/linux/mfd/tps6594x.h |  66 ++++++++++++++++++++++
> > >  4 files changed, 187 insertions(+)
> > >  create mode 100644 drivers/mfd/tps6594x.c
> > >  create mode 100644 include/linux/mfd/tps6594x.h
> > > 
> > > diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
> > > index abb58ab1a1a4..cfb5b3d66b76 100644
> > > --- a/drivers/mfd/Kconfig
> > > +++ b/drivers/mfd/Kconfig
> > > @@ -1547,6 +1547,20 @@ config MFD_TI_LP873X
> > >  	  This driver can also be built as a module. If so, the module
> > >  	  will be called lp873x.
> > >  
> > > +config MFD_TPS6594X
> > > +	tristate "TI TPS6594X Power Management IC"
> > > +	depends on I2C
> > > +	select MFD_CORE
> > > +	select REGMAP_I2C
> > > +	help
> > > +	  If you say yes here then you get support for the TPS6594X series of
> > > +	  Power Management Integrated Circuits (PMIC).
> > > +	  These include voltage regulators, RTS, configurable
> > > +	  General Purpose Outputs (GPO) that are used in portable devices.
> > > +
> > > +	  This driver can also be built as a module. If so, the module
> > > +	  will be called tps7694x.
> > > +
> > >  config MFD_TI_LP87565
> > >  	tristate "TI LP87565 Power Management IC"
> > >  	depends on I2C && OF
> > > diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile
> > > index 858cacf659d6..7ff6a8a57d55 100644
> > > --- a/drivers/mfd/Makefile
> > > +++ b/drivers/mfd/Makefile
> > > @@ -105,6 +105,7 @@ obj-$(CONFIG_MFD_TPS65910)	+= tps65910.o
> > >  obj-$(CONFIG_MFD_TPS65912)	+= tps65912-core.o
> > >  obj-$(CONFIG_MFD_TPS65912_I2C)	+= tps65912-i2c.o
> > >  obj-$(CONFIG_MFD_TPS65912_SPI)  += tps65912-spi.o
> > > +obj-$(CONFIG_MFD_TPS6594X)	+= tps6594x.o
> > >  obj-$(CONFIG_MENELAUS)		+= menelaus.o
> > >  
> > >  obj-$(CONFIG_TWL4030_CORE)	+= twl-core.o twl4030-irq.o twl6030-irq.o
> > > diff --git a/drivers/mfd/tps6594x.c b/drivers/mfd/tps6594x.c
> > > new file mode 100644
> > > index 000000000000..519162cc1fbe
> > > --- /dev/null
> > > +++ b/drivers/mfd/tps6594x.c
> > > @@ -0,0 +1,106 @@
> > > +// SPDX-License-Identifier: GPL-2.0-or-later
> > > +/*
> > > + * tps6594x.c  --  TI TPS6594x chip family multi-function driver
> > 
> > No filenames in comments please.
> > 
> > Also, there are too many spaces around the '--'.
> > 
> > It's not a "multi-function driver" it's a PMIC Core driver.
> >
> 
> Noted. Will change to PMIC core driver to be more concise.
> 
> > > + * Copyright (C) 2022 Texas Instruments Incorporated - https://www.ti.com/
> > > + *
> > > + * Author: Keerthy <j-keerthy@ti.com>
> > > + */
> > > +
> > > +#include <linux/interrupt.h>
> > > +#include <linux/mfd/core.h>
> > > +#include <linux/module.h>
> > > +#include <linux/of_device.h>
> > > +#include <linux/i2c.h>
> > > +#include <linux/regmap.h>
> > 
> > Alphabetical.
> > 
> > > +#include <linux/mfd/tps6594x.h>
> > > +
> > > +static const struct regmap_config tps6594x_regmap_config = {
> > > +	.reg_bits = 8,
> > > +	.val_bits = 8,
> > > +	.max_register = TPS6594X_REG_MAX,
> > > +};
> > > +
> > > +static const struct mfd_cell tps6594x_cells[] = {
> > > +	{ .name = "tps6594x-rtc", },
> > > +};
> > 
> > Where are the rest of the devices?
> > 
> > This is not an MFD with only one device.
> 
> There are other devices, however there isn't any drivers currently for them
> just the RTC. Should there be placeholders for the gpio, and regulators even
> if support currently doesn't exist.

If support doesn't exist for the other devices, just submit an
independent RTC driver.

-- 
Lee Jones [李琼斯]

  reply	other threads:[~2022-08-11  7:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-05  6:43 [PATCH 0/4] mfd: add tps6594x support for j7200 platform Matt Ranostay
2022-08-05  6:43 ` [PATCH 1/4] Documentation: tps6594x: Add DT bindings for the TPS6594x PMIC Matt Ranostay
2022-08-05 14:14   ` Rob Herring
2022-08-05  6:43 ` [PATCH 2/4] MFD: TPS6594x: Add new mfd device for " Matt Ranostay
2022-08-10 11:27   ` Lee Jones
2022-08-11  6:33     ` Matt Ranostay
2022-08-11  7:04       ` Lee Jones [this message]
2022-08-05  6:43 ` [PATCH 3/4] rtc: rtc-tps6594x: Add support for TPS6594X PMIC RTC Matt Ranostay
2022-08-05  6:43 ` [PATCH 4/4] arm64: dts: ti: k3-j7200-common-proc-board: Add TPS6594x PMIC node Matt Ranostay

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=YvSp4TOgRhoet1eY@google.com \
    --to=lee@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=j-keerthy@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=mranostay@ti.com \
    --cc=nm@ti.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).