@@ -643,8 +643,6 @@ void es8323_i2c_shutdown(struct i2c_client *client)
643643 */
644644int gpio_setup (struct es8323_chip * chip , struct i2c_client * client )
645645{
646- int hub_rest = -1 ;
647- int hub_en = -1 ;
648646 int ret = 0 ;
649647 enum of_gpio_flags flags ;
650648
@@ -705,35 +703,6 @@ int gpio_setup(struct es8323_chip *chip, struct i2c_client *client)
705703 gpio_direction_input (chip -> hp_det_gpio );
706704 }
707705
708- hub_en = of_get_named_gpio_flags (client -> dev .of_node , "hub_en" , 0 , & flags );
709- if (hub_en > 0 )
710- {
711- printk ("request gpio%d for hub enable gpio\n" , hub_en );
712- ret = devm_gpio_request (chip -> dev , hub_en , "hub_en" );
713- if (ret != 0 )
714- {
715- printk ("%s request hub en error" , __func__ );
716- return ret ;
717- }
718- gpio_direction_output (hub_en , 1 );
719- msleep (10 );
720- }
721-
722- hub_rest = of_get_named_gpio_flags (client -> dev .of_node , "hub_rest" , 0 , & flags );
723- if (hub_rest > 0 )
724- {
725- printk ("request gpio%d for hub reset gpio\n" , hub_rest );
726- ret = devm_gpio_request (chip -> dev , hub_rest , "hub_reset" );
727- if (ret != 0 )
728- {
729- printk ("%s request hub rst error" , __func__ );
730- return ret ;
731- }
732- gpio_direction_output (hub_rest , 0 );
733- msleep (20 );
734- gpio_set_value (hub_rest , 1 );
735- }
736-
737706 return 0 ;
738707}
739708
0 commit comments