Replace hard-coded numbers for indices of power supply array with enum.
This improves a little the readability as one does not have to guess
which power supply is associated with number.
Signed-off-by: Krzysztof Kozlowski <[email protected]>
Signed-off-by: Sebastian Reichel <[email protected]>
When the kernel loads a module, module params are processed prior to
calling module_init. As a result, setting module param value should not
have side effects, at least as long as the module has not been
initialized.
Signed-off-by: Andrey Gelman <[email protected]>
Signed-off-by: Anton Vorontsov <[email protected]>
Emulate battery temperature (fixed to 26) and battery voltage (variable)
properties.
Signed-off-by: Dmitry Eremin-Solenikov <[email protected]>
Signed-off-by: Anton Vorontsov <[email protected]>
Usually a device has both AC plug and UDC plug usable for charging.
Provide both AC sources.
Signed-off-by: Dmitry Eremin-Solenikov <[email protected]>
Signed-off-by: Anton Vorontsov <[email protected]>
In 2008 Masashi YOKOTA <[email protected]> created the virtual
battery driver found here:
http://downloads.pylone.jp/src/virtual_battery/virtual_battery-0.0.1.tar.bz2
It found use out of tree, but was never merged upstream.
Since then the test_power driver has been merged, which provides
very similar functionality.
This patch extends the test_power driver to be more dynamic
at runtime, by merging portions of the Virtual Battery Driver
by Masashi YOKOTA.
With this patch, I can tweak the values in:
/sys/module/test_power/parameters/* and watch the behavior of
the gnome power managment daemon or other battery UI software.
CC: Anton Vorontsov <[email protected]>
CC: Akihiro MAEDA <[email protected]>
CC: Masashi YOKOTA <[email protected]>
Signed-off-by: John Stultz <[email protected]>
Signed-off-by: Anton Vorontsov <[email protected]>