* [PATCH] gpio/plat-pxa: fix clash with gpiolib namespace @ 2011-06-13 8:42 Linus Walleij 2011-06-13 9:03 ` Eric Miao 2011-06-13 15:03 ` Grant Likely 0 siblings, 2 replies; 5+ messages in thread From: Linus Walleij @ 2011-06-13 8:42 UTC (permalink / raw) To: linux-arm-kernel From: Linus Walleij <linus.walleij@linaro.org> The PXA platform code has a static inline helper called gpio_to_chip which clashes with the gpiolib namespace if we try to expose the function with the same name from gpiolib, and it's still confusing even if we don't do that. So rename it to gpio_to_pxachip(). Reported-by: H Hartley Sweeten <hartleys@visionengravers.com> Cc: Eric Miao <eric.miao@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> --- arch/arm/plat-pxa/gpio.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/arm/plat-pxa/gpio.c b/arch/arm/plat-pxa/gpio.c index 48ebb94..a11dc36 100644 --- a/arch/arm/plat-pxa/gpio.c +++ b/arch/arm/plat-pxa/gpio.c @@ -50,7 +50,7 @@ static inline void __iomem *gpio_chip_base(struct gpio_chip *c) return container_of(c, struct pxa_gpio_chip, chip)->regbase; } -static inline struct pxa_gpio_chip *gpio_to_chip(unsigned gpio) +static inline struct pxa_gpio_chip *gpio_to_pxachip(unsigned gpio) { return &pxa_gpio_chips[gpio_to_bank(gpio)]; } @@ -161,7 +161,7 @@ static int pxa_gpio_irq_type(struct irq_data *d, unsigned int type) int gpio = irq_to_gpio(d->irq); unsigned long gpdr, mask = GPIO_bit(gpio); - c = gpio_to_chip(gpio); + c = gpio_to_pxachip(gpio); if (type == IRQ_TYPE_PROBE) { /* Don't mess with enabled GPIOs using preconfigured edges or @@ -230,7 +230,7 @@ static void pxa_gpio_demux_handler(unsigned int irq, struct irq_desc *desc) static void pxa_ack_muxed_gpio(struct irq_data *d) { int gpio = irq_to_gpio(d->irq); - struct pxa_gpio_chip *c = gpio_to_chip(gpio); + struct pxa_gpio_chip *c = gpio_to_pxachip(gpio); __raw_writel(GPIO_bit(gpio), c->regbase + GEDR_OFFSET); } @@ -238,7 +238,7 @@ static void pxa_ack_muxed_gpio(struct irq_data *d) static void pxa_mask_muxed_gpio(struct irq_data *d) { int gpio = irq_to_gpio(d->irq); - struct pxa_gpio_chip *c = gpio_to_chip(gpio); + struct pxa_gpio_chip *c = gpio_to_pxachip(gpio); uint32_t grer, gfer; c->irq_mask &= ~GPIO_bit(gpio); @@ -252,7 +252,7 @@ static void pxa_mask_muxed_gpio(struct irq_data *d) static void pxa_unmask_muxed_gpio(struct irq_data *d) { int gpio = irq_to_gpio(d->irq); - struct pxa_gpio_chip *c = gpio_to_chip(gpio); + struct pxa_gpio_chip *c = gpio_to_pxachip(gpio); c->irq_mask |= GPIO_bit(gpio); update_edge_detect(c); -- 1.7.3.2 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH] gpio/plat-pxa: fix clash with gpiolib namespace 2011-06-13 8:42 [PATCH] gpio/plat-pxa: fix clash with gpiolib namespace Linus Walleij @ 2011-06-13 9:03 ` Eric Miao 2011-06-13 15:02 ` Grant Likely 2011-06-13 15:03 ` Grant Likely 1 sibling, 1 reply; 5+ messages in thread From: Eric Miao @ 2011-06-13 9:03 UTC (permalink / raw) To: linux-arm-kernel On Mon, Jun 13, 2011 at 4:42 PM, Linus Walleij <linus.walleij@stericsson.com> wrote: > From: Linus Walleij <linus.walleij@linaro.org> > > The PXA platform code has a static inline helper called > gpio_to_chip which clashes with the gpiolib namespace if we > try to expose the function with the same name from gpiolib, > and it's still confusing even if we don't do that. So rename > it to gpio_to_pxachip(). > > Reported-by: H Hartley Sweeten <hartleys@visionengravers.com> > Cc: Eric Miao <eric.miao@linaro.org> > Signed-off-by: Linus Walleij <linus.walleij@linaro.org> OK, applied to 'devel'. > --- > ?arch/arm/plat-pxa/gpio.c | ? 10 +++++----- > ?1 files changed, 5 insertions(+), 5 deletions(-) > > diff --git a/arch/arm/plat-pxa/gpio.c b/arch/arm/plat-pxa/gpio.c > index 48ebb94..a11dc36 100644 > --- a/arch/arm/plat-pxa/gpio.c > +++ b/arch/arm/plat-pxa/gpio.c > @@ -50,7 +50,7 @@ static inline void __iomem *gpio_chip_base(struct gpio_chip *c) > ? ? ? ?return container_of(c, struct pxa_gpio_chip, chip)->regbase; > ?} > > -static inline struct pxa_gpio_chip *gpio_to_chip(unsigned gpio) > +static inline struct pxa_gpio_chip *gpio_to_pxachip(unsigned gpio) > ?{ > ? ? ? ?return &pxa_gpio_chips[gpio_to_bank(gpio)]; > ?} > @@ -161,7 +161,7 @@ static int pxa_gpio_irq_type(struct irq_data *d, unsigned int type) > ? ? ? ?int gpio = irq_to_gpio(d->irq); > ? ? ? ?unsigned long gpdr, mask = GPIO_bit(gpio); > > - ? ? ? c = gpio_to_chip(gpio); > + ? ? ? c = gpio_to_pxachip(gpio); > > ? ? ? ?if (type == IRQ_TYPE_PROBE) { > ? ? ? ? ? ? ? ?/* Don't mess with enabled GPIOs using preconfigured edges or > @@ -230,7 +230,7 @@ static void pxa_gpio_demux_handler(unsigned int irq, struct irq_desc *desc) > ?static void pxa_ack_muxed_gpio(struct irq_data *d) > ?{ > ? ? ? ?int gpio = irq_to_gpio(d->irq); > - ? ? ? struct pxa_gpio_chip *c = gpio_to_chip(gpio); > + ? ? ? struct pxa_gpio_chip *c = gpio_to_pxachip(gpio); > > ? ? ? ?__raw_writel(GPIO_bit(gpio), c->regbase + GEDR_OFFSET); > ?} > @@ -238,7 +238,7 @@ static void pxa_ack_muxed_gpio(struct irq_data *d) > ?static void pxa_mask_muxed_gpio(struct irq_data *d) > ?{ > ? ? ? ?int gpio = irq_to_gpio(d->irq); > - ? ? ? struct pxa_gpio_chip *c = gpio_to_chip(gpio); > + ? ? ? struct pxa_gpio_chip *c = gpio_to_pxachip(gpio); > ? ? ? ?uint32_t grer, gfer; > > ? ? ? ?c->irq_mask &= ~GPIO_bit(gpio); > @@ -252,7 +252,7 @@ static void pxa_mask_muxed_gpio(struct irq_data *d) > ?static void pxa_unmask_muxed_gpio(struct irq_data *d) > ?{ > ? ? ? ?int gpio = irq_to_gpio(d->irq); > - ? ? ? struct pxa_gpio_chip *c = gpio_to_chip(gpio); > + ? ? ? struct pxa_gpio_chip *c = gpio_to_pxachip(gpio); > > ? ? ? ?c->irq_mask |= GPIO_bit(gpio); > ? ? ? ?update_edge_detect(c); > -- > 1.7.3.2 > > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel at lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel > ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] gpio/plat-pxa: fix clash with gpiolib namespace 2011-06-13 9:03 ` Eric Miao @ 2011-06-13 15:02 ` Grant Likely 2011-06-13 15:49 ` Eric Miao 0 siblings, 1 reply; 5+ messages in thread From: Grant Likely @ 2011-06-13 15:02 UTC (permalink / raw) To: linux-arm-kernel On Mon, Jun 13, 2011 at 05:03:50PM +0800, Eric Miao wrote: > On Mon, Jun 13, 2011 at 4:42 PM, Linus Walleij > <linus.walleij@stericsson.com> wrote: > > From: Linus Walleij <linus.walleij@linaro.org> > > > > The PXA platform code has a static inline helper called > > gpio_to_chip which clashes with the gpiolib namespace if we > > try to expose the function with the same name from gpiolib, > > and it's still confusing even if we don't do that. So rename > > it to gpio_to_pxachip(). > > > > Reported-by: H Hartley Sweeten <hartleys@visionengravers.com> > > Cc: Eric Miao <eric.miao@linaro.org> > > Signed-off-by: Linus Walleij <linus.walleij@linaro.org> > > OK, applied to 'devel'. Is the pxa gpio driver going to be moved to drivers/gpio this cycle? If so, you'll probably want to keep the gpio changes in a separate branch that can be merged both into gpio/next and your devel branch, just in case there ends up being merge issues between our branches in linux-next. g. > > > --- > > ?arch/arm/plat-pxa/gpio.c | ? 10 +++++----- > > ?1 files changed, 5 insertions(+), 5 deletions(-) > > > > diff --git a/arch/arm/plat-pxa/gpio.c b/arch/arm/plat-pxa/gpio.c > > index 48ebb94..a11dc36 100644 > > --- a/arch/arm/plat-pxa/gpio.c > > +++ b/arch/arm/plat-pxa/gpio.c > > @@ -50,7 +50,7 @@ static inline void __iomem *gpio_chip_base(struct gpio_chip *c) > > ? ? ? ?return container_of(c, struct pxa_gpio_chip, chip)->regbase; > > ?} > > > > -static inline struct pxa_gpio_chip *gpio_to_chip(unsigned gpio) > > +static inline struct pxa_gpio_chip *gpio_to_pxachip(unsigned gpio) > > ?{ > > ? ? ? ?return &pxa_gpio_chips[gpio_to_bank(gpio)]; > > ?} > > @@ -161,7 +161,7 @@ static int pxa_gpio_irq_type(struct irq_data *d, unsigned int type) > > ? ? ? ?int gpio = irq_to_gpio(d->irq); > > ? ? ? ?unsigned long gpdr, mask = GPIO_bit(gpio); > > > > - ? ? ? c = gpio_to_chip(gpio); > > + ? ? ? c = gpio_to_pxachip(gpio); > > > > ? ? ? ?if (type == IRQ_TYPE_PROBE) { > > ? ? ? ? ? ? ? ?/* Don't mess with enabled GPIOs using preconfigured edges or > > @@ -230,7 +230,7 @@ static void pxa_gpio_demux_handler(unsigned int irq, struct irq_desc *desc) > > ?static void pxa_ack_muxed_gpio(struct irq_data *d) > > ?{ > > ? ? ? ?int gpio = irq_to_gpio(d->irq); > > - ? ? ? struct pxa_gpio_chip *c = gpio_to_chip(gpio); > > + ? ? ? struct pxa_gpio_chip *c = gpio_to_pxachip(gpio); > > > > ? ? ? ?__raw_writel(GPIO_bit(gpio), c->regbase + GEDR_OFFSET); > > ?} > > @@ -238,7 +238,7 @@ static void pxa_ack_muxed_gpio(struct irq_data *d) > > ?static void pxa_mask_muxed_gpio(struct irq_data *d) > > ?{ > > ? ? ? ?int gpio = irq_to_gpio(d->irq); > > - ? ? ? struct pxa_gpio_chip *c = gpio_to_chip(gpio); > > + ? ? ? struct pxa_gpio_chip *c = gpio_to_pxachip(gpio); > > ? ? ? ?uint32_t grer, gfer; > > > > ? ? ? ?c->irq_mask &= ~GPIO_bit(gpio); > > @@ -252,7 +252,7 @@ static void pxa_mask_muxed_gpio(struct irq_data *d) > > ?static void pxa_unmask_muxed_gpio(struct irq_data *d) > > ?{ > > ? ? ? ?int gpio = irq_to_gpio(d->irq); > > - ? ? ? struct pxa_gpio_chip *c = gpio_to_chip(gpio); > > + ? ? ? struct pxa_gpio_chip *c = gpio_to_pxachip(gpio); > > > > ? ? ? ?c->irq_mask |= GPIO_bit(gpio); > > ? ? ? ?update_edge_detect(c); > > -- > > 1.7.3.2 > > > > > > _______________________________________________ > > linux-arm-kernel mailing list > > linux-arm-kernel at lists.infradead.org > > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel > > ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] gpio/plat-pxa: fix clash with gpiolib namespace 2011-06-13 15:02 ` Grant Likely @ 2011-06-13 15:49 ` Eric Miao 0 siblings, 0 replies; 5+ messages in thread From: Eric Miao @ 2011-06-13 15:49 UTC (permalink / raw) To: linux-arm-kernel On Mon, Jun 13, 2011 at 11:02 PM, Grant Likely <grant.likely@secretlab.ca> wrote: > On Mon, Jun 13, 2011 at 05:03:50PM +0800, Eric Miao wrote: >> On Mon, Jun 13, 2011 at 4:42 PM, Linus Walleij >> <linus.walleij@stericsson.com> wrote: >> > From: Linus Walleij <linus.walleij@linaro.org> >> > >> > The PXA platform code has a static inline helper called >> > gpio_to_chip which clashes with the gpiolib namespace if we >> > try to expose the function with the same name from gpiolib, >> > and it's still confusing even if we don't do that. So rename >> > it to gpio_to_pxachip(). >> > >> > Reported-by: H Hartley Sweeten <hartleys@visionengravers.com> >> > Cc: Eric Miao <eric.miao@linaro.org> >> > Signed-off-by: Linus Walleij <linus.walleij@linaro.org> >> >> OK, applied to 'devel'. > > Is the pxa gpio driver going to be moved to drivers/gpio this cycle? > If so, you'll probably want to keep the gpio changes in a separate > branch that can be merged both into gpio/next and your devel branch, > just in case there ends up being merge issues between our branches in > linux-next. Working on that - the problem is the tight coupling of IRQ subsystem and PXA's odd interrupt routing scheme (GPIO0, GPIO1 have dedicated IRQs, yet GPIO2 and above they share a single GPIO), while some other PXAs they all share a single IRQ line. Would work on that for some time though, so yeah I'll possibly keep this in seperate branch. > > g. > >> >> > --- >> > ?arch/arm/plat-pxa/gpio.c | ? 10 +++++----- >> > ?1 files changed, 5 insertions(+), 5 deletions(-) >> > >> > diff --git a/arch/arm/plat-pxa/gpio.c b/arch/arm/plat-pxa/gpio.c >> > index 48ebb94..a11dc36 100644 >> > --- a/arch/arm/plat-pxa/gpio.c >> > +++ b/arch/arm/plat-pxa/gpio.c >> > @@ -50,7 +50,7 @@ static inline void __iomem *gpio_chip_base(struct gpio_chip *c) >> > ? ? ? ?return container_of(c, struct pxa_gpio_chip, chip)->regbase; >> > ?} >> > >> > -static inline struct pxa_gpio_chip *gpio_to_chip(unsigned gpio) >> > +static inline struct pxa_gpio_chip *gpio_to_pxachip(unsigned gpio) >> > ?{ >> > ? ? ? ?return &pxa_gpio_chips[gpio_to_bank(gpio)]; >> > ?} >> > @@ -161,7 +161,7 @@ static int pxa_gpio_irq_type(struct irq_data *d, unsigned int type) >> > ? ? ? ?int gpio = irq_to_gpio(d->irq); >> > ? ? ? ?unsigned long gpdr, mask = GPIO_bit(gpio); >> > >> > - ? ? ? c = gpio_to_chip(gpio); >> > + ? ? ? c = gpio_to_pxachip(gpio); >> > >> > ? ? ? ?if (type == IRQ_TYPE_PROBE) { >> > ? ? ? ? ? ? ? ?/* Don't mess with enabled GPIOs using preconfigured edges or >> > @@ -230,7 +230,7 @@ static void pxa_gpio_demux_handler(unsigned int irq, struct irq_desc *desc) >> > ?static void pxa_ack_muxed_gpio(struct irq_data *d) >> > ?{ >> > ? ? ? ?int gpio = irq_to_gpio(d->irq); >> > - ? ? ? struct pxa_gpio_chip *c = gpio_to_chip(gpio); >> > + ? ? ? struct pxa_gpio_chip *c = gpio_to_pxachip(gpio); >> > >> > ? ? ? ?__raw_writel(GPIO_bit(gpio), c->regbase + GEDR_OFFSET); >> > ?} >> > @@ -238,7 +238,7 @@ static void pxa_ack_muxed_gpio(struct irq_data *d) >> > ?static void pxa_mask_muxed_gpio(struct irq_data *d) >> > ?{ >> > ? ? ? ?int gpio = irq_to_gpio(d->irq); >> > - ? ? ? struct pxa_gpio_chip *c = gpio_to_chip(gpio); >> > + ? ? ? struct pxa_gpio_chip *c = gpio_to_pxachip(gpio); >> > ? ? ? ?uint32_t grer, gfer; >> > >> > ? ? ? ?c->irq_mask &= ~GPIO_bit(gpio); >> > @@ -252,7 +252,7 @@ static void pxa_mask_muxed_gpio(struct irq_data *d) >> > ?static void pxa_unmask_muxed_gpio(struct irq_data *d) >> > ?{ >> > ? ? ? ?int gpio = irq_to_gpio(d->irq); >> > - ? ? ? struct pxa_gpio_chip *c = gpio_to_chip(gpio); >> > + ? ? ? struct pxa_gpio_chip *c = gpio_to_pxachip(gpio); >> > >> > ? ? ? ?c->irq_mask |= GPIO_bit(gpio); >> > ? ? ? ?update_edge_detect(c); >> > -- >> > 1.7.3.2 >> > >> > >> > _______________________________________________ >> > linux-arm-kernel mailing list >> > linux-arm-kernel at lists.infradead.org >> > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel >> > > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel at lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel > ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] gpio/plat-pxa: fix clash with gpiolib namespace 2011-06-13 8:42 [PATCH] gpio/plat-pxa: fix clash with gpiolib namespace Linus Walleij 2011-06-13 9:03 ` Eric Miao @ 2011-06-13 15:03 ` Grant Likely 1 sibling, 0 replies; 5+ messages in thread From: Grant Likely @ 2011-06-13 15:03 UTC (permalink / raw) To: linux-arm-kernel On Mon, Jun 13, 2011 at 10:42:19AM +0200, Linus Walleij wrote: > From: Linus Walleij <linus.walleij@linaro.org> > > The PXA platform code has a static inline helper called > gpio_to_chip which clashes with the gpiolib namespace if we > try to expose the function with the same name from gpiolib, > and it's still confusing even if we don't do that. So rename > it to gpio_to_pxachip(). > > Reported-by: H Hartley Sweeten <hartleys@visionengravers.com> > Cc: Eric Miao <eric.miao@linaro.org> > Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Grant Likely <grant.likely@secretlab.ca> > --- > arch/arm/plat-pxa/gpio.c | 10 +++++----- > 1 files changed, 5 insertions(+), 5 deletions(-) > > diff --git a/arch/arm/plat-pxa/gpio.c b/arch/arm/plat-pxa/gpio.c > index 48ebb94..a11dc36 100644 > --- a/arch/arm/plat-pxa/gpio.c > +++ b/arch/arm/plat-pxa/gpio.c > @@ -50,7 +50,7 @@ static inline void __iomem *gpio_chip_base(struct gpio_chip *c) > return container_of(c, struct pxa_gpio_chip, chip)->regbase; > } > > -static inline struct pxa_gpio_chip *gpio_to_chip(unsigned gpio) > +static inline struct pxa_gpio_chip *gpio_to_pxachip(unsigned gpio) > { > return &pxa_gpio_chips[gpio_to_bank(gpio)]; > } > @@ -161,7 +161,7 @@ static int pxa_gpio_irq_type(struct irq_data *d, unsigned int type) > int gpio = irq_to_gpio(d->irq); > unsigned long gpdr, mask = GPIO_bit(gpio); > > - c = gpio_to_chip(gpio); > + c = gpio_to_pxachip(gpio); > > if (type == IRQ_TYPE_PROBE) { > /* Don't mess with enabled GPIOs using preconfigured edges or > @@ -230,7 +230,7 @@ static void pxa_gpio_demux_handler(unsigned int irq, struct irq_desc *desc) > static void pxa_ack_muxed_gpio(struct irq_data *d) > { > int gpio = irq_to_gpio(d->irq); > - struct pxa_gpio_chip *c = gpio_to_chip(gpio); > + struct pxa_gpio_chip *c = gpio_to_pxachip(gpio); > > __raw_writel(GPIO_bit(gpio), c->regbase + GEDR_OFFSET); > } > @@ -238,7 +238,7 @@ static void pxa_ack_muxed_gpio(struct irq_data *d) > static void pxa_mask_muxed_gpio(struct irq_data *d) > { > int gpio = irq_to_gpio(d->irq); > - struct pxa_gpio_chip *c = gpio_to_chip(gpio); > + struct pxa_gpio_chip *c = gpio_to_pxachip(gpio); > uint32_t grer, gfer; > > c->irq_mask &= ~GPIO_bit(gpio); > @@ -252,7 +252,7 @@ static void pxa_mask_muxed_gpio(struct irq_data *d) > static void pxa_unmask_muxed_gpio(struct irq_data *d) > { > int gpio = irq_to_gpio(d->irq); > - struct pxa_gpio_chip *c = gpio_to_chip(gpio); > + struct pxa_gpio_chip *c = gpio_to_pxachip(gpio); > > c->irq_mask |= GPIO_bit(gpio); > update_edge_detect(c); > -- > 1.7.3.2 > ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-06-13 15:49 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-06-13 8:42 [PATCH] gpio/plat-pxa: fix clash with gpiolib namespace Linus Walleij 2011-06-13 9:03 ` Eric Miao 2011-06-13 15:02 ` Grant Likely 2011-06-13 15:49 ` Eric Miao 2011-06-13 15:03 ` Grant Likely
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).