Commit 64842aad5ec5ea3b6f6e716ce53a863f7c409da8
1 parent
f4574beb96
Exists in
master
and in
6 other branches
gpiolib: output basic details and consolidate gpio device drivers
This patch adds a kernel message, containing GPIO range and device name on successful device registration, and removes duplicate messages from the following drivers: * gpio-adp5588 * gpio-bt8xx * gpio-cs5535 * gpio-janz-ttl * gpio-nomadik * gpio-pcf857x * gpio-xilinx * drivers/of/gpio.c Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> [grant.likely@secretlab.ca: squashed 2 patches together] Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Showing 9 changed files with 9 additions and 18 deletions Side-by-side Diff
drivers/gpio/gpio-adp5588.c
... | ... | @@ -418,9 +418,8 @@ |
418 | 418 | if (ret) |
419 | 419 | goto err_irq; |
420 | 420 | |
421 | - dev_info(&client->dev, "gpios %d..%d (IRQ Base %d) on a %s Rev. %d\n", | |
422 | - gc->base, gc->base + gc->ngpio - 1, | |
423 | - pdata->irq_base, client->name, revid); | |
421 | + dev_info(&client->dev, "IRQ Base: %d Rev.: %d\n", | |
422 | + pdata->irq_base, revid); | |
424 | 423 | |
425 | 424 | if (pdata->setup) { |
426 | 425 | ret = pdata->setup(client, gc->base, gc->ngpio, pdata->context); |
drivers/gpio/gpio-bt8xx.c
drivers/gpio/gpio-cs5535.c
drivers/gpio/gpio-janz-ttl.c
drivers/gpio/gpio-nomadik.c
... | ... | @@ -1150,8 +1150,8 @@ |
1150 | 1150 | |
1151 | 1151 | nmk_gpio_init_irq(nmk_chip); |
1152 | 1152 | |
1153 | - dev_info(&dev->dev, "Bits %i-%i at address %p\n", | |
1154 | - nmk_chip->chip.base, nmk_chip->chip.base+31, nmk_chip->addr); | |
1153 | + dev_info(&dev->dev, "at address %p\n", | |
1154 | + nmk_chip->addr); | |
1155 | 1155 | return 0; |
1156 | 1156 | |
1157 | 1157 | out_free: |
drivers/gpio/gpio-pcf857x.c
... | ... | @@ -290,10 +290,7 @@ |
290 | 290 | * methods can't be called from sleeping contexts. |
291 | 291 | */ |
292 | 292 | |
293 | - dev_info(&client->dev, "gpios %d..%d on a %s%s\n", | |
294 | - gpio->chip.base, | |
295 | - gpio->chip.base + gpio->chip.ngpio - 1, | |
296 | - client->name, | |
293 | + dev_info(&client->dev, "%s\n", | |
297 | 294 | client->irq ? " (irq ignored)" : ""); |
298 | 295 | |
299 | 296 | /* Let platform code set up the GPIOs and their users. |
drivers/gpio/gpio-xilinx.c
drivers/gpio/gpiolib.c
... | ... | @@ -1089,6 +1089,10 @@ |
1089 | 1089 | if (status) |
1090 | 1090 | goto fail; |
1091 | 1091 | |
1092 | + pr_info("gpiochip_add: registered GPIOs %d to %d on device: %s\n", | |
1093 | + chip->base, chip->base + chip->ngpio - 1, | |
1094 | + chip->label ? : "generic"); | |
1095 | + | |
1092 | 1096 | return 0; |
1093 | 1097 | fail: |
1094 | 1098 | /* failures here can mean systems won't boot... */ |