diff options
Diffstat (limited to 'drivers/gpio/pca953x.c')
-rw-r--r-- | drivers/gpio/pca953x.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/gpio/pca953x.c b/drivers/gpio/pca953x.c index 9ceeb89f1325..37f35388a2ae 100644 --- a/drivers/gpio/pca953x.c +++ b/drivers/gpio/pca953x.c | |||
@@ -33,7 +33,12 @@ static const struct i2c_device_id pca953x_id[] = { | |||
33 | { "pca9554", 8, }, | 33 | { "pca9554", 8, }, |
34 | { "pca9555", 16, }, | 34 | { "pca9555", 16, }, |
35 | { "pca9557", 8, }, | 35 | { "pca9557", 8, }, |
36 | |||
36 | { "max7310", 8, }, | 37 | { "max7310", 8, }, |
38 | { "pca6107", 8, }, | ||
39 | { "tca6408", 8, }, | ||
40 | { "tca6416", 16, }, | ||
41 | /* NYET: { "tca6424", 24, }, */ | ||
37 | { } | 42 | { } |
38 | }; | 43 | }; |
39 | MODULE_DEVICE_TABLE(i2c, pca953x_id); | 44 | MODULE_DEVICE_TABLE(i2c, pca953x_id); |
@@ -47,9 +52,6 @@ struct pca953x_chip { | |||
47 | struct gpio_chip gpio_chip; | 52 | struct gpio_chip gpio_chip; |
48 | }; | 53 | }; |
49 | 54 | ||
50 | /* NOTE: we can't currently rely on fault codes to come from SMBus | ||
51 | * calls, so we map all errors to EIO here and return zero otherwise. | ||
52 | */ | ||
53 | static int pca953x_write_reg(struct pca953x_chip *chip, int reg, uint16_t val) | 55 | static int pca953x_write_reg(struct pca953x_chip *chip, int reg, uint16_t val) |
54 | { | 56 | { |
55 | int ret; | 57 | int ret; |
@@ -61,7 +63,7 @@ static int pca953x_write_reg(struct pca953x_chip *chip, int reg, uint16_t val) | |||
61 | 63 | ||
62 | if (ret < 0) { | 64 | if (ret < 0) { |
63 | dev_err(&chip->client->dev, "failed writing register\n"); | 65 | dev_err(&chip->client->dev, "failed writing register\n"); |
64 | return -EIO; | 66 | return ret; |
65 | } | 67 | } |
66 | 68 | ||
67 | return 0; | 69 | return 0; |
@@ -78,7 +80,7 @@ static int pca953x_read_reg(struct pca953x_chip *chip, int reg, uint16_t *val) | |||
78 | 80 | ||
79 | if (ret < 0) { | 81 | if (ret < 0) { |
80 | dev_err(&chip->client->dev, "failed reading register\n"); | 82 | dev_err(&chip->client->dev, "failed reading register\n"); |
81 | return -EIO; | 83 | return ret; |
82 | } | 84 | } |
83 | 85 | ||
84 | *val = (uint16_t)ret; | 86 | *val = (uint16_t)ret; |