aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpio/pca953x.c4
-rw-r--r--include/linux/i2c/pca953x.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpio/pca953x.c b/drivers/gpio/pca953x.c
index 8dc0164bd51e..2dae94fbabf4 100644
--- a/drivers/gpio/pca953x.c
+++ b/drivers/gpio/pca953x.c
@@ -50,6 +50,7 @@ struct pca953x_chip {
50 50
51 struct i2c_client *client; 51 struct i2c_client *client;
52 struct gpio_chip gpio_chip; 52 struct gpio_chip gpio_chip;
53 char **names;
53}; 54};
54 55
55static int pca953x_write_reg(struct pca953x_chip *chip, int reg, uint16_t val) 56static int pca953x_write_reg(struct pca953x_chip *chip, int reg, uint16_t val)
@@ -192,6 +193,7 @@ static void pca953x_setup_gpio(struct pca953x_chip *chip, int gpios)
192 gc->label = chip->client->name; 193 gc->label = chip->client->name;
193 gc->dev = &chip->client->dev; 194 gc->dev = &chip->client->dev;
194 gc->owner = THIS_MODULE; 195 gc->owner = THIS_MODULE;
196 gc->names = chip->names;
195} 197}
196 198
197static int __devinit pca953x_probe(struct i2c_client *client, 199static int __devinit pca953x_probe(struct i2c_client *client,
@@ -215,6 +217,8 @@ static int __devinit pca953x_probe(struct i2c_client *client,
215 217
216 chip->gpio_start = pdata->gpio_base; 218 chip->gpio_start = pdata->gpio_base;
217 219
220 chip->names = pdata->names;
221
218 /* initialize cached registers from their original values. 222 /* initialize cached registers from their original values.
219 * we can't share this chip with another i2c master. 223 * we can't share this chip with another i2c master.
220 */ 224 */
diff --git a/include/linux/i2c/pca953x.h b/include/linux/i2c/pca953x.h
index 3c7361217df8..81736d6a8db7 100644
--- a/include/linux/i2c/pca953x.h
+++ b/include/linux/i2c/pca953x.h
@@ -15,4 +15,5 @@ struct pca953x_platform_data {
15 int (*teardown)(struct i2c_client *client, 15 int (*teardown)(struct i2c_client *client,
16 unsigned gpio, unsigned ngpio, 16 unsigned gpio, unsigned ngpio,
17 void *context); 17 void *context);
18 char **names;
18}; 19};