• Hans de Goede's avatar
    power: supply: axp288_charger: Actually get and use the USB_HOST extcon device · 7508f441
    Hans de Goede authored
    Nothing was setting info->otg.cable, so the extcon_get_cable_state_
    calls on it would always return -EINVAL.
    
    This commit fixes this by actually setting info->otg.cable using the new
    extcon_get_extcon_dev_by_cable_id function.
    
    This commit also makes failing to register the extcon notifier for the
    USB_HOST cable an error rather then a warning, because we MUST have this
    notfier to properly disable the VBUS path when in host mode so that we're
    not drawing current from the 5V boost converter which is supplying power
    to the otg port when in host mode.
    Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
    Signed-off-by: default avatarSebastian Reichel <sre@kernel.org>
    7508f441
axp288_charger.c 24 KB