All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Serge Semin <Sergey.Semin@baikalelectronics.ru>,
	Lee Jones <lee.jones@linaro.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	Hoan Tran <hoan@os.amperecomputing.com>,
	Serge Semin <fancer.lancer@gmail.com>,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>
Subject: Re: [PATCH v2 2/4] gpio: dwapb: Read GPIO base from gpio-base property
Date: Wed, 11 Aug 2021 16:05:07 +0300	[thread overview]
Message-ID: <YRPLA5xMDS5EnYrc@smile.fi.intel.com> (raw)
In-Reply-To: <CACRpkdazSqdOaoCknv=0wo3vw-FjrZKAy0rgh1hFbgd6au0vYw@mail.gmail.com>

On Wed, Aug 11, 2021 at 02:50:46PM +0200, Linus Walleij wrote:
> On Wed, Aug 4, 2021 at 6:15 PM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> 
> > For backward compatibility with some legacy devices introduce
> > a new (*) property gpio-base to read GPIO base. This will allow
> > further cleaning up of the driver.
> >
> > *) Note, it's not new for the GPIO library since the mockup driver
> >    is using it already.
> >
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > ---
> > v2: added check to ensure that the property won't be used by FW (Serge)
> >  drivers/gpio/gpio-dwapb.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/drivers/gpio/gpio-dwapb.c b/drivers/gpio/gpio-dwapb.c
> > index 4c7153cb646c..674e91e69cc5 100644
> > --- a/drivers/gpio/gpio-dwapb.c
> > +++ b/drivers/gpio/gpio-dwapb.c
> > @@ -584,6 +584,10 @@ static struct dwapb_platform_data *dwapb_gpio_get_pdata(struct device *dev)
> >
> >                 pp->gpio_base   = -1;
> >
> > +               /* For internal use only, new platforms mustn't exercise this */
> > +               if (is_software_node(fwnode))
> > +                       fwnode_property_read_u32(fwnode, "gpio-base", &pp->gpio_base);
> 
> You rewrite the code quicker than I can review  :D

Sorry for that :-)

> So this is elegant, I would prefer "linux,gpio-base" but the
> overall change is more important, with or without that change:

I'm okay with the either, but the thing is that gpio-base is already in use.
Perhaps in the future somebody can change both (gpio-mockup and this driver)
to use the proposed one (AFAIU we free to change it since it's not part of FW
interface).

> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Thanks!

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2021-08-11 13:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-04 16:00 [PATCH v2 1/4] gpio: dwapb: Unify ACPI enumeration checks in get_irq() and configure_irqs() Andy Shevchenko
2021-08-04 16:00 ` [PATCH v2 2/4] gpio: dwapb: Read GPIO base from gpio-base property Andy Shevchenko
2021-08-05 10:38   ` Andy Shevchenko
2021-08-05 12:08     ` Serge Semin
2021-08-11 12:50   ` Linus Walleij
2021-08-11 13:05     ` Andy Shevchenko [this message]
2021-08-04 16:00 ` [PATCH v2 3/4] mfd: intel_quark_i2c_gpio: Convert GPIO to use software nodes Andy Shevchenko
2021-08-05  8:02   ` Lee Jones
2021-08-11 13:00     ` Andy Shevchenko
2021-08-16  7:17       ` Lee Jones
2021-08-11 12:48   ` Linus Walleij
2021-08-04 16:00 ` [PATCH v2 4/4] gpio: dwapb: Get rid of legacy platform data Andy Shevchenko
2021-08-11 12:42 ` [PATCH v2 1/4] gpio: dwapb: Unify ACPI enumeration checks in get_irq() and configure_irqs() Andy Shevchenko
2021-08-11 12:55   ` Andy Shevchenko

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=YRPLA5xMDS5EnYrc@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=Sergey.Semin@baikalelectronics.ru \
    --cc=bgolaszewski@baylibre.com \
    --cc=fancer.lancer@gmail.com \
    --cc=hoan@os.amperecomputing.com \
    --cc=lee.jones@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.