Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1200483 > unrolled thread

Re: [RFC PATCH 0/3] New Atmel PIO4 pinctrl/gpio driver

Started bySascha Hauer <s.hauer@pengutronix.de>
First post2015-08-05 09:40 +0200
Last post2015-08-20 14:50 +0200
Articles 4 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [RFC PATCH 0/3] New Atmel PIO4 pinctrl/gpio driver Sascha Hauer <s.hauer@pengutronix.de> - 2015-08-05 09:40 +0200
    Re: [RFC PATCH 0/3] New Atmel PIO4 pinctrl/gpio driver Ludovic Desroches <ludovic.desroches@atmel.com> - 2015-08-10 09:00 +0200
      Re: [RFC PATCH 0/3] New Atmel PIO4 pinctrl/gpio driver Sascha Hauer <s.hauer@pengutronix.de> - 2015-08-20 09:10 +0200
        Re: [RFC PATCH 0/3] New Atmel PIO4 pinctrl/gpio driver Ludovic Desroches <ludovic.desroches@atmel.com> - 2015-08-20 14:50 +0200

#1200483 — Re: [RFC PATCH 0/3] New Atmel PIO4 pinctrl/gpio driver

FromSascha Hauer <s.hauer@pengutronix.de>
Date2015-08-05 09:40 +0200
SubjectRe: [RFC PATCH 0/3] New Atmel PIO4 pinctrl/gpio driver
Message-ID<pU1sR-32s-3@gated-at.bofh.it>
On Fri, Jul 31, 2015 at 05:08:07PM +0200, Ludovic Desroches wrote:
> Hi,
> 
> Following our discussion, I send an RFC version of my driver. RFC because it is
> not totally achieved, some cleanup and feature addition is needed.
> 
> At least, we could discuss about the 'core' part. I have used the pinmux
> property as Mediatek driver. Patch 3 is the internal dt files we are using.

As you can imagine I am fine with the binding, so I can add my acked-by
once you send a non-RFC version.

The only thing I never understood is what's so special about GPIOs that
they have to bypass the pinctrl framework and instead a gpio_request
magically translates a gpio into a pin. Wouldn't it make sense to at
least add the pins in their GPIO mode to
arch/arm/boot/dts/sama5d2-pinfunc.h?

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1203847

FromLudovic Desroches <ludovic.desroches@atmel.com>
Date2015-08-10 09:00 +0200
Message-ID<pVPdU-6C4-13@gated-at.bofh.it>
In reply to#1200483
Hi Sascha,

On Wed, Aug 05, 2015 at 09:31:17AM +0200, Sascha Hauer wrote:
> On Fri, Jul 31, 2015 at 05:08:07PM +0200, Ludovic Desroches wrote:
> > Hi,
> > 
> > Following our discussion, I send an RFC version of my driver. RFC because it is
> > not totally achieved, some cleanup and feature addition is needed.
> > 
> > At least, we could discuss about the 'core' part. I have used the pinmux
> > property as Mediatek driver. Patch 3 is the internal dt files we are using.
> 
> As you can imagine I am fine with the binding, so I can add my acked-by
> once you send a non-RFC version.
>

Great, I'm glad to hear that.
 
> The only thing I never understood is what's so special about GPIOs that
> they have to bypass the pinctrl framework and instead a gpio_request
> magically translates a gpio into a pin.

Not sure to really understand your concern here... Do you mean I could
get rid of gpio_request_enable()?

> Wouldn't it make sense to at
> least add the pins in their GPIO mode to
> arch/arm/boot/dts/sama5d2-pinfunc.h?

It is done, PIN_PA0 could be used for this purpose.

Regards

Ludovic
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1210215

FromSascha Hauer <s.hauer@pengutronix.de>
Date2015-08-20 09:10 +0200
Message-ID<pZs94-65q-23@gated-at.bofh.it>
In reply to#1203847
On Mon, Aug 10, 2015 at 08:53:34AM +0200, Ludovic Desroches wrote:
> Hi Sascha,
> 
> On Wed, Aug 05, 2015 at 09:31:17AM +0200, Sascha Hauer wrote:
> > On Fri, Jul 31, 2015 at 05:08:07PM +0200, Ludovic Desroches wrote:
> > > Hi,
> > > 
> > > Following our discussion, I send an RFC version of my driver. RFC because it is
> > > not totally achieved, some cleanup and feature addition is needed.
> > > 
> > > At least, we could discuss about the 'core' part. I have used the pinmux
> > > property as Mediatek driver. Patch 3 is the internal dt files we are using.
> > 
> > As you can imagine I am fine with the binding, so I can add my acked-by
> > once you send a non-RFC version.
> >
> 
> Great, I'm glad to hear that.
>  
> > The only thing I never understood is what's so special about GPIOs that
> > they have to bypass the pinctrl framework and instead a gpio_request
> > magically translates a gpio into a pin.
> 
> Not sure to really understand your concern here... Do you mean I could
> get rid of gpio_request_enable()?

I would expect a gpio to be a pin like every other pin, hence configured
via the pinctrl framework and not implicitly via gpio_request().

> 
> > Wouldn't it make sense to at
> > least add the pins in their GPIO mode to
> > arch/arm/boot/dts/sama5d2-pinfunc.h?
> 
> It is done, PIN_PA0 could be used for this purpose.

I would expect a define like:

#define PIN_PA3__GPIO                   PINMUX_PIN(PIN_PA3, 0, 2)

PIN_PAx only contains the pin number, but not the function.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1210482

FromLudovic Desroches <ludovic.desroches@atmel.com>
Date2015-08-20 14:50 +0200
Message-ID<pZxs7-57Q-27@gated-at.bofh.it>
In reply to#1210215
On Thu, Aug 20, 2015 at 09:05:07AM +0200, Sascha Hauer wrote:
> On Mon, Aug 10, 2015 at 08:53:34AM +0200, Ludovic Desroches wrote:
> > Hi Sascha,
> > 
> > On Wed, Aug 05, 2015 at 09:31:17AM +0200, Sascha Hauer wrote:
> > > On Fri, Jul 31, 2015 at 05:08:07PM +0200, Ludovic Desroches wrote:
> > > > Hi,
> > > > 
> > > > Following our discussion, I send an RFC version of my driver. RFC because it is
> > > > not totally achieved, some cleanup and feature addition is needed.
> > > > 
> > > > At least, we could discuss about the 'core' part. I have used the pinmux
> > > > property as Mediatek driver. Patch 3 is the internal dt files we are using.
> > > 
> > > As you can imagine I am fine with the binding, so I can add my acked-by
> > > once you send a non-RFC version.
> > >
> > 
> > Great, I'm glad to hear that.
> >  
> > > The only thing I never understood is what's so special about GPIOs that
> > > they have to bypass the pinctrl framework and instead a gpio_request
> > > magically translates a gpio into a pin.
> > 
> > Not sure to really understand your concern here... Do you mean I could
> > get rid of gpio_request_enable()?
> 
> I would expect a gpio to be a pin like every other pin, hence configured
> via the pinctrl framework and not implicitly via gpio_request().
> 

It is not an issue to get rid of gpio_request_*(). I was thinking it was
a bonus to provide it.

> > 
> > > Wouldn't it make sense to at
> > > least add the pins in their GPIO mode to
> > > arch/arm/boot/dts/sama5d2-pinfunc.h?
> > 
> > It is done, PIN_PA0 could be used for this purpose.
> 
> I would expect a define like:
> 
> #define PIN_PA3__GPIO                   PINMUX_PIN(PIN_PA3, 0, 2)
> 
> PIN_PAx only contains the pin number, but not the function.

Ok I can do this change for v2.


Ludovic
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web