Commit 5f9277af authored by Kyle Tso's avatar Kyle Tso
Browse files

max77759_charger: Set OTG voltage with VBYPSET



Always use VBYPSET to set the boost voltage for USB OTG. Call
max77759_otg_bypass_enable to specify the voltage value. Call
max77759_otg_bypass_disable to return to the default value 5.3V.

Try to read the devicetree property "max77759,usb-otg-mv". If it exists,
the value will be used as the USB OTG voltage. Otherwise, use the
default value 5000 mV.

Also fix a problem in max77759_otg_vbyp_mv_to_code. If vbyp equals to
5000, it sould return 0, not a negative value.

Bug: 201252776
Signed-off-by: default avatarKyle Tso <kyletso@google.com>
Change-Id: If1902dabd04311d170d378860bf0c02c9dca79ab
parent 866ee47b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment