linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gpio/samsung: Complain loudly if we don't know the SoC
@ 2011-10-17 21:04 Mark Brown
  2011-10-17 21:07 ` Grant Likely
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Brown @ 2011-10-17 21:04 UTC (permalink / raw)
  To: linux-arm-kernel

If we don't know the SoC type then we won't add any chips which is rather
unfortunate as neither GPIO nor pinmux APIs will work, breaking lots of
different subsystems. Logging at least provides a hint to the user as to
what's gone wrong.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 drivers/gpio/gpio-samsung.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/gpio/gpio-samsung.c b/drivers/gpio/gpio-samsung.c
index 8baa946..90455de 100644
--- a/drivers/gpio/gpio-samsung.c
+++ b/drivers/gpio/gpio-samsung.c
@@ -2495,6 +2495,9 @@ static __init int samsung_gpiolib_init(void)
 		s5p_register_gpioint_bank(IRQ_GPIO_XA, 0, IRQ_GPIO1_NR_GROUPS);
 		s5p_register_gpioint_bank(IRQ_GPIO_XB, IRQ_GPIO1_NR_GROUPS, IRQ_GPIO2_NR_GROUPS);
 #endif
+	} else {
+		pr_crit("Unknown SoC in gpio-samsung, no GPIOs added\n");
+		return -ENODEV;
 	}
 
 	return 0;
-- 
1.7.6.3

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

* [PATCH] gpio/samsung: Complain loudly if we don't know the SoC
  2011-10-17 21:04 [PATCH] gpio/samsung: Complain loudly if we don't know the SoC Mark Brown
@ 2011-10-17 21:07 ` Grant Likely
  2011-10-17 21:33   ` Mark Brown
  0 siblings, 1 reply; 3+ messages in thread
From: Grant Likely @ 2011-10-17 21:07 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Oct 17, 2011 at 3:04 PM, Mark Brown
<broonie@opensource.wolfsonmicro.com> wrote:
> If we don't know the SoC type then we won't add any chips which is rather
> unfortunate as neither GPIO nor pinmux APIs will work, breaking lots of
> different subsystems. Logging at least provides a hint to the user as to
> what's gone wrong.
>
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

Be Bolder!  May as well use WARN() and be really obnoxious.  :-)

g.

> ---
> ?drivers/gpio/gpio-samsung.c | ? ?3 +++
> ?1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/gpio/gpio-samsung.c b/drivers/gpio/gpio-samsung.c
> index 8baa946..90455de 100644
> --- a/drivers/gpio/gpio-samsung.c
> +++ b/drivers/gpio/gpio-samsung.c
> @@ -2495,6 +2495,9 @@ static __init int samsung_gpiolib_init(void)
> ? ? ? ? ? ? ? ?s5p_register_gpioint_bank(IRQ_GPIO_XA, 0, IRQ_GPIO1_NR_GROUPS);
> ? ? ? ? ? ? ? ?s5p_register_gpioint_bank(IRQ_GPIO_XB, IRQ_GPIO1_NR_GROUPS, IRQ_GPIO2_NR_GROUPS);
> ?#endif
> + ? ? ? } else {
> + ? ? ? ? ? ? ? pr_crit("Unknown SoC in gpio-samsung, no GPIOs added\n");
> + ? ? ? ? ? ? ? return -ENODEV;
> ? ? ? ?}
>
> ? ? ? ?return 0;
> --
> 1.7.6.3
>
>



-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

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

* [PATCH] gpio/samsung: Complain loudly if we don't know the SoC
  2011-10-17 21:07 ` Grant Likely
@ 2011-10-17 21:33   ` Mark Brown
  0 siblings, 0 replies; 3+ messages in thread
From: Mark Brown @ 2011-10-17 21:33 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Oct 17, 2011 at 03:07:47PM -0600, Grant Likely wrote:
> On Mon, Oct 17, 2011 at 3:04 PM, Mark Brown

> > If we don't know the SoC type then we won't add any chips which is rather
> > unfortunate as neither GPIO nor pinmux APIs will work, breaking lots of
> > different subsystems. Logging at least provides a hint to the user as to
> > what's gone wrong.

> > Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

> Be Bolder!  May as well use WARN() and be really obnoxious.  :-)

Actually what's really unfortunate here is that in most configurations
this will cause a catastrophic failure to boot so we never get far
enough to see the logging at all.  We really need aSCREAM_THROUGH_DEBUG_LL()
or whatever.  Or to fix these things to dump via that route if we don't
have the console up yet, which is going to be more practical.

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

end of thread, other threads:[~2011-10-17 21:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-17 21:04 [PATCH] gpio/samsung: Complain loudly if we don't know the SoC Mark Brown
2011-10-17 21:07 ` Grant Likely
2011-10-17 21:33   ` Mark Brown

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).