public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nishad Kamdar <nishadkamdar@gmail.com>
To: Johan Hovold <johan@kernel.org>
Cc: Johan Hovold <johan@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Alex Elder <elder@kernel.org>,
	Rui Miguel Silva <rmfrfs@gmail.com>,
	greybus-dev@lists.linaro.org, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org, nishadkamdar@gmail.com
Subject: Re: [PATCH v4 4/4] staging: greybus: arche-platform: Switch to the gpio descriptor interface
Date: Thu, 10 Jan 2019 23:13:43 +0530	[thread overview]
Message-ID: <20190110174341.GD24566@nishad> (raw)
In-Reply-To: <20190109113547.GL14782@localhost>

On Wed, Jan 09, 2019 at 12:35:47PM +0100, Johan Hovold wrote:
> On Sat, Dec 22, 2018 at 08:23:02PM +0530, Nishad Kamdar wrote:
> > Use the gpiod interface instead of the deprecated
> > old non-descriptor interface.
> > 
> > Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com>
> > ---
> > Changes in v4:
> >  - Move 'gpio_desc *svc_sysboot' below the reset flag
> >    as it is more logical to have reset flag below
> >    reset gpio.
> >  - Remove a few unnecessary line breaks.
> > Changes in v3:
> >  - Add this patch to a patchset.
> > Changes in v2:
> >  - Move comment to the same line as to what it applies to.
> > ---
> 
> > -static inline void svc_reset_onoff(unsigned int gpio, bool onoff)
> > +static inline void svc_reset_onoff(struct gpio_desc *gpio, bool onoff)
> >  {
> > -	gpio_set_value(gpio, onoff);
> > +	gpiod_set_value(gpio, onoff);
> >  }
> 
> Please use the raw interface here too, until we've done away with the
> polarity properties and can honour the generic device tree flags. Please
> make a comment about this in the commit message too.
> 
Ok, I'll do that.
> > @@ -444,61 +438,33 @@ static int arche_platform_probe(struct platform_device *pdev)
> >  	/* setup svc reset gpio */
> >  	arche_pdata->is_reset_act_hi = of_property_read_bool(np,
> >  							     "svc,reset-active-high");
> > -	arche_pdata->svc_reset_gpio = of_get_named_gpio(np,
> > -							"svc,reset-gpio",
> > -							0);
> > -	if (!gpio_is_valid(arche_pdata->svc_reset_gpio)) {
> > -		dev_err(dev, "failed to get reset-gpio\n");
> > -		return arche_pdata->svc_reset_gpio;
> > -	}
> > -	ret = devm_gpio_request(dev, arche_pdata->svc_reset_gpio, "svc-reset");
> > -	if (ret) {
> > -		dev_err(dev, "failed to request svc-reset gpio:%d\n", ret);
> > -		return ret;
> > -	}
> > -	ret = gpio_direction_output(arche_pdata->svc_reset_gpio,
> > -				    arche_pdata->is_reset_act_hi);
> > -	if (ret) {
> > -		dev_err(dev, "failed to set svc-reset gpio dir:%d\n", ret);
> > +	if (arche_pdata->is_reset_act_hi)
> > +		flags = GPIOD_OUT_HIGH;
> > +	else
> > +		flags = GPIOD_OUT_LOW;
> > +
> > +	arche_pdata->svc_reset = devm_gpiod_get(dev, "svc,reset-gpio", flags);
> 
> Again, you cannot just rename devicetree properties like this. Keep the
> current names for now (and drop the -gpio suffix when requesting).
> 
Ok, I'll so that.
> Johan

Regards,
Nishad


      reply	other threads:[~2019-01-10 17:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-22 14:45 [PATCH v4 0/4] greybus: gpio: Switch to the gpio descriptor interface Nishad Kamdar
2018-12-22 14:47 ` [PATCH v4 1/4] staging: greybus: gpio: switch GPIO portions to use GPIOLIB_IRQCHIP Nishad Kamdar
2019-01-09 10:44   ` Johan Hovold
2018-12-22 14:51 ` [PATCH v4 2/4] staging: greybus: gpio: Use gpiochip_get_data() in place of gpio_chip_to_gb_gpio_controller() Nishad Kamdar
2019-01-09 10:58   ` Johan Hovold
2019-01-10 17:39     ` Nishad Kamdar
2018-12-22 14:52 ` [PATCH v4 3/4] staging: greybus: arche-apb-ctrl.c: Switch to the gpio descriptor interface Nishad Kamdar
2019-01-09 11:30   ` Johan Hovold
2019-01-10 17:41     ` Nishad Kamdar
2018-12-22 14:53 ` [PATCH v4 4/4] staging: greybus: arche-platform: " Nishad Kamdar
2019-01-09 11:35   ` Johan Hovold
2019-01-10 17:43     ` Nishad Kamdar [this message]

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=20190110174341.GD24566@nishad \
    --to=nishadkamdar@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=elder@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=greybus-dev@lists.linaro.org \
    --cc=johan@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmfrfs@gmail.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