From: Tony Lindgren <tony@atomide.com>
To: AnilKumar Ch <anilkumar@ti.com>
Cc: wg@grandegger.com, mkl@pengutronix.de, bryan.wu@canonical.com,
rpurdie@rpsys.net, linux-leds@vger.kernel.org,
linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
devicetree-discuss@lists.ozlabs.org, grant.likely@secretlab.ca
Subject: Re: [PATCH 4/5] leds: leds-gpio: adopt pinctrl support
Date: Fri, 31 Aug 2012 09:04:04 -0700 [thread overview]
Message-ID: <20120831160402.GN1303@atomide.com> (raw)
In-Reply-To: <1346405361-29711-5-git-send-email-anilkumar@ti.com>
* AnilKumar Ch <anilkumar@ti.com> [120831 02:30]:
> Adopt pinctrl support to leds-gpio driver, based on the device
> pointer (leds-gpio) pinctrl driver configure SoC pins to GPIO
> mode.
>
> Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
> ---
> drivers/leds/leds-gpio.c | 31 ++++++++++++++++++++++++-------
> 1 file changed, 24 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/leds/leds-gpio.c b/drivers/leds/leds-gpio.c
> index c032b21..d98dfb9 100644
> --- a/drivers/leds/leds-gpio.c
> +++ b/drivers/leds/leds-gpio.c
> @@ -20,6 +20,7 @@
> #include <linux/slab.h>
> #include <linux/workqueue.h>
> #include <linux/module.h>
> +#include <linux/pinctrl/consumer.h>
>
> struct gpio_led_data {
> struct led_classdev cdev;
> @@ -236,14 +237,23 @@ static int __devinit gpio_led_probe(struct platform_device *pdev)
> {
> struct gpio_led_platform_data *pdata = pdev->dev.platform_data;
> struct gpio_leds_priv *priv;
> - int i, ret = 0;
> + struct pinctrl *pinctrl;
> + int i = 0;
> + int ret = 0;
> +
> + pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
> + if (IS_ERR(pinctrl)) {
> + return PTR_ERR(pinctrl);
> + }
I think you need to just print out a warning here as most systems don't
have the pinctrl implemented. And some people just do static pinmuxing
in the bootloader.
Regards,
Tony
WARNING: multiple messages have this Message-ID (diff)
From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/5] leds: leds-gpio: adopt pinctrl support
Date: Fri, 31 Aug 2012 09:04:04 -0700 [thread overview]
Message-ID: <20120831160402.GN1303@atomide.com> (raw)
In-Reply-To: <1346405361-29711-5-git-send-email-anilkumar@ti.com>
* AnilKumar Ch <anilkumar@ti.com> [120831 02:30]:
> Adopt pinctrl support to leds-gpio driver, based on the device
> pointer (leds-gpio) pinctrl driver configure SoC pins to GPIO
> mode.
>
> Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
> ---
> drivers/leds/leds-gpio.c | 31 ++++++++++++++++++++++++-------
> 1 file changed, 24 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/leds/leds-gpio.c b/drivers/leds/leds-gpio.c
> index c032b21..d98dfb9 100644
> --- a/drivers/leds/leds-gpio.c
> +++ b/drivers/leds/leds-gpio.c
> @@ -20,6 +20,7 @@
> #include <linux/slab.h>
> #include <linux/workqueue.h>
> #include <linux/module.h>
> +#include <linux/pinctrl/consumer.h>
>
> struct gpio_led_data {
> struct led_classdev cdev;
> @@ -236,14 +237,23 @@ static int __devinit gpio_led_probe(struct platform_device *pdev)
> {
> struct gpio_led_platform_data *pdata = pdev->dev.platform_data;
> struct gpio_leds_priv *priv;
> - int i, ret = 0;
> + struct pinctrl *pinctrl;
> + int i = 0;
> + int ret = 0;
> +
> + pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
> + if (IS_ERR(pinctrl)) {
> + return PTR_ERR(pinctrl);
> + }
I think you need to just print out a warning here as most systems don't
have the pinctrl implemented. And some people just do static pinmuxing
in the bootloader.
Regards,
Tony
next prev parent reply other threads:[~2012-08-31 16:04 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-31 9:29 [PATCH v5 0/5] Add device tree data for AM33XX devices AnilKumar Ch
2012-08-31 9:29 ` AnilKumar Ch
[not found] ` <1346405361-29711-1-git-send-email-anilkumar-l0cyMroinI0@public.gmane.org>
2012-08-31 9:29 ` [PATCH v5 1/5] arm/dts: AM33XX: Add basic pinctrl device tree data AnilKumar Ch
2012-08-31 9:29 ` AnilKumar Ch
2012-09-05 23:32 ` Tony Lindgren
2012-09-05 23:32 ` Tony Lindgren
[not found] ` <20120905233205.GO1303-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2012-09-06 6:17 ` AnilKumar, Chimata
2012-09-06 6:17 ` AnilKumar, Chimata
2012-08-31 9:29 ` [PATCH v5 3/5] arm/dts: AM33XX: Add D_CAN " AnilKumar Ch
2012-08-31 9:29 ` AnilKumar Ch
2012-08-31 9:29 ` [PATCH 4/5] leds: leds-gpio: adopt pinctrl support AnilKumar Ch
2012-08-31 9:29 ` AnilKumar Ch
2012-08-31 16:04 ` Tony Lindgren [this message]
2012-08-31 16:04 ` Tony Lindgren
[not found] ` <20120831160402.GN1303-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2012-08-31 17:54 ` AnilKumar, Chimata
2012-08-31 17:54 ` AnilKumar, Chimata
2012-08-31 9:29 ` [PATCH v5 2/5] arm/dts: AM33XX: Configure pinmuxs for user leds control on Bone AnilKumar Ch
2012-08-31 9:29 ` AnilKumar Ch
2012-08-31 9:29 ` [PATCH 5/5] of: Modify c_can binding documentation AnilKumar Ch
2012-08-31 9:29 ` AnilKumar Ch
[not found] ` <1346405361-29711-6-git-send-email-anilkumar-l0cyMroinI0@public.gmane.org>
2012-09-01 7:05 ` AnilKumar, Chimata
2012-09-01 7:05 ` AnilKumar, Chimata
[not found] ` <331ABD5ECB02734CA317220B2BBEABC13EA234C7-Er742YJ7I/eIQmiDNMet8wC/G2K4zDHf@public.gmane.org>
2012-09-02 2:02 ` Stephen Warren
2012-09-02 2:02 ` Stephen Warren
[not found] ` <5042BE3E.8040808-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-09-03 4:35 ` AnilKumar, Chimata
2012-09-03 4:35 ` AnilKumar, Chimata
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=20120831160402.GN1303@atomide.com \
--to=tony@atomide.com \
--cc=anilkumar@ti.com \
--cc=bryan.wu@canonical.com \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=grant.likely@secretlab.ca \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-leds@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=mkl@pengutronix.de \
--cc=rpurdie@rpsys.net \
--cc=wg@grandegger.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 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.