File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -185,13 +185,14 @@ static void usb20otg_power_enable(int enable)
185185 /* disable otg_drv power */
186186 if (gpio_is_valid (control_usb -> otg_gpios -> gpio ))
187187 gpio_set_value (control_usb -> otg_gpios -> gpio , 0 );
188- else if ( usb20otg_get_status ( USB_STATUS_BVABLID ))
189- rk_battery_charger_detect_cb (USB_OTG_POWER_OFF );
188+
189+ rk_battery_charger_detect_cb (USB_OTG_POWER_OFF );
190190 } else if (1 == enable ) {
191191 /* enable otg_drv power */
192192 if (gpio_is_valid (control_usb -> otg_gpios -> gpio ))
193193 gpio_set_value (control_usb -> otg_gpios -> gpio , 1 );
194- else if (!usb20otg_get_status (USB_STATUS_BVABLID ))
194+
195+ if (!usb20otg_get_status (USB_STATUS_BVABLID ))
195196 rk_battery_charger_detect_cb (USB_OTG_POWER_ON );
196197 }
197198}
Original file line number Diff line number Diff line change @@ -194,13 +194,14 @@ static void usb20otg_power_enable(int enable)
194194 /* disable otg_drv power */
195195 if (gpio_is_valid (control_usb -> otg_gpios -> gpio ))
196196 gpio_set_value (control_usb -> otg_gpios -> gpio , 0 );
197- else if ( usb20otg_get_status ( USB_STATUS_BVABLID ))
198- rk_battery_charger_detect_cb (USB_OTG_POWER_OFF );
197+
198+ rk_battery_charger_detect_cb (USB_OTG_POWER_OFF );
199199 } else if (1 == enable ) {
200200 /* enable otg_drv power */
201201 if (gpio_is_valid (control_usb -> otg_gpios -> gpio ))
202202 gpio_set_value (control_usb -> otg_gpios -> gpio , 1 );
203- else if (!usb20otg_get_status (USB_STATUS_BVABLID ))
203+
204+ if (!usb20otg_get_status (USB_STATUS_BVABLID ))
204205 rk_battery_charger_detect_cb (USB_OTG_POWER_ON );
205206 }
206207}
Original file line number Diff line number Diff line change @@ -183,13 +183,14 @@ static void usb20otg_power_enable(int enable)
183183 /* disable otg_drv power */
184184 if (gpio_is_valid (control_usb -> otg_gpios -> gpio ))
185185 gpio_set_value (control_usb -> otg_gpios -> gpio , 0 );
186- else if ( usb20otg_get_status ( USB_STATUS_BVABLID ))
187- rk_battery_charger_detect_cb (USB_OTG_POWER_OFF );
186+
187+ rk_battery_charger_detect_cb (USB_OTG_POWER_OFF );
188188 } else if (1 == enable ) {
189189 /* enable otg_drv power */
190190 if (gpio_is_valid (control_usb -> otg_gpios -> gpio ))
191191 gpio_set_value (control_usb -> otg_gpios -> gpio , 1 );
192- else if (!usb20otg_get_status (USB_STATUS_BVABLID ))
192+
193+ if (!usb20otg_get_status (USB_STATUS_BVABLID ))
193194 rk_battery_charger_detect_cb (USB_OTG_POWER_ON );
194195 }
195196}
Original file line number Diff line number Diff line change @@ -189,13 +189,14 @@ static void usb20otg_power_enable(int enable)
189189 /* disable otg_drv power */
190190 if (gpio_is_valid (control_usb -> otg_gpios -> gpio ))
191191 gpio_set_value (control_usb -> otg_gpios -> gpio , 0 );
192- else if ( usb20otg_get_status ( USB_STATUS_BVABLID ))
193- rk_battery_charger_detect_cb (USB_OTG_POWER_OFF );
192+
193+ rk_battery_charger_detect_cb (USB_OTG_POWER_OFF );
194194 } else if (1 == enable ) {
195195 /* enable otg_drv power */
196196 if (gpio_is_valid (control_usb -> otg_gpios -> gpio ))
197197 gpio_set_value (control_usb -> otg_gpios -> gpio , 1 );
198- else if (!usb20otg_get_status (USB_STATUS_BVABLID ))
198+
199+ if (!usb20otg_get_status (USB_STATUS_BVABLID ))
199200 rk_battery_charger_detect_cb (USB_OTG_POWER_ON );
200201 }
201202}
You can’t perform that action at this time.
0 commit comments