Commit 64842aad5ec5ea3b6f6e716ce53a863f7c409da8

Authored by Grant Likely
1 parent f4574beb96

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
... ... @@ -223,9 +223,6 @@
223 223 goto err_release_mem;
224 224 }
225 225  
226   - printk(KERN_INFO "bt8xxgpio: Abusing BT8xx card for GPIOs %d to %d\n",
227   - bg->gpio.base, bg->gpio.base + BT8XXGPIO_NR_GPIOS - 1);
228   -
229 226 return 0;
230 227  
231 228 err_release_mem:
drivers/gpio/gpio-cs5535.c
... ... @@ -347,7 +347,6 @@
347 347 if (err)
348 348 goto release_region;
349 349  
350   - dev_info(&pdev->dev, "GPIO support successfully loaded.\n");
351 350 return 0;
352 351  
353 352 release_region:
drivers/gpio/gpio-janz-ttl.c
... ... @@ -201,8 +201,6 @@
201 201 goto out_iounmap_regs;
202 202 }
203 203  
204   - dev_info(&pdev->dev, "module %d: registered GPIO device\n",
205   - pdata->modno);
206 204 return 0;
207 205  
208 206 out_iounmap_regs:
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
... ... @@ -206,7 +206,6 @@
206 206 np->full_name, status);
207 207 return status;
208 208 }
209   - pr_info("XGpio: %s: registered\n", np->full_name);
210 209 return 0;
211 210 }
212 211  
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... */
... ... @@ -198,8 +198,6 @@
198 198 if (ret)
199 199 goto err2;
200 200  
201   - pr_debug("%s: registered as generic GPIO chip, base is %d\n",
202   - np->full_name, gc->base);
203 201 return 0;
204 202 err2:
205 203 iounmap(mm_gc->regs);