History log of /drivers/power/sbs-battery.c
Revision Date Author Comments
4495b0adfb65a8eb9a5255b831f2160b6e583f3d 04-Aug-2014 Simon Que <sque@chromium.org> sbs-battery: add min design voltage to sbs-battery

sbs-battery has a max design voltage but not a min design voltage field.
The SBS spec only has one design voltage:
http://www.sbs-forum.org/specs/sbdat110.pdf

Currently this is being used for max design voltage. This patch uses it
for min design voltage as well.

Signed-off-by: Simon Que <sque@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Todd Broch <tbroch@chromium.org>
Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
9ea89402e25edafb6ad8ec92848d12c1d5d3969f 04-Aug-2014 Cheng-Yi Chiang <cychiang@chromium.org> sbs-battery: export manufacturer and model name to sysfs

This CL supports two power_supply_property items for smart battery:
POWER_SUPPLY_PROP_MANUFACTURER and POWER_SUPPLY_PROP_MODEL_NAME such
that battery information 'manufacturer' and 'model_name' can be exported
to sysfs.

Signed-off-by: Cheng-Yi Chiang <cychiang@chromium.org>
Reviewed-by: Olof Johansson <olofj@chromium.org>
Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
89a22b1a9850028bd216457397321db5a5ee18f5 10-Jun-2013 Rhyland Klein <rklein@nvidia.com> sbs-battery: Add dt to power_supply struct

By passing in the dt node of this device, we enable the logic for linking
power_supplies together from dt. This is specified by adding a
"power-supplies" property with a phandle to the charger for a given
supply.

Enable this logic now for the sbs-battery driver.

Signed-off-by: Rhyland Klein <rklein@nvidia.com>
Signed-off-by: Anton Vorontsov <anton@enomsg.org>
9c1d1af0cf78a7e8967194a4ee424b0742a52921 10-Mar-2013 Lars-Peter Clausen <lars@metafoo.de> sbs-battery: Use dev_pm_ops

Use dev_pm_ops instead of the deprecated legacy suspend/resume callbacks.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Rhyland Klein <rklein@nvidia.com>
Signed-off-by: Anton Vorontsov <anton@enomsg.org>
075ed03ce6c2cd148b4606619e775c6e46aa89e1 14-Mar-2013 Sachin Kamat <sachin.kamat@linaro.org> sbs-battery: Use of_match_ptr() macro

This eliminates having an #ifdef returning NULL for the case when OF is
disabled.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Anton Vorontsov <anton@enomsg.org>
415ec69fb1861fc377c65cb30ddc76999891b8e1 19-Nov-2012 Bill Pemberton <wfp5p@virginia.edu> power: remove use of __devexit

CONFIG_HOTPLUG is going away as an option so __devexit 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>
c8afa6406e60aec6ff90033e5ffe41a206609296 19-Nov-2012 Bill Pemberton <wfp5p@virginia.edu> power: remove use of __devinit

CONFIG_HOTPLUG is going away as an option so __devinit 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>
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>
a22b41a31e5382792151f193d185a3cd39593cfd 06-Sep-2012 Olof Johansson <olof@lixom.net> sbs-battery: Probe should try talking to the device

Turns out this driver doesn't actually try talking to the device at
probe time, so if it's incorrectly configured in the device tree or
platform data (or if the battery has been removed from the system),
then probe will succeed and every access will sit there and time out.
The end result is a possibly laggy system that thinks it has a battery
but can never read status, which isn't very useful.

Instead, just read any register (I chose status) at probe, and if that
fails, don't register the device.

Signed-off-by: Olof Johansson <olof@lixom.net>
Acked-by: Rhyland Klein <rklein@nvidia.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
5da50988a1bf8c05611db77521777baaca14da29 09-May-2012 Nikolaus Voss <n.voss@weinmann.de> sbs-battery: Don't trigger false supply_changed event

power_supply_changed() events are triggerd based on the return value
of a get_property() call. However the property TECHNOLOGY is
hard-coded to LION in this driver, thus always succeeds.

So, with the battery removed, this triggers a false battery present
uevent. This uevent triggers a new query via power_supply_uevent()
which again starts to query all known properties and thus leads to
an infinite loop of battery present/not-present uevents.

This patch skips the battery presence detection for the hard-coded
property TECHNOLOGY.

Signed-off-by: Nikolaus Voss <n.voss@weinmann.de>
Acked-by Rhyland Klein <rklein@nvidia.com>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
b1f092f6480e0a9d8d5f99d3363e022952d1af83 25-Apr-2012 Nikolaus Voss <n.voss@weinmann.de> sbs-battery.c: Capacity attr = remaining relative capacity

Currently, the capacity exported by this driver refers to reg 0x0e,
which is the absolute state of charge which according to SBS
refers to the design capacity/ energy of the battery. It can be
> 100 % and drops below 100 % for a fully charged battery with
the battery aging.

This is not what the user exspects of a remaining capacity
indication between 0 and 100 % with 100 % referring to
a fully charged battery. This is provided by SBS reg 0x0d,
which is the relative state of charge referring to the
full charge capacity.

Signed-off-by: Nikolaus Voss <n.voss@weinmann.de>
Acked-by: Rhyland Klein <rklein@nvidia.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
5ff92e7ab3591299089cfba440acb4d2ba8ab92f 21-Jan-2012 Axel Lin <axel.lin@gmail.com> power_supply: Convert i2c drivers to module_i2c_driver

Factor out some boilerplate code for i2c driver registration
into module_i2c_driver.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: Woogyom Kim <milo.kim@ti.com>
Cc: Daniel Jeong <daniel.jeong@ti.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Peter Edwards <sweetlilmre@gmail.com>
Acked-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Acked-by: Rhyland Klein <rklein@nvidia.com>
Acked-by: Ryan Mallon <rmallon@gmail.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
62df3935a7ef842ad0af6025d2fc59d353de2e1d 06-Jan-2012 Olof Johansson <olof@lixom.net> sbs-battery: Fix devicetree match table

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>
52f56c69beb049928f6e1a3d484afe27843d6c04 06-Dec-2011 Rhyland Klein <rklein@nvidia.com> sbs-battery: Change power supply name

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>
3ddca062f8d71724529b0d52609994c9886f1a18 06-Dec-2011 Rhyland Klein <rklein@nvidia.com> sbs-battery: Rename internals to new name

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>
c78f2b64963654419a8cd3b7e264251860e9f9eb 06-Dec-2011 Rhyland Klein <rklein@nvidia.com> bq20z75: Rename to sbs-battery

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>