• Fabien Parent's avatar
    power: supply: cros: add support for dedicated port · 3af15cfa
    Fabien Parent authored
    ChromeOS devices can have one optional dedicated port.
    The Dedicated port is unique and similar to the USB PD ports
    except that it doesn't support as many properties.
    
    The presence of a dedicated port is determined from whether the
    EC's charger port count is equal to 'number of USB PD port' + 1.
    The dedicated port ID is always the last valid port ID.
    
    This commit keeps compatibility with Embedded Controllers that do not
    support the new EC_CMD_CHARGE_PORT_COUNT command by setting
    the number of charger port to be equal to the number of USB PD port
    when this command fails.
    Signed-off-by: default avatarFabien Parent <fparent@baylibre.com>
    Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
    3af15cfa
cros_usbpd-charger.c 17 KB