- 10 Jan, 2012 1 commit
-
-
Anton Vorontsov authored
There are some problems with MFD part of this driver, so the driver fails to build: drivers/power/da9052-battery.c: In function 'da9052_bat_read_volt': drivers/power/da9052-battery.c:293:2: error: implicit declaration of function 'da9052_adc_manual_read' [-Werror=implicit-function-declaration] drivers/power/da9052-battery.c: In function 'da9052_bat_check_presence': drivers/power/da9052-battery.c:306:2: error: implicit declaration of function 'da9052_adc_read_temp' [-Werror=implicit-function-declaration] drivers/power/da9052-battery.c: In function 'da9052_determine_vc_tbl_index': drivers/power/da9052-battery.c:348:1: warning: control reaches end of non-void function [-Wreturn-type] cc1: some warnings being treated as errors The fix for MFD part will probably go post -rc1 (or in the next merge window), so let's disable the driver for now. Reported-by:
Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by:
Anton Vorontsov <cbouatmailru@gmail.com>
-
- 07 Jan, 2012 1 commit
-
-
Anton Vorontsov authored
The function is not exported to modules, plus we do want to catch anyone who tries to create complex hierarchy (in that case we'd need to change 'powers' symlink to a directory, probably under a different name to not break ABI). This patch fixes the following build error: ERROR: "sysfs_create_link_nowarn" [drivers/power/power_supply.ko] undefined! Reported-by:
Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by:
Anton Vorontsov <cbouatmailru@gmail.com>
-
- 06 Jan, 2012 14 commits
-
-
Heiko Stübner authored
Some sources for adc battery information provide only inaccurate results where the read value differs from the real value with positive and negative offsets. For such sources it can be more accurate to collect two or more value sample and use the average of all collected values. This patch adds pdata options volt_samples, current_samples and backup_volt_samples to specifiy the number of samples to collect, reads the specified number of samples and calculates the average of those. For unset sample-number-values a default of 1 is assumed. Signed-off-by:
Heiko Stuebner <heiko@sntech.de> Signed-off-by:
Anton Vorontsov <cbouatmailru@gmail.com>
-
Ashish Jangam authored
Driver for DA9052 battery charger. This driver depends on DA9052 MFD core dirver for definitions and methods. This patch is functionally tested on Samsung SMDKV6410. Signed-off-by:
David Dajun Chen <dchen@diasemi.com> Signed-off-by:
Ashish Jangam <ashish.jangam@kpitcummins.com> Signed-off-by:
Anton Vorontsov <cbouatmailru@gmail.com>
-
Felipe Contreras authored
A segfault happens if there's no board information. Signed-off-by:
Felipe Contreras <felipe.contreras@gmail.com> Acked-by:
Heikki Krogerus <krohei@gmail.com> Signed-off-by:
Anton Vorontsov <cbouatmailru@gmail.com>
-
Axel Lin authored
wait_for_completion_interruptible_timeout() may return negative value. In this case, checking if (t > 0) will return true if t is unsigned. Signed-off-by:
Axel Lin <axel.lin@gmail.com> Acked-by:
Lars-Peter Clausen <lars@metafoo.de> Signed-off-by:
Anton Vorontsov <cbouatmailru@gmail.com>
-
Jean Delvare authored
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:
Jean 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:
Anton Vorontsov <cbouatmailru@gmail.com>
-
Olof Johansson authored
It should be an of module table, not i2c. Signed-off-by:
Olof Johansson <olof@lixom.net> Acked-by:
Rhyland Klein <rklein@nvidia.com> Signed-off-by:
Anton Vorontsov <cbouatmailru@gmail.com>
-
Pali Rohár authored
Acked-by:
Tony Lindgren <tony@atomide.com> Signed-off-by:
Anton Vorontsov <cbouatmailru@gmail.com>
-
Rhyland Klein authored
The power supply name used to be fixed as "battery". This change allows for multiple batteries by generating the name rather than using a fixed value. Signed-off-by:
Rhyland Klein <rklein@nvidia.com> Signed-off-by:
Anton Vorontsov <cbouatmailru@gmail.com>
-
Rhyland Klein authored
Signed-off-by:
Rhyland Klein <rklein@nvidia.com> Signed-off-by:
Anton Vorontsov <cbouatmailru@gmail.com>
-
Rhyland Klein authored
Signed-off-by:
Rhyland Klein <rklein@nvidia.com> Signed-off-by:
Anton Vorontsov <cbouatmailru@gmail.com>
-
Rhyland Klein authored
Now that this driver is named more generally, this change updates the internal variables, defines and functions to use this new name. Signed-off-by:
Rhyland Klein <rklein@nvidia.com> Signed-off-by:
Anton Vorontsov <cbouatmailru@gmail.com>
-
Rhyland Klein authored
This driver for the bq20z75 implemented the register spec defined by the SBS standard. As this is not unique to this the TI part this was originally written for, we can generalize this driver to show its support for any SBS compliant battery. Signed-off-by:
Rhyland Klein <rklein@nvidia.com> Signed-off-by:
Anton Vorontsov <cbouatmailru@gmail.com>
-
Axel Lin authored
work_lock can be initialized automatically with DEFINE_MUTEX() rather than explicitly calling mutex_init(). This patch also removes an unused bat_lock mutex. Signed-off-by:
Axel Lin <axel.lin@gmail.com> Signed-off-by:
Anton Vorontsov <cbouatmailru@gmail.com>
-
Jonghwan Choi authored
module.h was included twice. Signed-off-by:
Jonghwan Choi <jhbird.choi@samsung.com> Acked-by:
MyungJoo Ham <myungjoo.ham@samsung.com> Signed-off-by:
Anton Vorontsov <cbouatmailru@gmail.com>
-
- 04 Jan, 2012 10 commits
-
-
Milo(Woogyom) Kim authored
Pointer coding style changes : add space between return type and function pointer ex) u8(*get_batt_present) (void) -> u8 (*get_batt_present) (void) Signed-off-by:
Woogyom Kim <milo.kim@ti.com> Signed-off-by:
Anton Vorontsov <cbouatmailru@gmail.com>
-
Kim, Milo authored
Oops, forgot to 'git add' it. [AV] Signed-off-by:
Woogyom Kim <milo.kim@ti.com> Signed-off-by:
Anton Vorontsov <cbouatmailru@gmail.com>
-
Axel Lin authored
This patch converts the drivers in drivers/power/* to use the module_platform_driver() macro which makes the code smaller and a bit simpler. Cc: Mike Rapoport <mike@compulab.co.il> Cc: Lars-Peter Clausen <lars@metafoo.de> Cc: Nithish Mahalingam <nithish.mahalingam@intel.com> Cc: MyungJoo Ham <myungjoo.ham@samsung.com> Cc: Haojian Zhuang <haojian.zhuang@marvell.com> Cc: Balaji Rao <balajirrao@openmoko.org> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by:
Axel Lin <axel.lin@gmail.com> Acked-by:
Clifton Barnes <cabarnes@indesign-llc.com> Signed-off-by:
Anton Vorontsov <cbouatmailru@gmail.com>
-
-
Kim, Milo authored
For the default value of power supply type, "unknown" is added. With default prop value, supply type property can be displayed as default - "Unknown". Signed-off-by:
Milo(Woogyom) Kim <milo.kim@ti.com> Signed-off-by:
Anton Vorontsov <cbouatmailru@gmail.com>
-
Kim, Milo authored
1. Useless braces were omitted 2. Useless void casts were omitted 3. module exit name changed lp8727_chg_exit -> lp8727_exit 4. Pointer coding style changes no space between pointer('*') and pointer name ex) u8 * data -> u8 *data 5. Author information change : email and additional author Signed-off-by:
Milo(Woogyom) Kim <milo.kim@ti.com> Signed-off-by:
Anton Vorontsov <cbouatmailru@gmail.com>
-
Kim, Milo authored
lp8727 i2c r/w functions are based on SMBUS I2C BLOCK. So the driver needs to check whether i2c bus supports this functionality or not. Signed-off-by:
Woogyom Kim <milo.kim@ti.com> Signed-off-by:
Anton Vorontsov <cbouatmailru@gmail.com>
-
Woogyom Kim authored
National Semiconductor LP8727 is the battery charger with Micro/Mini USB interface. This IC includes below functions: - I2C interface for accessing user registers - Single input Li-Ion battery charger - Charger input ID detection from Micro/Mini USB - Multiplexing switches on USB, UART Signed-off-by:
Woogyom Kim <milo.kim@ti.com> Signed-off-by:
Anton Vorontsov <cbouatmailru@gmail.com>
-
Donggeun Kim authored
Charger Manager provides power-supply-class aggregating information from multiple chargers and a fuel-gauge. Signed-off-by:
Donggeun Kim <dg77.kim@samsung.com> Signed-off-by:
MyungJoo Ham <myungjoo.ham@samsung.com> Signed-off-by:
Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by:
Anton Vorontsov <cbouatmailru@gmail.com>
-
Donggeun Kim authored
Because battery health monitoring should be done even when suspended, it needs to wake up and suspend periodically. Thus, userspace battery monitoring may incur too much overhead; every device and task is woken up periodically. Charger Manager uses suspend-again to provide in-suspend monitoring. This patch allows to monitor battery health in-suspend state. Signed-off-by:
Donggeun Kim <dg77.kim@samsung.com> Signed-off-by:
MyungJoo Ham <myungjoo.ham@samsung.com> Signed-off-by:
Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by:
Anton Vorontsov <cbouatmailru@gmail.com>
-
- 09 Dec, 2011 4 commits
-
-
Jeremy Fitzhardinge authored
Make the relationship between the Wiimote and Wacom self-powered HID devices and their power supply explicit by adding a "powers" link. Signed-off-by:
Jeremy Fitzhardinge <jeremy@goop.org> Cc: Jiri Kosina <jkosina@suse.cz>
-
Jeremy Fitzhardinge authored
The Wacom and Wiimote HID drivers register power supplies for themselves to indicate their battery levels. Make those power supplies device scope. Signed-off-by:
Jeremy Fitzhardinge <jeremy@goop.org> Cc: Jiri Kosina <jkosina@suse.cz>
-
Jeremy Fitzhardinge authored
If a power supply has a scope of "Device", then allow the power supply to indicate what device it actually powers. This is represented in the power supply's sysfs directory as a symlink named "powers", which points to the sysfs directory of the powered device. If the device has children, then the sub-devices are also powered by the same power supply. Signed-off-by:
Jeremy Fitzhardinge <jeremy@goop.org> Cc: Richard Hughes <richard@hughsie.com>
-
Jeremy Fitzhardinge authored
This adds a "scope" attribute to a power_supply, which indicates how much of the system it powers. It appears in sysfs as "scope" or in the uevent file as POWER_SUPPLY_SCOPE=. There are presently three possible values: Unknown - unknown power topology System - the power supply powers the whole system Device - it powers a specific device, or tree of devices A power supply which doesn't have a "scope" attribute should be assumed to have "System" scope. In general, usermode should assume that loss of all System-scoped power supplies will power off the whole system, but any single one is sufficient to power the system. Signed-off-by:
Jeremy Fitzhardinge <jeremy@goop.org> Cc: Richard Hughes <richard@hughsie.com>
-
- 26 Nov, 2011 3 commits
-
-
Philip Rakity authored
The interrupt for ac on/off can be missed during boot time. Check if online by seeing if we have power. We choose 0.5V since this is high enough to avoid random reading from a input that could be floating if no charger. Signed-off-by:
Philip Rakity <prakity@marvell.com> Signed-off-by:
Ted Bennett <tbennett@marvell.com> Signed-off-by:
Anton Vorontsov <cbouatmailru@gmail.com>
-
Philip Rakity authored
Reading the voltage, charge etc requires that we tell the chip what property we want to read before reading it according to maxim. Signed-off-by:
Philip Rakity <prakity@marvell.com> Signed-off-by:
Thomas Liu <Thomas.Liu@maxim-ic.com> Tested-by:
Ted Bennett <tbennett@marvell.com> Signed-off-by:
Anton Vorontsov <cbouatmailru@gmail.com>
-
Ramakrishna Pallala authored
In max17042_get_property(...), the values returned by max17042_read_reg are directly assigned to the variables, even if the read results in an error. This patch checks for the return code from max17042_read_reg and exits the function if there is any error. Signed-off-by:
Ramakrishna Pallala <ramakrishna.pallala@intel.com> Acked-by:
MyungJoo Ham <myungjoo.ham@samsung.com> Signed-off-by:
Anton Vorontsov <cbouatmailru@gmail.com>
-
- 25 Nov, 2011 7 commits
-
-
Paul Parsons authored
Add rated capacity of the HP iPAQ hx4700 3.7V 3600mAh (359114-001) battery. For this battery the value of the rated capacity EEPROM register at 0x32 is 14; thus rated_capacities[14] = 3600. Signed-off-by:
Paul Parsons <lost.distance@yahoo.com> Signed-off-by:
Anton Vorontsov <cbouatmailru@gmail.com>
-
Yong Zhang authored
Since commit [e58aa3d2: genirq: Run irq handlers with interrupts disabled], We run all interrupt handlers with interrupts disabled and we even check and yell when an interrupt handler returns with interrupts enabled (see commit [b738a50a: genirq: Warn when handler enables interrupts]). So now this flag is a NOOP and can be removed. Signed-off-by:
Yong Zhang <yong.zhang0@gmail.com> Signed-off-by:
Anton Vorontsov <cbouatmailru@gmail.com>
-
Pali Rohár authored
* power_supply_unregister call bq27x00_battery_get_property which call bq27x00_battery_poll * make sure that bq27x00_battery_poll will not call schedule_delayed_work again after unregister (which cause OOPS) Signed-off-by:
Pali Rohár <pali.rohar@gmail.com> Signed-off-by:
Anton Vorontsov <cbouatmailru@gmail.com>
-
Pali Rohár authored
* Do not be noise if battery is not calibrated (use dev_dbg) Signed-off-by:
Pali Rohár <pali.rohar@gmail.com> Signed-off-by:
Anton Vorontsov <cbouatmailru@gmail.com>
-
Pali Rohár authored
Signed-off-by:
Pali Rohár <pali.rohar@gmail.com> Signed-off-by:
Anton Vorontsov <cbouatmailru@gmail.com>
-
Pali Rohár authored
Signed-off-by:
Pali Rohár <pali.rohar@gmail.com> Signed-off-by:
Anton Vorontsov <cbouatmailru@gmail.com>
-
Pali Rohár authored
Signed-off-by:
Pali Rohár <pali.rohar@gmail.com> Signed-off-by:
Anton Vorontsov <cbouatmailru@gmail.com>
-