<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/power/supply, branch v5.5</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>power: supply: bd70528: Add MODULE_ALIAS to allow module auto loading</title>
<updated>2019-10-27T21:33:44+00:00</updated>
<author>
<name>Matti Vaittinen</name>
<email>matti.vaittinen@fi.rohmeurope.com</email>
</author>
<published>2019-10-23T12:35:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=9480029fe5c24d482efad38dc631bd555fc7afe2'/>
<id>9480029fe5c24d482efad38dc631bd555fc7afe2</id>
<content type='text'>
The bd70528 charger driver is probed by MFD driver. Add MODULE_ALIAS
in order to allow udev to load the module when MFD sub-device cell for
charger is added.

Fixes: f8c7f7ddd8ef0 ("power: supply: Initial support for ROHM BD70528 PMIC charger block")
Signed-off-by: Matti Vaittinen &lt;matti.vaittinen@fi.rohmeurope.com&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The bd70528 charger driver is probed by MFD driver. Add MODULE_ALIAS
in order to allow udev to load the module when MFD sub-device cell for
charger is added.

Fixes: f8c7f7ddd8ef0 ("power: supply: Initial support for ROHM BD70528 PMIC charger block")
Signed-off-by: Matti Vaittinen &lt;matti.vaittinen@fi.rohmeurope.com&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>power: supply: ab8500_charger: Fix inconsistent IS_ERR and PTR_ERR</title>
<updated>2019-10-27T21:33:07+00:00</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavo@embeddedor.com</email>
</author>
<published>2019-10-21T17:49:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=f457055a7922154bb786e5d55f75b461fa645e9a'/>
<id>f457055a7922154bb786e5d55f75b461fa645e9a</id>
<content type='text'>
Fix inconsistent IS_ERR and PTR_ERR in ab8500_charger_probe().

The proper pointer to be passed as argument is di-&gt;adc_main_charger_c

This bug was detected with the help of Coccinelle.

Fixes: 97ab78bac5d0 ("power: supply: ab8500_charger: Convert to IIO ADC")
Signed-off-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
Reviewed-by: Signed-off-by: Wei Yongjun &lt;weiyongjun1@huawei.com&gt;
Acked-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix inconsistent IS_ERR and PTR_ERR in ab8500_charger_probe().

The proper pointer to be passed as argument is di-&gt;adc_main_charger_c

This bug was detected with the help of Coccinelle.

Fixes: 97ab78bac5d0 ("power: supply: ab8500_charger: Convert to IIO ADC")
Signed-off-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
Reviewed-by: Signed-off-by: Wei Yongjun &lt;weiyongjun1@huawei.com&gt;
Acked-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>power: supply: cpcap-charger: cpcap_charger_voltage_to_regval() can be static</title>
<updated>2019-10-21T08:43:41+00:00</updated>
<author>
<name>kbuild test robot</name>
<email>lkp@intel.com</email>
</author>
<published>2019-10-20T22:20:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=e3da2ce04e120b4b035793f6eb87b459a505e88b'/>
<id>e3da2ce04e120b4b035793f6eb87b459a505e88b</id>
<content type='text'>
Add 'static' keyword to internal function as reported by sparse
using the following configuration:

make ARCH=x86_64 allmodconfig
make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

Fixes: d4ee021c410f ("power: supply: cpcap-charger: Limit voltage to 4.2V for battery")
Signed-off-by: kbuild test robot &lt;lkp@intel.com&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add 'static' keyword to internal function as reported by sparse
using the following configuration:

make ARCH=x86_64 allmodconfig
make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

Fixes: d4ee021c410f ("power: supply: cpcap-charger: Limit voltage to 4.2V for battery")
Signed-off-by: kbuild test robot &lt;lkp@intel.com&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>power: supply: cpcap-battery: Add basic coulomb counter calibrate support</title>
<updated>2019-10-20T18:48:59+00:00</updated>
<author>
<name>Tony Lindgren</name>
<email>tony@atomide.com</email>
</author>
<published>2019-10-09T21:06:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=0cb90f071f736b51b36ca0f761cf1152ebe46600'/>
<id>0cb90f071f736b51b36ca0f761cf1152ebe46600</id>
<content type='text'>
This patch adds support for the coulomb counter calibration on init. We do
this by polling for now, and only add partial calibration done interrupt
support.

Then later on when we know for sure we have the calibration done interrupt
available in the device tree, we can switch to using the calibration done
interrupt.

Cc: Merlijn Wajer &lt;merlijn@wizzup.org&gt;
Signed-off-by: Tony Lindgren &lt;tony@atomide.com&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds support for the coulomb counter calibration on init. We do
this by polling for now, and only add partial calibration done interrupt
support.

Then later on when we know for sure we have the calibration done interrupt
available in the device tree, we can switch to using the calibration done
interrupt.

Cc: Merlijn Wajer &lt;merlijn@wizzup.org&gt;
Signed-off-by: Tony Lindgren &lt;tony@atomide.com&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>power: supply: cpcap-battery: Read and save integrator register CCI</title>
<updated>2019-10-20T18:48:32+00:00</updated>
<author>
<name>Tony Lindgren</name>
<email>tony@atomide.com</email>
</author>
<published>2019-10-09T21:06:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=b28ac41950c84d6a9787255a15dcaf2369735464'/>
<id>b28ac41950c84d6a9787255a15dcaf2369735464</id>
<content type='text'>
We can simplify code in the later patches by reading and saving the
integrator register CCI. Let's also fix a comment typo for register range
naming while at it.

Cc: Merlijn Wajer &lt;merlijn@wizzup.org&gt;
Signed-off-by: Tony Lindgren &lt;tony@atomide.com&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We can simplify code in the later patches by reading and saving the
integrator register CCI. Let's also fix a comment typo for register range
naming while at it.

Cc: Merlijn Wajer &lt;merlijn@wizzup.org&gt;
Signed-off-by: Tony Lindgren &lt;tony@atomide.com&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>power: supply: cpcap-battery: Simplify short term power average calculation</title>
<updated>2019-10-20T18:33:39+00:00</updated>
<author>
<name>Tony Lindgren</name>
<email>tony@atomide.com</email>
</author>
<published>2019-10-09T21:06:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=ac437c1c8438027d08f115445e5963397c04ce5b'/>
<id>ac437c1c8438027d08f115445e5963397c04ce5b</id>
<content type='text'>
We can use sign_extend32() here to simplify things. And let's fix the
comment for CCM register, that contains the calibration offset.

Cc: Merlijn Wajer &lt;merlijn@wizzup.org&gt;
Signed-off-by: Tony Lindgren &lt;tony@atomide.com&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We can use sign_extend32() here to simplify things. And let's fix the
comment for CCM register, that contains the calibration offset.

Cc: Merlijn Wajer &lt;merlijn@wizzup.org&gt;
Signed-off-by: Tony Lindgren &lt;tony@atomide.com&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>power: supply: cpcap-battery: Simplify coulomb counter calculation with div_s64</title>
<updated>2019-10-20T18:30:43+00:00</updated>
<author>
<name>Tony Lindgren</name>
<email>tony@atomide.com</email>
</author>
<published>2019-10-09T21:06:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=c59b3bad6fd83a42c73ec6ef6609af4882dfbcb3'/>
<id>c59b3bad6fd83a42c73ec6ef6609af4882dfbcb3</id>
<content type='text'>
We can simplify cpcap_battery_cc_raw_div() with div_s64.

Cc: Merlijn Wajer &lt;merlijn@wizzup.org&gt;
Signed-off-by: Tony Lindgren &lt;tony@atomide.com&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We can simplify cpcap_battery_cc_raw_div() with div_s64.

Cc: Merlijn Wajer &lt;merlijn@wizzup.org&gt;
Signed-off-by: Tony Lindgren &lt;tony@atomide.com&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>power: supply: cpcap-battery: Move coulomb counter units per lsb to ddata</title>
<updated>2019-10-20T18:27:10+00:00</updated>
<author>
<name>Tony Lindgren</name>
<email>tony@atomide.com</email>
</author>
<published>2019-10-09T21:06:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=458f5c8cda45fa599c8d984b41ea12c7169bdcd4'/>
<id>458f5c8cda45fa599c8d984b41ea12c7169bdcd4</id>
<content type='text'>
We can simplify cpcap_battery_cc_raw_div() a bit by moving the units per
lsb to ddata.

Cc: Merlijn Wajer &lt;merlijn@wizzup.org&gt;
Signed-off-by: Tony Lindgren &lt;tony@atomide.com&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We can simplify cpcap_battery_cc_raw_div() a bit by moving the units per
lsb to ddata.

Cc: Merlijn Wajer &lt;merlijn@wizzup.org&gt;
Signed-off-by: Tony Lindgren &lt;tony@atomide.com&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>power: supply: cpcap-charger: Allow changing constant charge voltage</title>
<updated>2019-10-20T18:26:23+00:00</updated>
<author>
<name>Tony Lindgren</name>
<email>tony@atomide.com</email>
</author>
<published>2019-10-16T22:41:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=5688ea0492337517f9e9e1249e4f5e371726bc21'/>
<id>5688ea0492337517f9e9e1249e4f5e371726bc21</id>
<content type='text'>
Let's allow reconfiguring the cpcap-charger max charge voltage and
default to 4.2V that should be safe for the known users.

This allows the users to use 4.35V for the extra capacity if really
needed at a cost of probably shorter battery life. We check the
constant charge voltage limit set by the battery.

Some pieces of the property setting code is based on an earlier patch
from Pavel Machek &lt;pavel@ucw.cz&gt; but limited to configuring the charge
voltage for now.

Cc: Merlijn Wajer &lt;merlijn@wizzup.org&gt;
Cc: Pavel Machek &lt;pavel@ucw.cz&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Tony Lindgren &lt;tony@atomide.com&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Let's allow reconfiguring the cpcap-charger max charge voltage and
default to 4.2V that should be safe for the known users.

This allows the users to use 4.35V for the extra capacity if really
needed at a cost of probably shorter battery life. We check the
constant charge voltage limit set by the battery.

Some pieces of the property setting code is based on an earlier patch
from Pavel Machek &lt;pavel@ucw.cz&gt; but limited to configuring the charge
voltage for now.

Cc: Merlijn Wajer &lt;merlijn@wizzup.org&gt;
Cc: Pavel Machek &lt;pavel@ucw.cz&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Tony Lindgren &lt;tony@atomide.com&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>power: supply: cpcap-battery: Fix handling of lowered charger voltage</title>
<updated>2019-10-20T18:26:20+00:00</updated>
<author>
<name>Tony Lindgren</name>
<email>tony@atomide.com</email>
</author>
<published>2019-10-16T22:41:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=8b0134cc14b9d4dba4477489c11f7c634c382e3e'/>
<id>8b0134cc14b9d4dba4477489c11f7c634c382e3e</id>
<content type='text'>
With cpcap-charger now using 4.2V instead of 4.35V, we never reach
POWER_SUPPLY_CAPACITY_LEVEL_FULL unless we handle the lowered charge
voltage.

Let's do this by implementing POWER_SUPPLY_PROP_CONSTANT_CHARGE_VOLTAGE,
and assume anything at that level or higher is a full battery.

Let's also make it configurable for users who may still want to
reconfigure it, and notify the charger if supported by the charger.

Cc: Merlijn Wajer &lt;merlijn@wizzup.org&gt;
Cc: Pavel Machek &lt;pavel@ucw.cz&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Tony Lindgren &lt;tony@atomide.com&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With cpcap-charger now using 4.2V instead of 4.35V, we never reach
POWER_SUPPLY_CAPACITY_LEVEL_FULL unless we handle the lowered charge
voltage.

Let's do this by implementing POWER_SUPPLY_PROP_CONSTANT_CHARGE_VOLTAGE,
and assume anything at that level or higher is a full battery.

Let's also make it configurable for users who may still want to
reconfigure it, and notify the charger if supported by the charger.

Cc: Merlijn Wajer &lt;merlijn@wizzup.org&gt;
Cc: Pavel Machek &lt;pavel@ucw.cz&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Tony Lindgren &lt;tony@atomide.com&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
