[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Tue, 11 Oct 2011 00:22:52 +0200
From: Hartmut Knaack <knaack.h@....de>
To: Grant Likely <grant.likely@...retlab.ca>
CC: linux-kernel@...r.kernel.org
Subject: [Patch 2/2] gpio-pca953x: fix gpio_base and add verbosity
Inspired by the gpio-pcf857x driver, this patch will output information
about the instantiated gpio-chip, including gpio start and end, chip
type and if irq is used.
Signed-off-by: Hartmut Knaack <knaack.h@....de>
-------------------------------------------------------------
diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c
index ae479fd..4bdb88e 100644
--- a/drivers/gpio/gpio-pca953x.c
+++ b/drivers/gpio/gpio-pca953x.c
@@ -683,6 +683,12 @@ static int __devinit pca953x_probe(struct
i2c_client *client,
if (ret)
goto out_failed;
+ dev_info(&client->dev, "gpios %d..%d added on a %s%s\n",
+ chip->gpio_chip.base,
+ chip->gpio_chip.base + chip->gpio_chip.ngpio - 1,
+ client->name,
+ client->irq ? " (irq ignored)" : "");
+
ret = gpiochip_add(&chip->gpio_chip);
if (ret)
goto out_failed_irq;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists