summaryrefslogtreecommitdiffstats
path: root/drivers/power/test_power.c
Commit message (Collapse)AuthorAgeFilesLines
* test_power: Fix a bug in setting module parameter valuesAndrey Gelman2013-03-181-10/+21
| | | | | | | | | | 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 <andreyg@compulab.co.il> Signed-off-by: Anton Vorontsov <anton@enomsg.org>
* test_power: Add VOLTAGE_NOW and BATTERY_TEMP propertiesDmitry Eremin-Solenikov2012-06-201-0/+31
| | | | | | | | Emulate battery temperature (fixed to 26) and battery voltage (variable) properties. Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin@mentor.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
* test_power: Add support for USB AC sourceDmitry Eremin-Solenikov2012-06-201-2/+46
| | | | | | | | Usually a device has both AC plug and UDC plug usable for charging. Provide both AC sources. Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin@mentor.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
* power: Make test_power driver more dynamic.John Stultz2011-05-201-10/+266
| | | | | | | | | | | | | | | | | | | | | | | | In 2008 Masashi YOKOTA <yokota@pylone.jp> 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 <cbouatmailru@gmail.com> CC: Akihiro MAEDA <sola.1980.a@gmail.com> CC: Masashi YOKOTA <yokota@pylone.jp> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
* power_supply: Add test_power driverAnton Vorontsov2010-05-181-0/+163
Just a handy driver that is used for testing purposes. Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
OpenPOWER on IntegriCloud