gpiolib: output basic details and consolidate gpio device drivers
authorGrant Likely <grant.likely@secretlab.ca>
Sun, 6 Nov 2011 18:36:18 +0000 (11:36 -0700)
committerGrant Likely <grant.likely@secretlab.ca>
Mon, 12 Dec 2011 20:40:16 +0000 (13:40 -0700)
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>
drivers/gpio/gpio-adp5588.c
drivers/gpio/gpio-bt8xx.c
drivers/gpio/gpio-cs5535.c
drivers/gpio/gpio-janz-ttl.c
drivers/gpio/gpio-nomadik.c
drivers/gpio/gpio-pcf857x.c
drivers/gpio/gpio-xilinx.c
drivers/gpio/gpiolib.c
drivers/of/gpio.c

index 3525ad91877162aefb6cacc5bcd0963f3156aee7..9ad1703d1408aa0c8661de5826e3247ddeaf3f30 100644 (file)
@@ -418,9 +418,8 @@ static int __devinit adp5588_gpio_probe(struct i2c_client *client,
        if (ret)
                goto err_irq;
 
-       dev_info(&client->dev, "gpios %d..%d (IRQ Base %d) on a %s Rev. %d\n",
-                       gc->base, gc->base + gc->ngpio - 1,
-                       pdata->irq_base, client->name, revid);
+       dev_info(&client->dev, "IRQ Base: %d Rev.: %d\n",
+                       pdata->irq_base, revid);
 
        if (pdata->setup) {
                ret = pdata->setup(client, gc->base, gc->ngpio, pdata->context);
index ec57936aef62ff936bc6cb0244dc029be467a879..5ca4098ba0925c44af3e6d688c609342f821b5af 100644 (file)
@@ -223,9 +223,6 @@ static int bt8xxgpio_probe(struct pci_dev *dev,
                goto err_release_mem;
        }
 
-       printk(KERN_INFO "bt8xxgpio: Abusing BT8xx card for GPIOs %d to %d\n",
-              bg->gpio.base, bg->gpio.base + BT8XXGPIO_NR_GPIOS - 1);
-
        return 0;
 
 err_release_mem:
index 6e16cba56ad2e291ca39fdeeadb4844c968b4029..693a81beb3c7587e753c235e213163205d0134e5 100644 (file)
@@ -347,7 +347,6 @@ static int __devinit cs5535_gpio_probe(struct platform_device *pdev)
        if (err)
                goto release_region;
 
-       dev_info(&pdev->dev, "GPIO support successfully loaded.\n");
        return 0;
 
 release_region:
index 813ac077e5d7d5b0d25e465c53dcb10a023ef595..6f7fda0b61abf1129e514e46443b3d6dd1745c7f 100644 (file)
@@ -201,8 +201,6 @@ static int __devinit ttl_probe(struct platform_device *pdev)
                goto out_iounmap_regs;
        }
 
-       dev_info(&pdev->dev, "module %d: registered GPIO device\n",
-                            pdata->modno);
        return 0;
 
 out_iounmap_regs:
index 1ebedfb6d46dba7cb7c30e2a9400f6400e8b9159..839624f9fe6aa6dca29aba693dad33671abed888 100644 (file)
@@ -1150,8 +1150,8 @@ static int __devinit nmk_gpio_probe(struct platform_device *dev)
 
        nmk_gpio_init_irq(nmk_chip);
 
-       dev_info(&dev->dev, "Bits %i-%i at address %p\n",
-                nmk_chip->chip.base, nmk_chip->chip.base+31, nmk_chip->addr);
+       dev_info(&dev->dev, "at address %p\n",
+                nmk_chip->addr);
        return 0;
 
 out_free:
index 3e1f1ecd07bec0555b7d16a73049001839591e89..2d1de9e7e9bd921f9db099777ddebce6f19c7056 100644 (file)
@@ -290,10 +290,7 @@ static int pcf857x_probe(struct i2c_client *client,
         * methods can't be called from sleeping contexts.
         */
 
-       dev_info(&client->dev, "gpios %d..%d on a %s%s\n",
-                       gpio->chip.base,
-                       gpio->chip.base + gpio->chip.ngpio - 1,
-                       client->name,
+       dev_info(&client->dev, "%s\n",
                        client->irq ? " (irq ignored)" : "");
 
        /* Let platform code set up the GPIOs and their users.
index 0ce6ac9898b113d38fd9a2dd54f70a27d89beb47..79b0fe8a7253523be260f621825eba0ca1bcd29d 100644 (file)
@@ -206,7 +206,6 @@ static int __devinit xgpio_of_probe(struct device_node *np)
                       np->full_name, status);
                return status;
        }
-       pr_info("XGpio: %s: registered\n", np->full_name);
        return 0;
 }
 
index a971e3d043ba0535ed0539146b5530443cd8af17..698f59ea7c18fb816c18b47756de08ab91da54be 100644 (file)
@@ -1089,6 +1089,10 @@ unlock:
        if (status)
                goto fail;
 
+       pr_info("gpiochip_add: registered GPIOs %d to %d on device: %s\n",
+               chip->base, chip->base + chip->ngpio - 1,
+               chip->label ? : "generic");
+
        return 0;
 fail:
        /* failures here can mean systems won't boot... */
index ef0105fa52b14d1280e3fb746387d713cb0d7933..ea4f2faab2220faa1373ac3038761947106d352a 100644 (file)
@@ -198,8 +198,6 @@ int of_mm_gpiochip_add(struct device_node *np,
        if (ret)
                goto err2;
 
-       pr_debug("%s: registered as generic GPIO chip, base is %d\n",
-                np->full_name, gc->base);
        return 0;
 err2:
        iounmap(mm_gc->regs);