aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2011-11-06 13:36:18 -0500
committerGrant Likely <grant.likely@secretlab.ca>2011-12-12 15:40:16 -0500
commit64842aad5ec5ea3b6f6e716ce53a863f7c409da8 (patch)
tree29e89d0de902636bcad5a63d0a872c04438bb9e0 /drivers/gpio
parentf4574beb9655dbe6a1513f308f0070e9e5e1ad0e (diff)
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>
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/gpio-adp5588.c5
-rw-r--r--drivers/gpio/gpio-bt8xx.c3
-rw-r--r--drivers/gpio/gpio-cs5535.c1
-rw-r--r--drivers/gpio/gpio-janz-ttl.c2
-rw-r--r--drivers/gpio/gpio-nomadik.c4
-rw-r--r--drivers/gpio/gpio-pcf857x.c5
-rw-r--r--drivers/gpio/gpio-xilinx.c1
-rw-r--r--drivers/gpio/gpiolib.c4
8 files changed, 9 insertions, 16 deletions
diff --git a/drivers/gpio/gpio-adp5588.c b/drivers/gpio/gpio-adp5588.c
index 3525ad918771..9ad1703d1408 100644
--- a/drivers/gpio/gpio-adp5588.c
+++ b/drivers/gpio/gpio-adp5588.c
@@ -418,9 +418,8 @@ static int __devinit adp5588_gpio_probe(struct i2c_client *client,
418 if (ret) 418 if (ret)
419 goto err_irq; 419 goto err_irq;
420 420
421 dev_info(&client->dev, "gpios %d..%d (IRQ Base %d) on a %s Rev. %d\n", 421 dev_info(&client->dev, "IRQ Base: %d Rev.: %d\n",
422 gc->base, gc->base + gc->ngpio - 1, 422 pdata->irq_base, revid);
423 pdata->irq_base, client->name, revid);
424 423
425 if (pdata->setup) { 424 if (pdata->setup) {
426 ret = pdata->setup(client, gc->base, gc->ngpio, pdata->context); 425 ret = pdata->setup(client, gc->base, gc->ngpio, pdata->context);
diff --git a/drivers/gpio/gpio-bt8xx.c b/drivers/gpio/gpio-bt8xx.c
index ec57936aef62..5ca4098ba092 100644
--- a/drivers/gpio/gpio-bt8xx.c
+++ b/drivers/gpio/gpio-bt8xx.c
@@ -223,9 +223,6 @@ static int bt8xxgpio_probe(struct pci_dev *dev,
223 goto err_release_mem; 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 return 0; 226 return 0;
230 227
231err_release_mem: 228err_release_mem:
diff --git a/drivers/gpio/gpio-cs5535.c b/drivers/gpio/gpio-cs5535.c
index 6e16cba56ad2..693a81beb3c7 100644
--- a/drivers/gpio/gpio-cs5535.c
+++ b/drivers/gpio/gpio-cs5535.c
@@ -347,7 +347,6 @@ static int __devinit cs5535_gpio_probe(struct platform_device *pdev)
347 if (err) 347 if (err)
348 goto release_region; 348 goto release_region;
349 349
350 dev_info(&pdev->dev, "GPIO support successfully loaded.\n");
351 return 0; 350 return 0;
352 351
353release_region: 352release_region:
diff --git a/drivers/gpio/gpio-janz-ttl.c b/drivers/gpio/gpio-janz-ttl.c
index 813ac077e5d7..6f7fda0b61ab 100644
--- a/drivers/gpio/gpio-janz-ttl.c
+++ b/drivers/gpio/gpio-janz-ttl.c
@@ -201,8 +201,6 @@ static int __devinit ttl_probe(struct platform_device *pdev)
201 goto out_iounmap_regs; 201 goto out_iounmap_regs;
202 } 202 }
203 203
204 dev_info(&pdev->dev, "module %d: registered GPIO device\n",
205 pdata->modno);
206 return 0; 204 return 0;
207 205
208out_iounmap_regs: 206out_iounmap_regs:
diff --git a/drivers/gpio/gpio-nomadik.c b/drivers/gpio/gpio-nomadik.c
index 1ebedfb6d46d..839624f9fe6a 100644
--- a/drivers/gpio/gpio-nomadik.c
+++ b/drivers/gpio/gpio-nomadik.c
@@ -1150,8 +1150,8 @@ static int __devinit nmk_gpio_probe(struct platform_device *dev)
1150 1150
1151 nmk_gpio_init_irq(nmk_chip); 1151 nmk_gpio_init_irq(nmk_chip);
1152 1152
1153 dev_info(&dev->dev, "Bits %i-%i at address %p\n", 1153 dev_info(&dev->dev, "at address %p\n",
1154 nmk_chip->chip.base, nmk_chip->chip.base+31, nmk_chip->addr); 1154 nmk_chip->addr);
1155 return 0; 1155 return 0;
1156 1156
1157out_free: 1157out_free:
diff --git a/drivers/gpio/gpio-pcf857x.c b/drivers/gpio/gpio-pcf857x.c
index 3e1f1ecd07be..2d1de9e7e9bd 100644
--- a/drivers/gpio/gpio-pcf857x.c
+++ b/drivers/gpio/gpio-pcf857x.c
@@ -290,10 +290,7 @@ static int pcf857x_probe(struct i2c_client *client,
290 * methods can't be called from sleeping contexts. 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", 293 dev_info(&client->dev, "%s\n",
294 gpio->chip.base,
295 gpio->chip.base + gpio->chip.ngpio - 1,
296 client->name,
297 client->irq ? " (irq ignored)" : ""); 294 client->irq ? " (irq ignored)" : "");
298 295
299 /* Let platform code set up the GPIOs and their users. 296 /* Let platform code set up the GPIOs and their users.
diff --git a/drivers/gpio/gpio-xilinx.c b/drivers/gpio/gpio-xilinx.c
index 0ce6ac9898b1..79b0fe8a7253 100644
--- a/drivers/gpio/gpio-xilinx.c
+++ b/drivers/gpio/gpio-xilinx.c
@@ -206,7 +206,6 @@ static int __devinit xgpio_of_probe(struct device_node *np)
206 np->full_name, status); 206 np->full_name, status);
207 return status; 207 return status;
208 } 208 }
209 pr_info("XGpio: %s: registered\n", np->full_name);
210 return 0; 209 return 0;
211} 210}
212 211
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index a971e3d043ba..698f59ea7c18 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -1089,6 +1089,10 @@ unlock:
1089 if (status) 1089 if (status)
1090 goto fail; 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 return 0; 1096 return 0;
1093fail: 1097fail:
1094 /* failures here can mean systems won't boot... */ 1098 /* failures here can mean systems won't boot... */