mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Marco Felsch <m.felsch@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 4/4] i2c: gpio: add sda/scl-gpios property support
Date: Tue, 18 Jun 2019 15:15:16 +0200	[thread overview]
Message-ID: <20190618131516.6ipcgijgyn4phefd@pengutronix.de> (raw)
In-Reply-To: <20190618123952.h255xcm6qhxckmo4@pengutronix.de>

On Tue, Jun 18, 2019 at 02:39:52PM +0200, Marco Felsch wrote:
> Hi Antony,
> 
> On 19-06-18 13:50, Antony Pavlov wrote:
> > On Mon, 17 Jun 2019 12:00:56 +0200
> > Marco Felsch <m.felsch@pengutronix.de> wrote:
> > 
> > > The gpios property is marked as deprecated since kernel 4.15 so we
> > > should support the "new" mechanism too. The new mechanism has a higher
> > > priority than the deprecated one.
> > > 
> > > Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
> > > ---
> > >  drivers/i2c/busses/i2c-gpio.c | 27 +++++++++++++++++----------
> > >  1 file changed, 17 insertions(+), 10 deletions(-)
> > > 
> > > diff --git a/drivers/i2c/busses/i2c-gpio.c b/drivers/i2c/busses/i2c-gpio.c
> > > index 708193344a..9508adab06 100644
> > > --- a/drivers/i2c/busses/i2c-gpio.c
> > > +++ b/drivers/i2c/busses/i2c-gpio.c
> > > @@ -94,18 +94,25 @@ static int of_i2c_gpio_probe(struct device_node *np,
> > >  	if (!IS_ENABLED(CONFIG_OFDEVICE))
> > >  		return -ENODEV;
> > >  
> > > -	if (of_gpio_count(np) < 2)
> > > -		return -ENODEV;
> > > +	pdata->sda_pin = of_get_named_gpio_flags(np, "sda-gpios", 0, NULL);
> > > +	pdata->scl_pin = of_get_named_gpio_flags(np, "scl-gpios", 0, NULL);
> > > +
> > > +	if ((!gpio_is_valid(pdata->sda_pin) || !gpio_is_valid(pdata->sda_pin))
> > 
> > Double check of sda_pin here.
> > 
> > Can we change this line to
> > 
> >  +	if ((!gpio_is_valid(pdata->sda_pin) || !gpio_is_valid(pdata->scl_pin))
> 
> Thanks for covering that damn copy'n'paste failure.
> @Sascha
> Is it okay to prepare a follow up patch which you can squash?

Sure.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2019-06-18 13:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-17 10:00 [PATCH 0/4] Overall small fixes Marco Felsch
2019-06-17 10:00 ` [PATCH 1/4] ARM: phytec-som-imx6: update automount net entries Marco Felsch
2019-06-17 10:00 ` [PATCH 2/4] defaultenv-2: net: fix comment Marco Felsch
2019-06-17 10:00 ` [PATCH 3/4] commands: mmc_extcsd: fix extcsd value meanings Marco Felsch
2019-06-17 10:00 ` [PATCH 4/4] i2c: gpio: add sda/scl-gpios property support Marco Felsch
2019-06-18 10:50   ` Antony Pavlov
2019-06-18 12:39     ` Marco Felsch
2019-06-18 13:15       ` Sascha Hauer [this message]
2019-06-18  8:11 ` [PATCH 0/4] Overall small fixes Sascha Hauer

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=20190618131516.6ipcgijgyn4phefd@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=m.felsch@pengutronix.de \
    /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