Re: [PATCH] LEDS: Add pinctrl call into leds-gpio

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear Bryan Wu,

> On Sun, Aug 26, 2012 at 3:30 AM, Marek Vasut <marex@xxxxxxx> wrote:
> > Add call to pinctrl, so the gpio-leds driver can configure the
> > pin multiplexing of GPIOs driving the LEDs connected to them.
> 
> You just introduce a new instant 'pinctrl', but there is no code use
> it in this driver? Did I miss something?

I just need this gpio-leds driver to configure the pins for me, did I go wrong 
about it? Please advise.

Thanks in advance!

> -Bryan
> 
> > Signed-off-by: Marek Vasut <marex@xxxxxxx>
> > Cc: Bryan Wu <bryan.wu@xxxxxxxxxxxxx>
> > Cc: Richard Purdie <rpurdie@xxxxxxxxx>
> > Cc: Grant Likely <grant.likely@xxxxxxxxxxxx>
> > Cc: Rob Herring <rob.herring@xxxxxxxxxxx>
> > Cc: linux-leds@xxxxxxxxxxxxxxx
> > ---
> > 
> >  drivers/leds/leds-gpio.c |    6 ++++++
> >  1 file changed, 6 insertions(+)
> > 
> > diff --git a/drivers/leds/leds-gpio.c b/drivers/leds/leds-gpio.c
> > index cde85ba..877d69e 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;
> > 
> > @@ -234,8 +235,13 @@ 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;
> > 
> > +       struct pinctrl *pinctrl;
> > 
> >         int i, ret = 0;
> > 
> > +       pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
> > +       if (IS_ERR(pinctrl))
> > +               return PTR_ERR(pinctrl);
> > +
> > 
> >         if (pdata && pdata->num_leds) {
> >         
> >                 priv = devm_kzalloc(&pdev->dev,
> >                 
> >                                 sizeof_gpio_leds_priv(pdata->num_leds),
> > 
> > --
> > 1.7.10.4

Best regards,
Marek Vasut
--
To unsubscribe from this list: send the line "unsubscribe linux-leds" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux