Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 2530daa1 authored by Jean Delvare's avatar Jean Delvare Committed by Anton Vorontsov
Browse files

power_supply: Assume mains power by default



If no power class device is found in power_supply_is_system_supplied(),
the function currently returns 0, which basically means that the system
is supposed to be running on battery. In practice, mobile devices tend
to always implement at least one power class device and more often two
(battery and AC adapter). Systems with no registered power class
devices are more likely to be desktop systems, where the system is
always powered by mains.

So, change the default return value of
power_supply_is_system_supplied() from 0 (running on battery) to 1
(running on mains.)

Signed-off-by: default avatarJean Delvare <jdelvare@suse.de>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAnton Vorontsov <cbouatmailru@gmail.com>
parent 62df3935
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment