<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/power, branch v4.9.91</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>power: supply: pda_power: move from timer to delayed_work</title>
<updated>2018-03-24T10:00:20+00:00</updated>
<author>
<name>Michael Trimarchi</name>
<email>michael@amarulasolutions.com</email>
</author>
<published>2017-04-25T13:18:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=5b65f7d823f3ce0e6e46eb08b2d35972e6092699'/>
<id>5b65f7d823f3ce0e6e46eb08b2d35972e6092699</id>
<content type='text'>
[ Upstream commit 633e8799ddc09431be2744c4a1efdbda13af2b0b ]

This changed is needed to avoid locking problem during
boot as shown:

&lt;5&gt;[    8.824096] Registering SWP/SWPB emulation handler
&lt;6&gt;[    8.977294] clock: disabling unused clocks to save power
&lt;3&gt;[    9.108154] BUG: sleeping function called from invalid context at kernel_albert/kernel/mutex.c:269
&lt;3&gt;[    9.122894] in_atomic(): 1, irqs_disabled(): 0, pid: 1, name: swapper/0
&lt;4&gt;[    9.130249] 3 locks held by swapper/0/1:
&lt;4&gt;[    9.134613]  #0:  (&amp;__lockdep_no_validate__){......}, at: [&lt;c0342430&gt;] __driver_attach+0x58/0xa8
&lt;4&gt;[    9.144500]  #1:  (&amp;__lockdep_no_validate__){......}, at: [&lt;c0342440&gt;] __driver_attach+0x68/0xa8
&lt;4&gt;[    9.154357]  #2:  (&amp;polling_timer){......}, at: [&lt;c0053770&gt;] run_timer_softirq+0x108/0x3ec
&lt;4&gt;[    9.163726] Backtrace:
&lt;4&gt;[    9.166473] [&lt;c001269c&gt;] (dump_backtrace+0x0/0x114) from [&lt;c067e5f0&gt;] (dump_stack+0x20/0x24)
&lt;4&gt;[    9.175811]  r6:00203230 r5:0000010d r4:d782e000 r3:60000113
&lt;4&gt;[    9.182250] [&lt;c067e5d0&gt;] (dump_stack+0x0/0x24) from [&lt;c007441c&gt;] (__might_sleep+0x10c/0x128)
&lt;4&gt;[    9.191650] [&lt;c0074310&gt;] (__might_sleep+0x0/0x128) from [&lt;c0688f60&gt;] (mutex_lock_nested+0x34/0x36c)
&lt;4&gt;[    9.201660]  r5:c02d5350 r4:d79a0c64
&lt;4&gt;[    9.205688] [&lt;c0688f2c&gt;] (mutex_lock_nested+0x0/0x36c) from [&lt;c02d5350&gt;] (regulator_set_current_limit+0x30/0x118)
&lt;4&gt;[    9.217071] [&lt;c02d5320&gt;] (regulator_set_current_limit+0x0/0x118) from [&lt;c0435ce0&gt;] (update_charger+0x84/0xc4)
&lt;4&gt;[    9.228027]  r7:d782fb20 r6:00000101 r5:c1767e94 r4:00000000
&lt;4&gt;[    9.234436] [&lt;c0435c5c&gt;] (update_charger+0x0/0xc4) from [&lt;c0435d40&gt;] (psy_changed+0x20/0x48)
&lt;4&gt;[    9.243804]  r5:d782e000 r4:c1767e94
&lt;4&gt;[    9.247802] [&lt;c0435d20&gt;] (psy_changed+0x0/0x48) from [&lt;c0435dec&gt;] (polling_timer_func+0x84/0xb8)
&lt;4&gt;[    9.257537]  r4:c1767e94 r3:00000002
&lt;4&gt;[    9.261566] [&lt;c0435d68&gt;] (polling_timer_func+0x0/0xb8) from [&lt;c00537e4&gt;] (run_timer_softirq+0x17c/0x3ec)
&lt;4&gt;[    9.272033]  r4:c1767eb0 r3:00000000
&lt;4&gt;[    9.276062] [&lt;c0053668&gt;] (run_timer_softirq+0x0/0x3ec) from [&lt;c004b000&gt;] (__do_softirq+0xf0/0x298)
&lt;4&gt;[    9.286010] [&lt;c004af10&gt;] (__do_softirq+0x0/0x298) from [&lt;c004b650&gt;] (irq_exit+0x98/0xa0)
&lt;4&gt;[    9.295013] [&lt;c004b5b8&gt;] (irq_exit+0x0/0xa0) from [&lt;c000edbc&gt;] (handle_IRQ+0x60/0xc0)
&lt;4&gt;[    9.303680]  r4:c1194e98 r3:c00bc778
&lt;4&gt;[    9.307708] [&lt;c000ed5c&gt;] (handle_IRQ+0x0/0xc0) from [&lt;c0008504&gt;] (gic_handle_irq+0x34/0x68)
&lt;4&gt;[    9.316955]  r8:000ac383 r7:d782fc3c r6:d782fc08 r5:c11936c4 r4:e0802100
&lt;4&gt;[    9.324310] r3:c026ba48
&lt;4&gt;[    9.327301] [&lt;c00084d0&gt;] (gic_handle_irq+0x0/0x68) from [&lt;c068c2c0&gt;] (__irq_svc+0x40/0x74)
&lt;4&gt;[    9.336456] Exception stack(0xd782fc08 to 0xd782fc50)
&lt;4&gt;[    9.342041] fc00:                   d6e30e6c ac383627 00000000 ac383417 ea19c000 ea200000
&lt;4&gt;[    9.351104] fc20: beffffff 00000667 000ac383 d6e30670 d6e3066c d782fc94 d782fbe8 d782fc50
&lt;4&gt;[    9.360168] fc40: c026ba48 c001d1f0 00000113 ffffffff

Fixes: b2998049cfae ("[BATTERY] pda_power platform driver")
Signed-off-by: Michael Trimarchi &lt;michael@amarulasolutions.com&gt;
Signed-off-by: Anthony Brandon &lt;anthony@amarulasolutions.com&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.co.uk&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 633e8799ddc09431be2744c4a1efdbda13af2b0b ]

This changed is needed to avoid locking problem during
boot as shown:

&lt;5&gt;[    8.824096] Registering SWP/SWPB emulation handler
&lt;6&gt;[    8.977294] clock: disabling unused clocks to save power
&lt;3&gt;[    9.108154] BUG: sleeping function called from invalid context at kernel_albert/kernel/mutex.c:269
&lt;3&gt;[    9.122894] in_atomic(): 1, irqs_disabled(): 0, pid: 1, name: swapper/0
&lt;4&gt;[    9.130249] 3 locks held by swapper/0/1:
&lt;4&gt;[    9.134613]  #0:  (&amp;__lockdep_no_validate__){......}, at: [&lt;c0342430&gt;] __driver_attach+0x58/0xa8
&lt;4&gt;[    9.144500]  #1:  (&amp;__lockdep_no_validate__){......}, at: [&lt;c0342440&gt;] __driver_attach+0x68/0xa8
&lt;4&gt;[    9.154357]  #2:  (&amp;polling_timer){......}, at: [&lt;c0053770&gt;] run_timer_softirq+0x108/0x3ec
&lt;4&gt;[    9.163726] Backtrace:
&lt;4&gt;[    9.166473] [&lt;c001269c&gt;] (dump_backtrace+0x0/0x114) from [&lt;c067e5f0&gt;] (dump_stack+0x20/0x24)
&lt;4&gt;[    9.175811]  r6:00203230 r5:0000010d r4:d782e000 r3:60000113
&lt;4&gt;[    9.182250] [&lt;c067e5d0&gt;] (dump_stack+0x0/0x24) from [&lt;c007441c&gt;] (__might_sleep+0x10c/0x128)
&lt;4&gt;[    9.191650] [&lt;c0074310&gt;] (__might_sleep+0x0/0x128) from [&lt;c0688f60&gt;] (mutex_lock_nested+0x34/0x36c)
&lt;4&gt;[    9.201660]  r5:c02d5350 r4:d79a0c64
&lt;4&gt;[    9.205688] [&lt;c0688f2c&gt;] (mutex_lock_nested+0x0/0x36c) from [&lt;c02d5350&gt;] (regulator_set_current_limit+0x30/0x118)
&lt;4&gt;[    9.217071] [&lt;c02d5320&gt;] (regulator_set_current_limit+0x0/0x118) from [&lt;c0435ce0&gt;] (update_charger+0x84/0xc4)
&lt;4&gt;[    9.228027]  r7:d782fb20 r6:00000101 r5:c1767e94 r4:00000000
&lt;4&gt;[    9.234436] [&lt;c0435c5c&gt;] (update_charger+0x0/0xc4) from [&lt;c0435d40&gt;] (psy_changed+0x20/0x48)
&lt;4&gt;[    9.243804]  r5:d782e000 r4:c1767e94
&lt;4&gt;[    9.247802] [&lt;c0435d20&gt;] (psy_changed+0x0/0x48) from [&lt;c0435dec&gt;] (polling_timer_func+0x84/0xb8)
&lt;4&gt;[    9.257537]  r4:c1767e94 r3:00000002
&lt;4&gt;[    9.261566] [&lt;c0435d68&gt;] (polling_timer_func+0x0/0xb8) from [&lt;c00537e4&gt;] (run_timer_softirq+0x17c/0x3ec)
&lt;4&gt;[    9.272033]  r4:c1767eb0 r3:00000000
&lt;4&gt;[    9.276062] [&lt;c0053668&gt;] (run_timer_softirq+0x0/0x3ec) from [&lt;c004b000&gt;] (__do_softirq+0xf0/0x298)
&lt;4&gt;[    9.286010] [&lt;c004af10&gt;] (__do_softirq+0x0/0x298) from [&lt;c004b650&gt;] (irq_exit+0x98/0xa0)
&lt;4&gt;[    9.295013] [&lt;c004b5b8&gt;] (irq_exit+0x0/0xa0) from [&lt;c000edbc&gt;] (handle_IRQ+0x60/0xc0)
&lt;4&gt;[    9.303680]  r4:c1194e98 r3:c00bc778
&lt;4&gt;[    9.307708] [&lt;c000ed5c&gt;] (handle_IRQ+0x0/0xc0) from [&lt;c0008504&gt;] (gic_handle_irq+0x34/0x68)
&lt;4&gt;[    9.316955]  r8:000ac383 r7:d782fc3c r6:d782fc08 r5:c11936c4 r4:e0802100
&lt;4&gt;[    9.324310] r3:c026ba48
&lt;4&gt;[    9.327301] [&lt;c00084d0&gt;] (gic_handle_irq+0x0/0x68) from [&lt;c068c2c0&gt;] (__irq_svc+0x40/0x74)
&lt;4&gt;[    9.336456] Exception stack(0xd782fc08 to 0xd782fc50)
&lt;4&gt;[    9.342041] fc00:                   d6e30e6c ac383627 00000000 ac383417 ea19c000 ea200000
&lt;4&gt;[    9.351104] fc20: beffffff 00000667 000ac383 d6e30670 d6e3066c d782fc94 d782fbe8 d782fc50
&lt;4&gt;[    9.360168] fc40: c026ba48 c001d1f0 00000113 ffffffff

Fixes: b2998049cfae ("[BATTERY] pda_power platform driver")
Signed-off-by: Michael Trimarchi &lt;michael@amarulasolutions.com&gt;
Signed-off-by: Anthony Brandon &lt;anthony@amarulasolutions.com&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.co.uk&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>power: supply: isp1704: Fix unchecked return value of devm_kzalloc</title>
<updated>2018-03-24T10:00:20+00:00</updated>
<author>
<name>Pan Bian</name>
<email>bianpan2016@163.com</email>
</author>
<published>2017-04-24T08:22:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=9822cb80738a31f4e4821e385920547ddb95828e'/>
<id>9822cb80738a31f4e4821e385920547ddb95828e</id>
<content type='text'>
[ Upstream commit 8b20839988f1ed5e534b270f3776709b640dc7e0 ]

Function devm_kzalloc() will return a NULL pointer. However, in function
isp1704_charger_probe(), the return value of devm_kzalloc() is directly
used without validation. This may result in a bad memory access bug.

Fixes: 34a109610e2a ("isp1704_charger: Add DT support")
Signed-off-by: Pan Bian &lt;bianpan2016@163.com&gt;
Reviewed-by: Pali Rohár &lt;pali.rohar@gmail.com&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.co.uk&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 8b20839988f1ed5e534b270f3776709b640dc7e0 ]

Function devm_kzalloc() will return a NULL pointer. However, in function
isp1704_charger_probe(), the return value of devm_kzalloc() is directly
used without validation. This may result in a bad memory access bug.

Fixes: 34a109610e2a ("isp1704_charger: Add DT support")
Signed-off-by: Pan Bian &lt;bianpan2016@163.com&gt;
Reviewed-by: Pali Rohár &lt;pali.rohar@gmail.com&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.co.uk&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>power: supply: bq24190_charger: Add disable-reset device-property</title>
<updated>2018-03-24T10:00:19+00:00</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2017-04-14T16:52:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=5ac685af62fb165a8bec3ca26c0c180e4de04929'/>
<id>5ac685af62fb165a8bec3ca26c0c180e4de04929</id>
<content type='text'>
[ Upstream commit 6cf62a3b97e78ba41d31390e59a1ddc98a9e3622 ]

Allow platform-code to disable the reset on probe and suspend/resume
by setting a "disable-reset" boolean device property on the device.

There are several reasons why the platform-code may want to disable
the reset on probe and suspend/resume:

1) Resetting the charger should never be necessary it should always have
sane values programmed. If it is running with invalid values while we
are not running (system turned off or suspended) there is a big problem
as that may lead to overcharging the battery.

2) The reset in suspend() is meant to put the charger back into default
mode, but this is not necessary and not a good idea. If the charger has
been programmed with a higher max charge_current / charge_voltage then
putting it back in default-mode will reset those to the safe power-on
defaults, leading to slower charging, or charging to a lower voltage
(and thus not using the full capacity) while suspended which is
undesirable. Reprogramming the max charge_current / charge_voltage
after the reset will not help here as that will put the charger back
in host mode and start the i2c watchdog if the host then does not do
anything for 40s (iow if we're suspended for more then 40s) the watchdog
expires resetting the device to default-mode, including resetting all
the registers to there safe power-on defaults. So the only way to keep
using custom charge settings while suspending is to keep the charger in
its normal running state with the i2c watchdog disabled. This is fine
as the charger will still automatically switch from constant current
to constant voltage and stop charging when the battery is full.

3) Besides never being necessary resetting the charger also causes
problems on systems where the charge voltage limit is set higher then the
reset value, if this is the case and the charger is reset while charging
and the battery voltage is between the 2 voltages, then about half the
time the charger gets confused and claims to be charging (REG08 contains
0x64) but in reality the charger has decoupled itself from VBUS (Q1 off)
and is drawing 0A from VBUS, leaving the system running from the battery.

This last problem is happening on a GPD-win mini PC with a bq24292i
charger chip combined with a max17047 fuel-gauge and a LiHV battery.
I've checked and TI does not list any errata for the bq24292i which
could explain this (there are no errata at all).

Cc: Liam Breck &lt;kernel@networkimprov.net&gt;
Cc: Tony Lindgren &lt;tony@atomide.com&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Acked-by: Liam Breck &lt;kernel@networkimprov.net&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.co.uk&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 6cf62a3b97e78ba41d31390e59a1ddc98a9e3622 ]

Allow platform-code to disable the reset on probe and suspend/resume
by setting a "disable-reset" boolean device property on the device.

There are several reasons why the platform-code may want to disable
the reset on probe and suspend/resume:

1) Resetting the charger should never be necessary it should always have
sane values programmed. If it is running with invalid values while we
are not running (system turned off or suspended) there is a big problem
as that may lead to overcharging the battery.

2) The reset in suspend() is meant to put the charger back into default
mode, but this is not necessary and not a good idea. If the charger has
been programmed with a higher max charge_current / charge_voltage then
putting it back in default-mode will reset those to the safe power-on
defaults, leading to slower charging, or charging to a lower voltage
(and thus not using the full capacity) while suspended which is
undesirable. Reprogramming the max charge_current / charge_voltage
after the reset will not help here as that will put the charger back
in host mode and start the i2c watchdog if the host then does not do
anything for 40s (iow if we're suspended for more then 40s) the watchdog
expires resetting the device to default-mode, including resetting all
the registers to there safe power-on defaults. So the only way to keep
using custom charge settings while suspending is to keep the charger in
its normal running state with the i2c watchdog disabled. This is fine
as the charger will still automatically switch from constant current
to constant voltage and stop charging when the battery is full.

3) Besides never being necessary resetting the charger also causes
problems on systems where the charge voltage limit is set higher then the
reset value, if this is the case and the charger is reset while charging
and the battery voltage is between the 2 voltages, then about half the
time the charger gets confused and claims to be charging (REG08 contains
0x64) but in reality the charger has decoupled itself from VBUS (Q1 off)
and is drawing 0A from VBUS, leaving the system running from the battery.

This last problem is happening on a GPD-win mini PC with a bq24292i
charger chip combined with a max17047 fuel-gauge and a LiHV battery.
I've checked and TI does not list any errata for the bq24292i which
could explain this (there are no errata at all).

Cc: Liam Breck &lt;kernel@networkimprov.net&gt;
Cc: Tony Lindgren &lt;tony@atomide.com&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Acked-by: Liam Breck &lt;kernel@networkimprov.net&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.co.uk&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>power: supply: bq24190_charger: Limit over/under voltage fault logging</title>
<updated>2018-03-24T10:00:09+00:00</updated>
<author>
<name>Liam Breck</name>
<email>kernel@networkimprov.net</email>
</author>
<published>2017-04-11T11:59:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=f15ea8e12821a5709b2eec406cbefa1dba27ff5b'/>
<id>f15ea8e12821a5709b2eec406cbefa1dba27ff5b</id>
<content type='text'>
[ Upstream commit d63d07c6fc25182af6d3ab5b3b8737b0c1025ebd ]

If the charger is unplugged before the battery is full we may
see an over/under voltage fault. Ignore this rather then emitting
a message or uevent.

This fixes messages like these getting logged on charger unplug + replug:
bq24190-charger 15-006b: Fault: boost 0, charge 1, battery 0, ntc 0
bq24190-charger 15-006b: Fault: boost 0, charge 0, battery 0, ntc 0

Cc: Tony Lindgren &lt;tony@atomide.com&gt;
Cc: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Liam Breck &lt;kernel@networkimprov.net&gt;
Acked-by: Tony Lindgren &lt;tony@atomide.com&gt;
Reviewed-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Sebastian Reichel &lt;sre@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit d63d07c6fc25182af6d3ab5b3b8737b0c1025ebd ]

If the charger is unplugged before the battery is full we may
see an over/under voltage fault. Ignore this rather then emitting
a message or uevent.

This fixes messages like these getting logged on charger unplug + replug:
bq24190-charger 15-006b: Fault: boost 0, charge 1, battery 0, ntc 0
bq24190-charger 15-006b: Fault: boost 0, charge 0, battery 0, ntc 0

Cc: Tony Lindgren &lt;tony@atomide.com&gt;
Cc: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Liam Breck &lt;kernel@networkimprov.net&gt;
Acked-by: Tony Lindgren &lt;tony@atomide.com&gt;
Reviewed-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Sebastian Reichel &lt;sre@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>power: supply: ab8500_charger: Bail out in case of error in 'ab8500_charger_init_hw_registers()'</title>
<updated>2018-03-22T08:17:55+00:00</updated>
<author>
<name>Christophe JAILLET</name>
<email>christophe.jaillet@wanadoo.fr</email>
</author>
<published>2017-11-22T20:31:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=7c3632572ab2dbc399f61aca8156b3c18ecf4651'/>
<id>7c3632572ab2dbc399f61aca8156b3c18ecf4651</id>
<content type='text'>
[ Upstream commit 09edcb647542487864e23aa8d2ef26be3e08978a ]

If an error occurs when we enable the backup battery charging, we should
go through the error handling path directly.

Before commit db43e6c473b5 ("ab8500-bm: Add usb power path support") this
was the case, but this commit has added some code between the last test and
the 'out' label.
So, in case of error, this added code is executed and the error may be
silently ignored.

Fix it by adding the missing 'goto out', as done in all other error
handling paths.

Fixes: db43e6c473b5 ("ab8500-bm: Add usb power path support")
Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.co.uk&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 09edcb647542487864e23aa8d2ef26be3e08978a ]

If an error occurs when we enable the backup battery charging, we should
go through the error handling path directly.

Before commit db43e6c473b5 ("ab8500-bm: Add usb power path support") this
was the case, but this commit has added some code between the last test and
the 'out' label.
So, in case of error, this added code is executed and the error may be
silently ignored.

Fix it by adding the missing 'goto out', as done in all other error
handling paths.

Fixes: db43e6c473b5 ("ab8500-bm: Add usb power path support")
Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.co.uk&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>power: supply: ab8500_charger: Fix an error handling path</title>
<updated>2018-03-22T08:17:55+00:00</updated>
<author>
<name>Christophe JAILLET</name>
<email>christophe.jaillet@wanadoo.fr</email>
</author>
<published>2017-11-22T20:27:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=4aac8ff4c4d85603629ede10ca569e4e27a1e1ea'/>
<id>4aac8ff4c4d85603629ede10ca569e4e27a1e1ea</id>
<content type='text'>
[ Upstream commit bf59fddde1c3eab89eb8dca8f3d3dc097887d2bb ]

'ret' is know to be 0 at this point, because it has not been updated by the
the previous call to 'abx500_mask_and_set_register_interruptible()'.

Fix it by updating 'ret' before checking if an error occurred.

Fixes: 84edbeeab67c ("ab8500-charger: AB8500 charger driver")
Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.co.uk&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit bf59fddde1c3eab89eb8dca8f3d3dc097887d2bb ]

'ret' is know to be 0 at this point, because it has not been updated by the
the previous call to 'abx500_mask_and_set_register_interruptible()'.

Fix it by updating 'ret' before checking if an error occurred.

Fixes: 84edbeeab67c ("ab8500-charger: AB8500 charger driver")
Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.co.uk&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>power: reset: zx-reboot: add missing MODULE_DESCRIPTION/AUTHOR/LICENSE</title>
<updated>2018-02-03T16:05:35+00:00</updated>
<author>
<name>Jesse Chan</name>
<email>jc@linux.com</email>
</author>
<published>2017-11-20T20:58:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=517931760e696c779e4d24424633c334a6447450'/>
<id>517931760e696c779e4d24424633c334a6447450</id>
<content type='text'>
commit 348c7cf5fcbcb68838255759d4cb45d039af36d2 upstream.

This change resolves a new compile-time warning
when built as a loadable module:

WARNING: modpost: missing MODULE_LICENSE() in drivers/power/reset/zx-reboot.o
see include/linux/module.h for more information

This adds the license as "GPL v2", which matches the header of the file.

MODULE_DESCRIPTION and MODULE_AUTHOR are also added.

Signed-off-by: Jesse Chan &lt;jc@linux.com&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 348c7cf5fcbcb68838255759d4cb45d039af36d2 upstream.

This change resolves a new compile-time warning
when built as a loadable module:

WARNING: modpost: missing MODULE_LICENSE() in drivers/power/reset/zx-reboot.o
see include/linux/module.h for more information

This adds the license as "GPL v2", which matches the header of the file.

MODULE_DESCRIPTION and MODULE_AUTHOR are also added.

Signed-off-by: Jesse Chan &lt;jc@linux.com&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>power: supply: axp288_fuel_gauge: Read 12 bit values 2 registers at a time</title>
<updated>2017-11-21T08:23:25+00:00</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2016-12-14T16:38:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=9dc7637700e5157df88ab7f536f40c85c23b9160'/>
<id>9dc7637700e5157df88ab7f536f40c85c23b9160</id>
<content type='text'>
[ Upstream commit 248efcf00602f0282587999bcc221a872bd72530 ]

In order for the MSB -&gt; LSB latching to work correctly we must read the
2 8 bit registers of a 12 bit value in one consecutive read.

This fixes voltage_ocv reporting inconsistent values on my tablet.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Sebastian Reichel &lt;sre@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 248efcf00602f0282587999bcc221a872bd72530 ]

In order for the MSB -&gt; LSB latching to work correctly we must read the
2 8 bit registers of a 12 bit value in one consecutive read.

This fixes voltage_ocv reporting inconsistent values on my tablet.

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Sebastian Reichel &lt;sre@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>power: supply: axp288_fuel_gauge: Read 15 bit values 2 registers at a time</title>
<updated>2017-11-21T08:23:25+00:00</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2016-12-14T16:38:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=0010542d3f79ed2c2e3be382f89201c77bcd3bc2'/>
<id>0010542d3f79ed2c2e3be382f89201c77bcd3bc2</id>
<content type='text'>
[ Upstream commit 4949fc5e071f8e8d8122e0b16cf6a2ec1ca36258 ]

In order for the MSB -&gt; LSB latching to work correctly we must read the
2 8 bit registers of a 15 bit value in one consecutive read.

This fixes charge_full reporting 3498768 on some reads and 3354624 one
other reads on my tablet (for the 3354624 value the raw LSB is 0x00).

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Sebastian Reichel &lt;sre@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 4949fc5e071f8e8d8122e0b16cf6a2ec1ca36258 ]

In order for the MSB -&gt; LSB latching to work correctly we must read the
2 8 bit registers of a 15 bit value in one consecutive read.

This fixes charge_full reporting 3498768 on some reads and 3354624 one
other reads on my tablet (for the 3354624 value the raw LSB is 0x00).

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Sebastian Reichel &lt;sre@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>power: supply: axp288_fuel_gauge: Fix fuel_gauge_reg_readb return on error</title>
<updated>2017-10-08T08:26:03+00:00</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2016-12-14T16:38:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=36c56ac0f8977ac189d27a7aa401ea9dca678c5d'/>
<id>36c56ac0f8977ac189d27a7aa401ea9dca678c5d</id>
<content type='text'>
[ Upstream commit 6f074bc878dc9b00c0df0bf3a8cb1d9e294cd881 ]

If reading the register fails, return the actual error code, instead
of the uninitialized val variable;

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Sebastian Reichel &lt;sre@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 6f074bc878dc9b00c0df0bf3a8cb1d9e294cd881 ]

If reading the register fails, return the actual error code, instead
of the uninitialized val variable;

Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Sebastian Reichel &lt;sre@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
