All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Rojhalat Ibrahim <imr@rtschenk.de>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	netdev@vger.kernel.org
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Alexandre Courbot <acourbot@nvidia.com>,
	David Miller <davem@davemloft.net>,
	Florian Fainelli <f.fainelli@gmail.com>,
	David Daney <david.daney@cavium.com>
Subject: Re: [PATCH][v2] mdio-mux-gpio: Use GPIO descriptor interface and new gpiod_set_array function
Date: Tue, 25 Nov 2014 16:44:04 +0300	[thread overview]
Message-ID: <547487A4.6050203@cogentembedded.com> (raw)
In-Reply-To: <2814617.OrXEO01vgP@pcimr>

Hello.

On 11/25/2014 12:31 PM, Rojhalat Ibrahim wrote:

> Convert mdio-mux-gpio to the GPIO descriptor interface and use the new
> gpiod_set_array function to set all output signals simultaneously.

> Signed-off-by: Rojhalat Ibrahim <imr@rtschenk.de>
> Acked-by: David S. Miller <davem@davemloft.net>
> --
> This patch depends on the gpiod_set_array function, which is available in
> the linux-gpio devel tree.

> v2: fix gpiod_get_index usage

>   drivers/net/phy/mdio-mux-gpio.c |   38 ++++++++++++++------------------------
>   1 file changed, 14 insertions(+), 24 deletions(-)

> diff --git a/drivers/net/phy/mdio-mux-gpio.c b/drivers/net/phy/mdio-mux-gpio.c
> index 0966951..1167c5b 100644
> --- a/drivers/net/phy/mdio-mux-gpio.c
> +++ b/drivers/net/phy/mdio-mux-gpio.c
[...]
> @@ -98,15 +84,19 @@ static int mdio_mux_gpio_probe(struct platform_device *pdev)
[...]
>   static int mdio_mux_gpio_remove(struct platform_device *pdev)
>   {
> +	unsigned int n;
>   	struct mdio_mux_gpio_state *s = dev_get_platdata(&pdev->dev);
>   	mdio_mux_uninit(s->mux_handle);
> +	for (n = 0; n < s->num_gpios; n++) {
> +		gpiod_put(s->gpio[n]);
> +	}

    {} not needed; scripts/checkpatch.pl should have complained...

WBR, Sergei


  reply	other threads:[~2014-11-25 13:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-25  9:31 [PATCH][v2] mdio-mux-gpio: Use GPIO descriptor interface and new gpiod_set_array function Rojhalat Ibrahim
2014-11-25 13:44 ` Sergei Shtylyov [this message]
2014-11-28 13:49   ` Linus Walleij
2014-11-28 13:48 ` Linus Walleij

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=547487A4.6050203@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=acourbot@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=david.daney@cavium.com \
    --cc=f.fainelli@gmail.com \
    --cc=imr@rtschenk.de \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=netdev@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.