@@ -211,7 +211,6 @@ struct pca953x_chip {
211211
212212 struct i2c_client * client ;
213213 struct gpio_chip gpio_chip ;
214- const char * const * names ;
215214 unsigned long driver_data ;
216215 struct regulator * regulator ;
217216
@@ -712,7 +711,6 @@ static void pca953x_setup_gpio(struct pca953x_chip *chip, int gpios)
712711 gc -> label = dev_name (& chip -> client -> dev );
713712 gc -> parent = & chip -> client -> dev ;
714713 gc -> owner = THIS_MODULE ;
715- gc -> names = chip -> names ;
716714}
717715
718716#ifdef CONFIG_GPIO_PCA953X_IRQ
@@ -998,7 +996,7 @@ static int pca953x_irq_setup(struct pca953x_chip *chip,
998996}
999997#endif
1000998
1001- static int device_pca95xx_init (struct pca953x_chip * chip , u32 invert )
999+ static int device_pca95xx_init (struct pca953x_chip * chip )
10021000{
10031001 DECLARE_BITMAP (val , MAX_LINE );
10041002 u8 regaddr ;
@@ -1016,24 +1014,21 @@ static int device_pca95xx_init(struct pca953x_chip *chip, u32 invert)
10161014 if (ret )
10171015 goto out ;
10181016
1019- /* set platform specific polarity inversion */
1020- if (invert )
1021- bitmap_fill (val , MAX_LINE );
1022- else
1023- bitmap_zero (val , MAX_LINE );
1017+ /* clear polarity inversion */
1018+ bitmap_zero (val , MAX_LINE );
10241019
10251020 ret = pca953x_write_regs (chip , chip -> regs -> invert , val );
10261021out :
10271022 return ret ;
10281023}
10291024
1030- static int device_pca957x_init (struct pca953x_chip * chip , u32 invert )
1025+ static int device_pca957x_init (struct pca953x_chip * chip )
10311026{
10321027 DECLARE_BITMAP (val , MAX_LINE );
10331028 unsigned int i ;
10341029 int ret ;
10351030
1036- ret = device_pca95xx_init (chip , invert );
1031+ ret = device_pca95xx_init (chip );
10371032 if (ret )
10381033 goto out ;
10391034
@@ -1054,9 +1049,8 @@ static int pca953x_probe(struct i2c_client *client)
10541049{
10551050 struct pca953x_platform_data * pdata ;
10561051 struct pca953x_chip * chip ;
1057- int irq_base = 0 ;
1052+ int irq_base ;
10581053 int ret ;
1059- u32 invert = 0 ;
10601054 struct regulator * reg ;
10611055 const struct regmap_config * regmap_config ;
10621056
@@ -1068,8 +1062,6 @@ static int pca953x_probe(struct i2c_client *client)
10681062 if (pdata ) {
10691063 irq_base = pdata -> irq_base ;
10701064 chip -> gpio_start = pdata -> gpio_base ;
1071- invert = pdata -> invert ;
1072- chip -> names = pdata -> names ;
10731065 } else {
10741066 struct gpio_desc * reset_gpio ;
10751067
@@ -1158,10 +1150,10 @@ static int pca953x_probe(struct i2c_client *client)
11581150 */
11591151 if (PCA_CHIP_TYPE (chip -> driver_data ) == PCA957X_TYPE ) {
11601152 chip -> regs = & pca957x_regs ;
1161- ret = device_pca957x_init (chip , invert );
1153+ ret = device_pca957x_init (chip );
11621154 } else {
11631155 chip -> regs = & pca953x_regs ;
1164- ret = device_pca95xx_init (chip , invert );
1156+ ret = device_pca95xx_init (chip );
11651157 }
11661158 if (ret )
11671159 goto err_exit ;
@@ -1174,13 +1166,6 @@ static int pca953x_probe(struct i2c_client *client)
11741166 if (ret )
11751167 goto err_exit ;
11761168
1177- if (pdata && pdata -> setup ) {
1178- ret = pdata -> setup (client , chip -> gpio_chip .base ,
1179- chip -> gpio_chip .ngpio , pdata -> context );
1180- if (ret < 0 )
1181- dev_warn (& client -> dev , "setup failed, %d\n" , ret );
1182- }
1183-
11841169 return 0 ;
11851170
11861171err_exit :
@@ -1190,14 +1175,8 @@ static int pca953x_probe(struct i2c_client *client)
11901175
11911176static void pca953x_remove (struct i2c_client * client )
11921177{
1193- struct pca953x_platform_data * pdata = dev_get_platdata (& client -> dev );
11941178 struct pca953x_chip * chip = i2c_get_clientdata (client );
11951179
1196- if (pdata && pdata -> teardown ) {
1197- pdata -> teardown (client , chip -> gpio_chip .base ,
1198- chip -> gpio_chip .ngpio , pdata -> context );
1199- }
1200-
12011180 regulator_disable (chip -> regulator );
12021181}
12031182
0 commit comments