• Hans de Goede's avatar
    staging: typec: fusb302: Add support for USB2 charger detection through extcon · 382099d6
    Hans de Goede authored
    The fusb302 port-controller relies on an external device doing USB2
    charger-type detection.
    
    The Intel Whiskey Cove PMIC with which the fusb302 is combined on some
    X86/ACPI platforms already has a charger-type detection driver which
    uses extcon to communicate the detected charger-type.
    
    Rather then inventing a new API for USB2 charger-type detection
    specifically for use with the tcpm code, this commit simply re-uses the
    existing extcon API and uses that do USB2 charger detection.
    
    Note that the "fcs,extcon-name" property name is only for kernel internal
    use by X86/ACPI platform code and as such is NOT documented in
    the fusb302 devicetree bindings.
    
    Cc: "Yueyao (Nathan) Zhu" <yueyao@google.com>
    Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
    Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    382099d6
fusb302.c 48 KB