From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
To: Rob Herring <robh@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Lee Jones <lee.jones@linaro.org>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-staging@lists.linux.dev
Subject: Re: [PATCH v5 (RESEND) 4/7] mfd: hi6421-spmi-pmic: move driver from staging
Date: Wed, 23 Jun 2021 11:13:09 +0200 [thread overview]
Message-ID: <20210623111309.215c5040@coco.lan> (raw)
In-Reply-To: <20210326211723.GB3867921@robh.at.kernel.org>
Hi Rob,
Em Fri, 26 Mar 2021 15:17:23 -0600
Rob Herring <robh@kernel.org> escreveu:
> On Thu, Mar 25, 2021 at 07:05:36PM +0100, Mauro Carvalho Chehab wrote:
> > This driver is ready for mainstream. So, move it out of staging.
> >
> > Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
> > ---
> > .../mfd/hisilicon,hi6421-spmi-pmic.yaml | 135 ++++++++
> > MAINTAINERS | 7 +
> > drivers/mfd/Kconfig | 16 +
> > drivers/mfd/Makefile | 1 +
> > drivers/mfd/hi6421-spmi-pmic.c | 297 ++++++++++++++++++
> > drivers/staging/hikey9xx/Kconfig | 18 --
> > drivers/staging/hikey9xx/Makefile | 1 -
> > drivers/staging/hikey9xx/hi6421-spmi-pmic.c | 297 ------------------
> > .../hikey9xx/hisilicon,hi6421-spmi-pmic.yaml | 135 --------
> > 9 files changed, 456 insertions(+), 451 deletions(-)
> > create mode 100644 Documentation/devicetree/bindings/mfd/hisilicon,hi6421-spmi-pmic.yaml
> > create mode 100644 drivers/mfd/hi6421-spmi-pmic.c
> > delete mode 100644 drivers/staging/hikey9xx/hi6421-spmi-pmic.c
> > delete mode 100644 drivers/staging/hikey9xx/hisilicon,hi6421-spmi-pmic.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/mfd/hisilicon,hi6421-spmi-pmic.yaml b/Documentation/devicetree/bindings/mfd/hisilicon,hi6421-spmi-pmic.yaml
> > new file mode 100644
> > index 000000000000..3b23ad56b31a
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/mfd/hisilicon,hi6421-spmi-pmic.yaml
> > @@ -0,0 +1,135 @@
...
>
> > +
> > + gpios:
>
> A named gpio is preferred (foo-gpios).
>
> What is this gpio for?
This is IRQ GPIOs.
Right now, the drive calls:
ddata->gpio = of_get_gpio(np, 0);
which is an alias for of_get_named_gpio_flags() that hardcode the
name "gpios":
static inline int of_get_gpio_flags(struct device_node *np, int index,
enum of_gpio_flags *flags)
{
return of_get_named_gpio_flags(np, "gpios", index, flags);
}
It shouldn't be hard to replace it by:
ddata->gpio = of_get_named_gpio_flags(np, "irq-gpio", 0, NULL);
but it sounds that most drivers just use of_get_gpio(). The only one
doing it differently seems to be this one:
$ git grep -A1 of_get_named_gpio_flags|grep irq
drivers/mfd/stmpe.c: pdata->irq_gpio = of_get_named_gpio_flags(np, "irq-gpio", 0,
drivers/mfd/stmpe.c- &pdata->irq_trigger);
While the usage of "gpios" (without a prefix) seems to be more usual:
$ git grep -l of_get_gpio|grep -vE '(of_gpio.h|gpiolib.c)'
arch/mips/lantiq/xway/vmmc.c
arch/powerpc/platforms/44x/warp.c
arch/powerpc/platforms/85xx/sgy_cts1000.c
drivers/input/touchscreen/auo-pixcir-ts.c
drivers/media/i2c/s5k6a3.c
drivers/mfd/hi6421-spmi-pmic.c
drivers/pcmcia/at91_cf.c
drivers/regulator/gpio-regulator.c
drivers/soc/fsl/qe/gpio.c
drivers/spi/spi-mpc52xx.c
drivers/usb/host/fhci-hcd.c
sound/soc/codecs/ssm2518.c
Yet, as this is a new driver, if you prefer, I can use the named
variant and use either "irq-gpio" or "irq-gpios". Just let me know
the preference.
Thanks,
Mauro
next prev parent reply other threads:[~2021-06-23 9:13 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-25 18:05 [PATCH v5 (RESEND) 0/7] Move Hisilicon 6421v600 SPMI and USB drivers out of staging Mauro Carvalho Chehab
2021-03-25 18:05 ` [PATCH v5 (RESEND) 1/7] phy: phy-hi3670-usb3: move driver from staging into phy Mauro Carvalho Chehab
2021-03-31 12:46 ` Vinod Koul
2021-03-25 18:05 ` [PATCH v5 (RESEND) 2/7] staging: hisilicon,hisi-spmi-controller.yaml cleanup schema Mauro Carvalho Chehab
2021-03-25 18:05 ` [PATCH v5 (RESEND) 3/7] spmi: hisi-spmi-controller: move driver from staging Mauro Carvalho Chehab
2021-03-26 21:11 ` Rob Herring
2021-03-26 21:14 ` Rob Herring
2021-03-25 18:05 ` [PATCH v5 (RESEND) 4/7] mfd: hi6421-spmi-pmic: " Mauro Carvalho Chehab
2021-03-26 21:17 ` Rob Herring
2021-06-23 9:13 ` Mauro Carvalho Chehab [this message]
2021-04-07 9:38 ` Lee Jones
2021-03-25 18:05 ` [PATCH v5 (RESEND) 5/7] regulator: hi6421v600-regulator: move it " Mauro Carvalho Chehab
2021-04-01 14:18 ` Mark Brown
2021-03-25 18:05 ` [PATCH v5 (RESEND) 6/7] dts: hisilicon: add support for the PMIC found on Hikey 970 Mauro Carvalho Chehab
2021-03-25 18:05 ` [PATCH v5 (RESEND) 7/7] dts: hisilicon: add support for USB3 " Mauro Carvalho Chehab
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=20210623111309.215c5040@coco.lan \
--to=mchehab+huawei@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=robh@kernel.org \
/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).