Commit 64842aad authored by Grant Likely's avatar Grant Likely

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: default avatarHartmut Knaack <knaack.h@gmx.de>
[grant.likely@secretlab.ca: squashed 2 patches together]
Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
parent f4574beb
...@@ -418,9 +418,8 @@ static int __devinit adp5588_gpio_probe(struct i2c_client *client, ...@@ -418,9 +418,8 @@ static int __devinit adp5588_gpio_probe(struct i2c_client *client,
if (ret) if (ret)
goto err_irq; goto err_irq;
dev_info(&client->dev, "gpios %d..%d (IRQ Base %d) on a %s Rev. %d\n", dev_info(&client->dev, "IRQ Base: %d Rev.: %d\n",
gc->base, gc->base + gc->ngpio - 1, pdata->irq_base, revid);
pdata->irq_base, client->name, revid);
if (pdata->setup) { if (pdata->setup) {
ret = pdata->setup(client, gc->base, gc->ngpio, pdata->context); ret = pdata->setup(client, gc->base, gc->ngpio, pdata->context);
......
...@@ -223,9 +223,6 @@ static int bt8xxgpio_probe(struct pci_dev *dev, ...@@ -223,9 +223,6 @@ static int bt8xxgpio_probe(struct pci_dev *dev,
goto err_release_mem; 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; return 0;
err_release_mem: err_release_mem:
......
...@@ -347,7 +347,6 @@ static int __devinit cs5535_gpio_probe(struct platform_device *pdev) ...@@ -347,7 +347,6 @@ static int __devinit cs5535_gpio_probe(struct platform_device *pdev)
if (err) if (err)
goto release_region; goto release_region;
dev_info(&pdev->dev, "GPIO support successfully loaded.\n");
return 0; return 0;
release_region: release_region:
......
...@@ -201,8 +201,6 @@ static int __devinit ttl_probe(struct platform_device *pdev) ...@@ -201,8 +201,6 @@ static int __devinit ttl_probe(struct platform_device *pdev)
goto out_iounmap_regs; goto out_iounmap_regs;
} }
dev_info(&pdev->dev, "module %d: registered GPIO device\n",
pdata->modno);
return 0; return 0;
out_iounmap_regs: out_iounmap_regs:
......
...@@ -1150,8 +1150,8 @@ static int __devinit nmk_gpio_probe(struct platform_device *dev) ...@@ -1150,8 +1150,8 @@ static int __devinit nmk_gpio_probe(struct platform_device *dev)
nmk_gpio_init_irq(nmk_chip); nmk_gpio_init_irq(nmk_chip);
dev_info(&dev->dev, "Bits %i-%i at address %p\n", dev_info(&dev->dev, "at address %p\n",
nmk_chip->chip.base, nmk_chip->chip.base+31, nmk_chip->addr); nmk_chip->addr);
return 0; return 0;
out_free: out_free:
......
...@@ -290,10 +290,7 @@ static int pcf857x_probe(struct i2c_client *client, ...@@ -290,10 +290,7 @@ static int pcf857x_probe(struct i2c_client *client,
* methods can't be called from sleeping contexts. * methods can't be called from sleeping contexts.
*/ */
dev_info(&client->dev, "gpios %d..%d on a %s%s\n", dev_info(&client->dev, "%s\n",
gpio->chip.base,
gpio->chip.base + gpio->chip.ngpio - 1,
client->name,
client->irq ? " (irq ignored)" : ""); client->irq ? " (irq ignored)" : "");
/* Let platform code set up the GPIOs and their users. /* Let platform code set up the GPIOs and their users.
......
...@@ -206,7 +206,6 @@ static int __devinit xgpio_of_probe(struct device_node *np) ...@@ -206,7 +206,6 @@ static int __devinit xgpio_of_probe(struct device_node *np)
np->full_name, status); np->full_name, status);
return status; return status;
} }
pr_info("XGpio: %s: registered\n", np->full_name);
return 0; return 0;
} }
......
...@@ -1089,6 +1089,10 @@ int gpiochip_add(struct gpio_chip *chip) ...@@ -1089,6 +1089,10 @@ int gpiochip_add(struct gpio_chip *chip)
if (status) if (status)
goto fail; 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; return 0;
fail: fail:
/* failures here can mean systems won't boot... */ /* failures here can mean systems won't boot... */
......
...@@ -198,8 +198,6 @@ int of_mm_gpiochip_add(struct device_node *np, ...@@ -198,8 +198,6 @@ int of_mm_gpiochip_add(struct device_node *np,
if (ret) if (ret)
goto err2; goto err2;
pr_debug("%s: registered as generic GPIO chip, base is %d\n",
np->full_name, gc->base);
return 0; return 0;
err2: err2:
iounmap(mm_gc->regs); iounmap(mm_gc->regs);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment