History log of /drivers/power/smb347-charger.c
Revision Date Author Comments
28ea73f4c67cb3dd8c972b21d9fdf84ea78d6daa 19-Nov-2012 Bill Pemberton <wfp5p@virginia.edu> power: remove use of __devexit_p

CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer
needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Anton Vorontsov <cbou@mail.ru>
Cc: David Woodhouse <dwmw2@infradead.org>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1502cfe19bac2f8490e4167f2b7cb50b9759b273 18-Sep-2012 Ramakrishna Pallala <ramakrishna.pallala@intel.com> smb347-charger: Fix battery status reporting logic for charger faults

This patch checks for charger status register for determining the
battery charging status and reports Discharing/Charging/Not Charging/Full
accordingly.

This patch also adds the interrupt support for Safety Timer Expiration.
This interrupt is helpful in debugging the cause for charger fault.

Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
19dd6bcd1136d254c1f12b0f69e827c3e1679b43 20-Jun-2012 Ramakrishna Pallala <ramakrishna.pallala@intel.com> smb347-charger: Add constant charge and current properties

This patch makes use of the two new properties in smb347 charger driver.

Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
96facd23e45e6d5020be135c8ab392ba9e044fa4 07-May-2012 Mika Westerberg <mika.westerberg@linux.intel.com> smb347-charger: Include missing <linux/err.h>

Without the include we get build errors like:

drivers/power/smb347-charger.c: In function 'smb347_probe':
drivers/power/smb347-charger.c:1039:2: error: implicit declaration of function 'IS_ERR' [-Werror=implicit-function-declaration]
drivers/power/smb347-charger.c:1040:3: error: implicit declaration of function 'PTR_ERR' [-Werror=implicit-function-declaration]

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
fcc015cda7dfe1af26e17bbed21eecb742183b7e 05-May-2012 Ramakrishna Pallala <ramakrishna.pallala@intel.com> smb347-charger: Clean up battery attributes

CURRENT_NOW and VOLTAGE_NOW should be instantaneous readings
from power supply(ex: battery).

smb347 charger driver reports charge voltage for VOLTAGE_NOW
and charge current for CURRENT_NOW attributes which are not
instantaneous readings.

This patch removes the battery VOLTAGE_NOW and CURRENT_NOW
properties from the driver and also removes hw_to_current()
which is not required anymore.

Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
34298d40e5853bc195c9db012fc1ddccac9b6f7f 16-Apr-2012 Mika Westerberg <mika.westerberg@linux.intel.com> smb347-charger: Convert to regmap API

The smb347-charger driver does a lot of read-modify-write to the device
registers. Instead of open-coding everything we can take advantage of
regmap API which provides nice functions to do this kind of things.

In addition there is no need for custom debugfs file for dumping
registers as this is already provided by the regmap API.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
d72bade76d11da661d76aec5801567d573f39fea 16-Apr-2012 Mika Westerberg <mika.westerberg@linux.intel.com> smb347-charger: Move IRQ enabling to the end of probe

There is a potential problem if we call smb347_irq_enable() from
smb347_irq_init() because smb347_irq_enable() makes the device registers
read-only once it returns and smb347_irq_init() expects them to still be
read-write. Currently no harm happens because it is the last call we make
in smb347_irq_init().

Anyway a better place for enabling IRQs is at the end of probe function
and this is also symmetric to call smb347_irq_disable() which is done at
the beginning of remove function.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
055d7f0f29b2af6ec8fd5da9f0ce27b9e9e63436 16-Apr-2012 Mika Westerberg <mika.westerberg@linux.intel.com> smb347-charger: Rename few functions to match better what they are doing

The naming used in the driver for some functions is not very clear what
the functions are really doing. To make this a bit easier to understand
we rename few functions which were badly named.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
b75ef1d807e20919a00bed16045537e76e0497a7 16-Apr-2012 Mika Westerberg <mika.westerberg@linux.intel.com> smb347-charger: Convert to use module_i2c_driver()

This reduces the amount of boilerplate code in the driver and
makes it a bit simpler.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
e6fe3597fa17dcd7ee82a5198beadb19a457a478 19-Apr-2012 Ramakrishna Pallala <ramakrishna.pallala@intel.com> smb347_charger: Cleanup power supply registration code in probe

This patch checks if the usb or mains charging is enabled by the
platform before registering with the power supply class.

Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
ed1a230f96eb4610f1f4296b8c3c067389ddf540 06-Feb-2012 Bruce E. Robertson <bruce.e.robertson@intel.com> Add I2C driver for Summit Microelectronics SMB347 Battery Charger.

Driver support for the Summit I²C battery charger. This is used in some
Intel devices.

Signed-off-by: Bruce E. Robertson <bruce.e.robertson@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>