All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH/RFC 05/12] sh-pfc: Make GPIO support optional
@ 2013-03-10 18:58 Laurent Pinchart
  2013-03-13 17:29 ` Linus Walleij
  0 siblings, 1 reply; 2+ messages in thread
From: Laurent Pinchart @ 2013-03-10 18:58 UTC (permalink / raw)
  To: linux-sh

When implemented as a separate IP block, GPIOs should be handled by a
separate driver. To make this possible GPIO support needs to be optional
in the sh-pfc driver.

If no GPIO data registers are supplied in the SoC information structure
skip registration of the gpiochip.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
 drivers/pinctrl/sh-pfc/gpio.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/pinctrl/sh-pfc/gpio.c b/drivers/pinctrl/sh-pfc/gpio.c
index 7a54ec7..317cebb 100644
--- a/drivers/pinctrl/sh-pfc/gpio.c
+++ b/drivers/pinctrl/sh-pfc/gpio.c
@@ -354,6 +354,9 @@ int sh_pfc_register_gpiochip(struct sh_pfc *pfc)
 	unsigned int i;
 	int ret;
 
+	if (pfc->info->data_regs = NULL)
+		return 0;
+
 	/* Register the real GPIOs chip. */
 	chip = sh_pfc_add_gpiochip(pfc, gpio_pin_setup);
 	if (IS_ERR(chip))
-- 
1.8.1.5


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH/RFC 05/12] sh-pfc: Make GPIO support optional
  2013-03-10 18:58 [PATCH/RFC 05/12] sh-pfc: Make GPIO support optional Laurent Pinchart
@ 2013-03-13 17:29 ` Linus Walleij
  0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2013-03-13 17:29 UTC (permalink / raw)
  To: linux-sh

On Sun, Mar 10, 2013 at 7:58 PM, Laurent Pinchart
<laurent.pinchart+renesas@ideasonboard.com> wrote:

> When implemented as a separate IP block, GPIOs should be handled by a
> separate driver. To make this possible GPIO support needs to be optional
> in the sh-pfc driver.
>
> If no GPIO data registers are supplied in the SoC information structure
> skip registration of the gpiochip.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-03-13 17:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-10 18:58 [PATCH/RFC 05/12] sh-pfc: Make GPIO support optional Laurent Pinchart
2013-03-13 17:29 ` Linus Walleij

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.