Skip to content

Commit

Permalink
gpio/samsung: Complain loudly if we don't know the SoC
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
  • Loading branch information
Mark Brown authored and Kukjin Kim committed Oct 17, 2011
1 parent 0f4e54c commit fbe92fc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/gpio/gpio-samsung.c
Original file line number Diff line number Diff line change
Expand Up @@ -2486,6 +2486,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 {
WARN(1, "Unknown SoC in gpio-samsung, no GPIOs added\n");
return -ENODEV;
}

return 0;
Expand Down

0 comments on commit fbe92fc

Please sign in to comment.