From: Jacek Anaszewski <j.anaszewski@samsung.com>
To: Heiko Schocher <hs@denx.de>
Cc: linux-kernel@vger.kernel.org, Richard Purdie <rpurdie@rpsys.net>,
linux-leds@vger.kernel.org, Georg.Soffel@bosch-si.com
Subject: Re: [PATCH] leds: leds-gpio: add shutdown function
Date: Tue, 13 Oct 2015 11:13:33 +0200 [thread overview]
Message-ID: <561CCB3D.3020801@samsung.com> (raw)
In-Reply-To: <1444713432-24433-1-git-send-email-hs@denx.de>
Hi Heiko,
On 10/13/2015 07:17 AM, Heiko Schocher wrote:
> add a shutdown function for setting the gpio-leds
> into off state when shuting down.
>
> Signed-off-by: Heiko Schocher <hs@denx.de>
> ---
>
> drivers/leds/leds-gpio.c | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/drivers/leds/leds-gpio.c b/drivers/leds/leds-gpio.c
> index af1876a..5db4515 100644
> --- a/drivers/leds/leds-gpio.c
> +++ b/drivers/leds/leds-gpio.c
> @@ -291,9 +291,22 @@ static int gpio_led_remove(struct platform_device *pdev)
> return 0;
> }
>
> +static void gpio_led_shutdown(struct platform_device *pdev)
> +{
> + struct gpio_leds_priv *priv = platform_get_drvdata(pdev);
> + int i;
> +
> + for (i = 0; i < priv->num_leds; i++) {
> + struct gpio_led_data *led = &priv->leds[i];
> +
> + gpio_led_set(&led->cdev, LED_OFF);
> + }
> +}
> +
> static struct platform_driver gpio_led_driver = {
> .probe = gpio_led_probe,
> .remove = gpio_led_remove,
> + .shutdown = gpio_led_shutdown,
> .driver = {
> .name = "leds-gpio",
> .of_match_table = of_gpio_leds_match,
>
Merged, thanks.
--
Best Regards,
Jacek Anaszewski
prev parent reply other threads:[~2015-10-13 9:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-13 5:17 [PATCH] leds: leds-gpio: add shutdown function Heiko Schocher
2015-10-13 9:13 ` Jacek Anaszewski [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=561CCB3D.3020801@samsung.com \
--to=j.anaszewski@samsung.com \
--cc=Georg.Soffel@bosch-si.com \
--cc=hs@denx.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=rpurdie@rpsys.net \
/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.