diff options
author | Bastien Nocera <hadess@hadess.net> | 2021-08-10 12:32:24 +0200 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2021-08-10 12:32:24 +0200 |
commit | 3b91711e82a932be12df4661a50b646e729164df (patch) | |
tree | 8d08761376e0ccf4023740f2605057156127d354 | |
parent | a14de392416a0e1a9a4f096a6e4cb54f65009d96 (diff) | |
download | upower-3b91711e82a932be12df4661a50b646e729164df.tar.gz |
linux: Don't throw away large but possible energy rates
USB PD 3.1 allows up to 240W (48V, 5A) and some proprietary supplies
already delivered more than 100W over USB-C (USB PD 3.0 limit).
Closes: #147
Reported by StefanBruens
-rw-r--r-- | src/linux/up-device-supply.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/linux/up-device-supply.c b/src/linux/up-device-supply.c index 4236ce4..300c74d 100644 --- a/src/linux/up-device-supply.c +++ b/src/linux/up-device-supply.c @@ -724,8 +724,8 @@ up_device_supply_refresh_battery (UpDeviceSupply *supply, if (energy_rate == 0xffff) energy_rate = 0; - /* sanity check to less than 100W */ - if (energy_rate > 100) + /* Ensure less than 300W, above the 240W possible with USB Power Delivery */ + if (energy_rate > 300) energy_rate = 0; /* the hardware reporting failed -- try to calculate this */ |