<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/power, branch linux-5.1.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.1.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.1.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2019-06-15T09:53:03Z</updated>
<entry>
<title>power: supply: max14656: fix potential use-before-alloc</title>
<updated>2019-06-15T09:53:03Z</updated>
<author>
<name>Sven Van Asbroeck</name>
<email>thesven73@gmail.com</email>
</author>
<published>2019-02-15T21:43:02Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=95b1b9a1d192482d3857bcb17e6d7f6b8e42bc23'/>
<id>urn:sha1:95b1b9a1d192482d3857bcb17e6d7f6b8e42bc23</id>
<content type='text'>
[ Upstream commit 0cd0e49711556d2331a06b1117b68dd786cb54d2 ]

Call order on probe():
- max14656_hw_init() enables interrupts on the chip
- devm_request_irq() starts processing interrupts, isr
  could be called immediately
-    isr: schedules delayed work (irq_work)
-    irq_work: calls power_supply_changed()
- devm_power_supply_register() registers the power supply

Depending on timing, it's possible that power_supply_changed()
is called on an unregistered power supply structure.

Fix by registering the power supply before requesting the irq.

Cc: Alexander Kurz &lt;akurz@blala.de&gt;
Signed-off-by: Sven Van Asbroeck &lt;TheSven73@gmail.com&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>power: supply: cpcap-battery: Fix signed counter sample register</title>
<updated>2019-06-15T09:53:01Z</updated>
<author>
<name>Tony Lindgren</name>
<email>tony@atomide.com</email>
</author>
<published>2019-04-07T18:12:50Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=bec4c3b32fe65c520a0af49f79da6d7d2be20872'/>
<id>urn:sha1:bec4c3b32fe65c520a0af49f79da6d7d2be20872</id>
<content type='text'>
[ Upstream commit c68b901ac4fa969db8917b6a9f9b40524a690d20 ]

The accumulator sample register is signed 32-bits wide register on
droid 4. And only the earlier version of cpcap has a signed 24-bits
wide register. We're currently passing it around as unsigned, so
let's fix that and use sign_extend32() for the earlier revision.

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;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>power: supply: axp288_fuel_gauge: Add ACEPC T8 and T11 mini PCs to the blacklist</title>
<updated>2019-05-22T05:39:40Z</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2019-04-22T20:43:01Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=2fc90c5b362f7e5dd34294685084370080320b97'/>
<id>urn:sha1:2fc90c5b362f7e5dd34294685084370080320b97</id>
<content type='text'>
commit 9274c78305e12c5f461bec15f49c38e0f32ca705 upstream.

The ACEPC T8 and T11 Cherry Trail Z8350 mini PCs use an AXP288 and as PCs,
rather then portables, they does not have a battery. Still for some
reason the AXP288 not only thinks there is a battery, it actually
thinks it is discharging while the PC is running, slowly going to
0% full, causing userspace to shutdown the system due to the battery
being critically low after a while.

This commit adds the ACEPC T8 and T11 to the axp288 fuel-gauge driver
blacklist, so that we stop reporting bogus battery readings on this device.

BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1690852
Cc: stable@vger.kernel.org
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>power: supply: axp288_charger: Fix unchecked return value</title>
<updated>2019-05-22T05:39:40Z</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavo@embeddedor.com</email>
</author>
<published>2019-03-18T16:14:39Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=725cb554bd0305a41dc7ccd2b2bfb8e3128d1876'/>
<id>urn:sha1:725cb554bd0305a41dc7ccd2b2bfb8e3128d1876</id>
<content type='text'>
commit c3422ad5f84a66739ec6a37251ca27638c85b6be upstream.

Currently there is no check on platform_get_irq() return value
in case it fails, hence never actually reporting any errors and
causing unexpected behavior when using such value as argument
for function regmap_irq_get_virq().

Fix this by adding a proper check, a message reporting any errors
and returning *pirq*

Addresses-Coverity-ID: 1443940 ("Improper use of negative value")
Fixes: 843735b788a4 ("power: axp288_charger: axp288 charger driver")
Cc: stable@vger.kernel.org
Signed-off-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
Reviewed-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>Merge tag 'for-v5.1-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply</title>
<updated>2019-05-01T21:57:23Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2019-05-01T21:57:23Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=600d7258316d87cf9ecd58b6fdc8a35deca0870c'/>
<id>urn:sha1:600d7258316d87cf9ecd58b6fdc8a35deca0870c</id>
<content type='text'>
Pull power supply fixes from Sebastian Reichel:
 "Two more fixes for the 5.1 cycle.

  One division by zero fix in a specific driver and one core workaround
  for bad userspace behaviour from systemd regarding uevents. IMHO this
  can be considered to be a userspace bug, but the debug messages are
  useless anyways

   - cpcap-battery: fix a division by zero

   - core: fix systemd issue due to log messages produced by uevent"

* tag 'for-v5.1-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply:
  power: supply: sysfs: prevent endless uevent loop with CONFIG_POWER_SUPPLY_DEBUG
  power: supply: cpcap-battery: Fix division by zero
</content>
</entry>
<entry>
<title>power: supply: sysfs: prevent endless uevent loop with CONFIG_POWER_SUPPLY_DEBUG</title>
<updated>2019-04-25T22:06:56Z</updated>
<author>
<name>Andrey Smirnov</name>
<email>andrew.smirnov@gmail.com</email>
</author>
<published>2019-04-24T07:16:10Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=349ced9984ff540ce74ca8a0b2e9b03dc434b9dd'/>
<id>urn:sha1:349ced9984ff540ce74ca8a0b2e9b03dc434b9dd</id>
<content type='text'>
Fix a similar endless event loop as was done in commit
8dcf32175b4e ("i2c: prevent endless uevent loop with
CONFIG_I2C_DEBUG_CORE"):

  The culprit is the dev_dbg printk in the i2c uevent handler. If
  this is activated (for instance by CONFIG_I2C_DEBUG_CORE) it results
  in an endless loop with systemd-journald.

  This happens if user-space scans the system log and reads the uevent
  file to get information about a newly created device, which seems
  fair use to me. Unfortunately reading the "uevent" file uses the
  same function that runs for creating the uevent for a new device,
  generating the next syslog entry

Both CONFIG_I2C_DEBUG_CORE and CONFIG_POWER_SUPPLY_DEBUG were reported
in https://bugs.freedesktop.org/show_bug.cgi?id=76886 but only former
seems to have been fixed. Drop debug prints as it was done in I2C
subsystem to resolve the issue.

Signed-off-by: Andrey Smirnov &lt;andrew.smirnov@gmail.com&gt;
Cc: Chris Healy &lt;cphealy@gmail.com&gt;
Cc: linux-pm@vger.kernel.org
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.com&gt;
</content>
</entry>
<entry>
<title>drivers: power: supply: goldfish_battery: Fix bogus SPDX identifier</title>
<updated>2019-04-15T09:16:31Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2019-03-19T14:51:56Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=2aae471d66c108b78493be1147e707bca6331e50'/>
<id>urn:sha1:2aae471d66c108b78493be1147e707bca6331e50</id>
<content type='text'>
spdxcheck.py complains:

 drivers/power/supply/goldfish_battery.c: 1:28 Invalid License ID: GPL

which is correct because GPL is not a valid identifier. Of course this
could have been caught by checkpatch.pl _before_ submitting or merging the
patch.

 WARNING: 'SPDX-License-Identifier: GPL' is not supported in LICENSES/...
 #19: FILE: drivers/power/supply/goldfish_battery.c:1:
 +// SPDX-License-Identifier: GPL

Which is absolutely hillarious as the commit introducing this wreckage says
in the changelog:

  There was a checkpatch complain:

    "Missing or malformed SPDX-License-Identifier tag".

Oh well. Replacing a checkpatch warning by a different checkpatch warning
is a really useful exercise.

Use the proper GPL-2.0 identifier which is what the boiler plate in the
file had originally.

Fixes: e75e3a125b40 ("drivers: power: supply: goldfish_battery: Put an SPDX tag")
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>power: supply: cpcap-battery: Fix division by zero</title>
<updated>2019-04-09T22:53:20Z</updated>
<author>
<name>Tony Lindgren</name>
<email>tony@atomide.com</email>
</author>
<published>2019-04-07T18:12:48Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=dbe7208c6c4aec083571f2ec742870a0d0edbea3'/>
<id>urn:sha1:dbe7208c6c4aec083571f2ec742870a0d0edbea3</id>
<content type='text'>
If called fast enough so samples do not increment, we can get
division by zero in kernel:

__div0
cpcap_battery_cc_raw_div
cpcap_battery_get_property
power_supply_get_property.part.1
power_supply_get_property
power_supply_show_property
power_supply_uevent

Fixes: 874b2adbed12 ("power: supply: cpcap-battery: Add a battery driver")
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>
</entry>
<entry>
<title>power: reset: at91-reset: add support for sam9x60 SoC</title>
<updated>2019-02-19T23:41:01Z</updated>
<author>
<name>Nicolas Ferre</name>
<email>nicolas.ferre@microchip.com</email>
</author>
<published>2019-02-06T18:12:21Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=655ab0bc462d1ae2aa344b1ecf35ca1a3ed726dc'/>
<id>urn:sha1:655ab0bc462d1ae2aa344b1ecf35ca1a3ed726dc</id>
<content type='text'>
Add support for additional reset causes and the proper compatibility
string for sam9x60 SoC. The restart function is the same as the samx7.

Signed-off-by: Nicolas Ferre &lt;nicolas.ferre@microchip.com&gt;
Reviewed-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.com&gt;
</content>
</entry>
<entry>
<title>max17042_battery: fix potential use-after-free on device remove</title>
<updated>2019-02-19T23:36:52Z</updated>
<author>
<name>Sven Van Asbroeck</name>
<email>thesven73@gmail.com</email>
</author>
<published>2019-02-15T22:03:44Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=bf592c56b1650eb12511c4b3f422fecf3871bbb9'/>
<id>urn:sha1:bf592c56b1650eb12511c4b3f422fecf3871bbb9</id>
<content type='text'>
The work which is scheduled on a POR boot is potentially left
pending or running until after the device module is removed,
which could result in a use-after-free.

Fix by registering a cancel/sync callback, which gets executed as
part of standard resource unwinding.

This issue was detected with the help of Coccinelle.

Signed-off-by: Sven Van Asbroeck &lt;TheSven73@gmail.com&gt;
Reviewed-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.com&gt;
</content>
</entry>
</feed>
