enlightenment/src/modules/battery
Daniel Zaoui 49459b6b72 Battery: fix the battery status when some battery devices are not valid
It happens that some devices are considered as batteries, even if they
cannot be charged or used as a power supply for the laptop.
The ELAN device deals with the touchpad and is a "battery". When looking
at the udev info, it appears that there is no technology present as
well as the basic battery info (energy levels).

P: /devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-0/i2c-ELAN24CC:00/0018:04F3:24CC.0003/power_supply/hid-0018:04F3:24CC.0003-battery
E: DEVPATH=/devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-0/i2c-ELAN24CC:00/0018:04F3:24CC.0003/power_supply/hid-0018:04F3:24CC.0003-battery
E: POWER_SUPPLY_CAPACITY=1
E: POWER_SUPPLY_MODEL_NAME=ELAN24CC:00 04F3:24CC
E: POWER_SUPPLY_NAME=hid-0018:04F3:24CC.0003-battery
E: POWER_SUPPLY_ONLINE=1
E: POWER_SUPPLY_PRESENT=1
E: POWER_SUPPLY_SCOPE=Device
E: POWER_SUPPLY_STATUS=Discharging
E: SUBSYSTEM=power_supply

The issue with that kind of devices is that it confuses the battery
gadget. Since two batteries are present, the total capacity is divided
by 2, resulting in the gadget displaying only 50% when the battery is
fully charged.
To avoid this, we check that the battery technology is known.

@fix
2018-06-05 00:30:47 +03:00
..
batget.c batget - fix warnings about buffer sizes 2017-08-04 14:53:30 +09:00
e-module-battery.edj new battery icon. 2011-06-21 23:54:43 +00:00
e_mod_config.c remove library checks for a number of modules along with useless defines 2016-03-11 17:19:32 -05:00
e_mod_main.c Battery: fix the battery status when some battery devices are not valid 2018-06-05 00:30:47 +03:00
e_mod_main.h use E_BITFIELD define for bitfield struct members 2017-11-07 10:39:56 -05:00
e_mod_sysctl.c battery: fix typo. 2017-08-29 09:18:42 -04:00
e_mod_udev.c meson - make modules with helper binaries simpelr to build 2017-08-11 19:50:48 +09:00
e_mod_upower.c meson - make modules with helper binaries simpelr to build 2017-08-11 19:50:48 +09:00
meson.build meson - make modules with helper binaries simpelr to build 2017-08-11 19:50:48 +09:00
module.desktop clean up .desktop files and misc typos 2018-01-04 09:57:52 -05:00