mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 23:24:22 -04:00
soc: qcom: eud: Update the state of extcon too during probe
If EUD is enabled by the bootloader, currently the kernel driver only enables the interrupts. However, the USB/extcon will still see that the cable is disconnected as the EUD driver doesn't set an initial state. Hence, explicitly set the state of the USB as 'true' (connected) if the driver's probe realises that EUD is already enabled by the bootloader. Change-Id: I27c7fde4667c72698fa3da042361829a692792cc Signed-off-by: Raghavendra Rao Ananta <rananta@codeaurora.org>
This commit is contained in:
parent
5bebd12bfa
commit
e9e0c0ecf2
1 changed files with 16 additions and 0 deletions
|
|
@ -717,6 +717,22 @@ static int msm_eud_probe(struct platform_device *pdev)
|
|||
/* Proceed enable other EUD elements if bootloader has enabled it */
|
||||
if (msm_eud_hw_is_enabled(pdev)) {
|
||||
msm_eud_enable_irqs(chip);
|
||||
|
||||
/*
|
||||
* Set the default cable state to usb connect and charger
|
||||
* enable
|
||||
*/
|
||||
ret = extcon_set_state_sync(chip->extcon, EXTCON_USB, true);
|
||||
if (ret)
|
||||
dev_warn(&pdev->dev, "Failed to set EXTCON_USB (%d)\n",
|
||||
ret);
|
||||
|
||||
ret = extcon_set_state_sync(chip->extcon,
|
||||
EXTCON_CHG_USB_SDP, true);
|
||||
if (ret)
|
||||
dev_warn(&pdev->dev,
|
||||
"Failed to set EXTCON_CHG_USB_SDP (%d)\n", ret);
|
||||
|
||||
enable = EUD_ENABLE_CMD;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue