<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/power, branch v5.1</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.1</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.1'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2019-05-01T21:57:23Z</updated>
<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://git.shady.money/linux/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://git.shady.money/linux/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://git.shady.money/linux/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://git.shady.money/linux/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://git.shady.money/linux/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://git.shady.money/linux/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>
<entry>
<title>power: supply: core: Add a field to support battery max voltage</title>
<updated>2019-02-19T23:33:08Z</updated>
<author>
<name>Artur Rojek</name>
<email>contact@artur-rojek.eu</email>
</author>
<published>2019-02-17T14:29:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=04fb53101edef67517f2d5dc00c1a5eb707fe101'/>
<id>urn:sha1:04fb53101edef67517f2d5dc00c1a5eb707fe101</id>
<content type='text'>
Add a field for "voltage_max_design_uv" to present fully charged
battery voltage.

Signed-off-by: Artur Rojek &lt;contact@artur-rojek.eu&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.com&gt;
</content>
</entry>
<entry>
<title>bq27x00: use cached flags</title>
<updated>2019-02-19T23:26:38Z</updated>
<author>
<name>Arthur Demchenkov</name>
<email>spinal.by@gmail.com</email>
</author>
<published>2019-02-18T06:59:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9b2c945f9f4d340e9bf84e45f644eda7991a4945'/>
<id>urn:sha1:9b2c945f9f4d340e9bf84e45f644eda7991a4945</id>
<content type='text'>
The flags were just read by bq27xxx_battery_update(),
no need to read them again.

Signed-off-by: Arthur Demchenkov &lt;spinal.by@gmail.com&gt;
Reviewed-by: Andrew F. Davis &lt;afd@ti.com&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.com&gt;
</content>
</entry>
<entry>
<title>power: supply: ds2782: fix possible use-after-free on remove</title>
<updated>2019-02-12T22:27:16Z</updated>
<author>
<name>Sven Van Asbroeck</name>
<email>thesven73@gmail.com</email>
</author>
<published>2019-02-12T16:21:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=74f0aaba7c7161f2f777015f6c2e6d8c2c44aa8f'/>
<id>urn:sha1:74f0aaba7c7161f2f777015f6c2e6d8c2c44aa8f</id>
<content type='text'>
In remove(), use cancel_delayed_work_sync() to cancel the
delayed work. Otherwise there's a chance that this work
will continue to run until after the device has been removed.

While we're here, fix the deallocation order in remove(),
to correspond to the inverse of the probe() allocation
order. This guarantees that any remaining work can run
to completion with all driver structures still intact.

This issue was detected with the help of Coccinelle.

Signed-off-by: Sven Van Asbroeck &lt;TheSven73@gmail.com&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.com&gt;
</content>
</entry>
<entry>
<title>power: supply: bq25890: show max charge current/voltage as configured</title>
<updated>2019-01-23T21:29:45Z</updated>
<author>
<name>Michał Mirosław</name>
<email>mirq-linux@rere.qmqm.pl</email>
</author>
<published>2018-12-17T19:28:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f83a6ece6997fe64ce9b02e8169c3fb43c68ea55'/>
<id>urn:sha1:f83a6ece6997fe64ce9b02e8169c3fb43c68ea55</id>
<content type='text'>
Use firmware-provided limits for POWER_SUPPLY_*_MAX properties instead
of chip max values. This will reflect the battery limits as those are
the important ones.

Signed-off-by: Michał Mirosław &lt;mirq-linux@rere.qmqm.pl&gt;
Signed-off-by: Sebastian Reichel &lt;sebastian.reichel@collabora.com&gt;
</content>
</entry>
</feed>
