Commit graph

4 commits

Author SHA1 Message Date
Michał Barnaś 5246cea800 usbc: improve error handling in the ucpd_stm32 and vbus_adc
As noted in PR#63165 checking of result should use comparison to
success value instead of checking if result is negative. It will
allow to check if function returned invalid but positive value.

Signed-off-by: Michał Barnaś <mb@semihalf.com>
2023-10-20 14:57:32 +02:00
Michał Barnaś 9608c8f667 usbc: fix conflicting Kconfigs for USB-C related init priority
There was a new Kconfig for USB-C init priority that is conflicting
with currently used Kconfig for init of VBUS and TCPC.
This commit changes the names to more specific related to the subsystem
they belong to.

Signed-off-by: Michał Barnaś <mb@semihalf.com>
2023-09-20 11:26:40 +01:00
Nick Ward 2bf091f8af drivers: usb-c: fix - check if adc_channel is ready before use
This will protect a user of this driver against driver initialisation
order misconfiguration.

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2023-07-17 10:16:22 +00:00
Sam Hurst 505892f1bb usb-c: Add USB-C VBUS ADC driver
This commit adds a VBUS driver the uses an ADC connected
to a voltage divider to measure VBUS.

Signed-off-by: Sam Hurst <sbh1187@gmail.com>
2022-10-22 18:38:35 -04:00