summaryrefslogtreecommitdiff
path: root/drivers/char
diff options
context:
space:
mode:
authorAdam Thomson <Adam.Thomson.Opensource@diasemi.com>2018-10-08 13:53:59 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-11-13 11:08:33 -0800
commit18083411913dd92f9fc01aa533f0cdbe594f7425 (patch)
treef596e5a6f2662c2dbde6c44a3c93c44ac2ca3820 /drivers/char
parent7c190bb8c9a1389a3d8f3379de9cc02a0cfeb2c0 (diff)
usb: typec: tcpm: Report back negotiated PPS voltage and current
[ Upstream commit 554fab6dbf20ee7298ed2d4e8398b85e6058abb7 ] Currently when requesting a specific voltage or current through the psy interface, for PPS, when reading back from that interface the values will always be the same as previously given, if the request was successful. However PPS only allows for 20mV voltage steps and 50mA current steps, and the psy class expects microvolt and micro amp requests, so inbetween values can be provided through this interface. Really when reading back the true values negotiated should be given, and not the ones originally asked for. To report the actual values negotiated with the Source, the values stored are now rounded down to the relevant step units prior to building the PPS request, so that those values are later correctly reported through the psy interface. In addition this improves the adjustments made to meet the operating power requirements of the platform, which previously could have been slightly out due to not using valid PPS units of voltage and current. Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Sasha Levin <sashal@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/char')
0 files changed, 0 insertions, 0 deletions