<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/power, branch v4.7</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=v4.7</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.7'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2016-06-16T13:54:11Z</updated>
<entry>
<title>power_supply: tps65217-charger: Fix NULL deref during property export</title>
<updated>2016-06-16T13:54:11Z</updated>
<author>
<name>Marcin Niestroj</name>
<email>m.niestroj@grinn-global.com</email>
</author>
<published>2016-06-14T13:29:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=362761299eea7dfc3a4870551de36e08758b9254'/>
<id>urn:sha1:362761299eea7dfc3a4870551de36e08758b9254</id>
<content type='text'>
This bug leads to:

[    1.906411] Unable to handle kernel NULL pointer dereference at virtual address 0000000c
[    1.914878] pgd = c0004000
[    1.917786] [0000000c] *pgd=00000000
[    1.921536] Internal error: Oops: 5 [#1] SMP ARM
[    1.926357] Modules linked in:
[    1.929556] CPU: 0 PID: 14 Comm: kworker/0:1 Not tainted 4.4.5 #18
[    1.936006] Hardware name: Generic AM33XX (Flattened Device Tree)
[    1.942383] Workqueue: events power_supply_changed_work
[    1.947842] task: de2c41c0 ti: de2c8000 task.ti: de2c8000
[    1.953483] PC is at tps65217_ac_get_property+0x14/0x28
[    1.958937] LR is at tps65217_ac_get_property+0x10/0x28

Driver was trying to use drv_data in property get handler. However drv_data
was not set, so it caused NULL pointer dereference. This patch properly
sets drv_data during probe by power_supply_config parameter, so the
property get handler works as desired.

Signed-off-by: Marcin Niestroj &lt;m.niestroj@grinn-global.com&gt;
Fixes: 3636859b280c ("power_supply: Add support for tps65217-charger")
Signed-off-by: Sebastian Reichel &lt;sre@kernel.org&gt;
</content>
</entry>
<entry>
<title>power_supply: power_supply_read_temp only if use_cnt &gt; 0</title>
<updated>2016-06-14T17:25:48Z</updated>
<author>
<name>Rhyland Klein</name>
<email>rklein@nvidia.com</email>
</author>
<published>2016-06-09T21:28:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5bc28b93a36e3cb3acc2870fb75cb6ffb182fece'/>
<id>urn:sha1:5bc28b93a36e3cb3acc2870fb75cb6ffb182fece</id>
<content type='text'>
Change power_supply_read_temp() to use power_supply_get_property()
so that it will check the use_cnt and ensure it is &gt; 0. The use_cnt
will be incremented at the end of __power_supply_register, so this
will block to case where get_property can be called before the supply
is fully registered. This fixes the issue show in the stack below:

[    1.452598] power_supply_read_temp+0x78/0x80
[    1.458680] thermal_zone_get_temp+0x5c/0x11c
[    1.464765] thermal_zone_device_update+0x34/0xb4
[    1.471195] thermal_zone_device_register+0x87c/0x8cc
[    1.477974] __power_supply_register+0x364/0x424
[    1.484317] power_supply_register_no_ws+0x10/0x18
[    1.490833] bq27xxx_battery_setup+0x10c/0x164
[    1.497003] bq27xxx_battery_i2c_probe+0xd0/0x1b0
[    1.503435] i2c_device_probe+0x174/0x240
[    1.509172] driver_probe_device+0x1fc/0x29c
[    1.515167] __driver_attach+0xa4/0xa8
[    1.520643] bus_for_each_dev+0x58/0x98
[    1.526204] driver_attach+0x20/0x28
[    1.531505] bus_add_driver+0x1c8/0x22c
[    1.537067] driver_register+0x68/0x108
[    1.542630] i2c_register_driver+0x38/0x7c
[    1.548457] bq27xxx_battery_i2c_driver_init+0x18/0x20
[    1.555321] do_one_initcall+0x38/0x12c
[    1.560886] kernel_init_freeable+0x148/0x1ec
[    1.566972] kernel_init+0x10/0xfc
[    1.572101] ret_from_fork+0x10/0x40

Also make the same change to ps_get_max_charge_cntl_limit() and
ps_get_cur_chrage_cntl_limit() to be safe. Lastly, change the return
value of power_supply_get_property() to -EAGAIN from -ENODEV if
use_cnt &lt;= 0.

Fixes: 297d716f6260 ("power_supply: Change ownership from driver to core")
Cc: stable@vger.kernel.org
Signed-off-by: Rhyland Klein &lt;rklein@nvidia.com&gt;
Reviewed-by: Krzysztof Kozlowski &lt;k.kozlowski@samsung.com&gt;
Signed-off-by: Sebastian Reichel &lt;sre@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'for-v4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply</title>
<updated>2016-05-20T21:06:21Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-05-20T21:06:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7992893c5a9fdffa42117f6f749359466e06bdf6'/>
<id>urn:sha1:7992893c5a9fdffa42117f6f749359466e06bdf6</id>
<content type='text'>
Pull power supply and reset updates from Sebastian Reichel:

 - alternative reset driver for new at91 SoCs

 - misc fixes

* tag 'for-v4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply:
  sbs-battery: fix power status when battery charging near dry
  power: ipaq-micro-battery: freeing the wrong variable
  power/max8925: freeing wrong variable
  power: reset: at91-shdwc: add new shutdown controller driver
  ARM: dts: at91: shdwc binding: add new shutdown controller documentation
</content>
</entry>
<entry>
<title>PM / AVS: rockchip-io: make io-domains a child of the GRF</title>
<updated>2016-04-26T17:12:28Z</updated>
<author>
<name>Heiko Stuebner</name>
<email>heiko@sntech.de</email>
</author>
<published>2016-03-31T13:48:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bc19b9a81da009fd1d797d756d41b518ac7e5f14'/>
<id>urn:sha1:bc19b9a81da009fd1d797d756d41b518ac7e5f14</id>
<content type='text'>
IO-domain handling is part of the general register files, so should live
under the grf directly. This change allows the grf to be a simple-mfd and
the io-domains fetching the syscon regmap from that parent-node.

The old binding is of course preserved, though deprecated.

Signed-off-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
Acked-by: Kevin Hilman &lt;khilman@baylibre.com&gt;
Tested-by: David Wu &lt;david.wu@rock-chips.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>sbs-battery: fix power status when battery charging near dry</title>
<updated>2016-04-10T15:22:35Z</updated>
<author>
<name>YH Huang</name>
<email>yh.huang@mediatek.com</email>
</author>
<published>2016-04-06T02:32:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4a99fa06a8ca27a5187636e630568658000af575'/>
<id>urn:sha1:4a99fa06a8ca27a5187636e630568658000af575</id>
<content type='text'>
POWER_SUPPLY_STATUS_NOT_CHARGING is used for AC connected, but
battery not charging (e.g. because battery temperature is out
of acceptable range).

When battery is charging near dry and BATTERY_FULL_DISCHARGED is set,
it is wrong to set as POWER_SUPPLY_STATUS_NOT_CHARGING.
Just use BATTERY_DISCHARGING to decide the power supply status is
discharging or charging.

Signed-off-by: YH Huang &lt;yh.huang@mediatek.com&gt;
Reviewed-by: Daniel Kurtz &lt;djkurtz@chromium.org&gt;
Signed-off-by: Sebastian Reichel &lt;sre@kernel.org&gt;
</content>
</entry>
<entry>
<title>power: ipaq-micro-battery: freeing the wrong variable</title>
<updated>2016-04-10T15:19:52Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2016-03-18T09:00:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b9223da41794030a5dfd5106c34ed1b98255e2ae'/>
<id>urn:sha1:b9223da41794030a5dfd5106c34ed1b98255e2ae</id>
<content type='text'>
We accidentally free "micro_ac_power" which is an error pointer and it
leads to an oops.  We intended to free "micro_batt_power".

Fixes: a2c1d531854c ('power_supply: ipaq_micro_battery: Check return values in probe')
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Sebastian Reichel &lt;sre@kernel.org&gt;
</content>
</entry>
<entry>
<title>power/max8925: freeing wrong variable</title>
<updated>2016-04-10T15:19:33Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2016-03-18T05:40:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1285b0a30d530d0807c229c6aad73ed1966d75ad'/>
<id>urn:sha1:1285b0a30d530d0807c229c6aad73ed1966d75ad</id>
<content type='text'>
We were freeing "info-&gt;battery" instead of "info-&gt;usb", which leads to
an OOps and a resource leak.

The labels were wonky, "out_battery" did release the battery but out_usb
did not release usb.  I was introducing a call to free usb so it sort
conflicted with existing misleading name.  I renamed them.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Sebastian Reichel &lt;sre@kernel.org&gt;
</content>
</entry>
<entry>
<title>power: reset: at91-shdwc: add new shutdown controller driver</title>
<updated>2016-04-10T15:17:38Z</updated>
<author>
<name>Nicolas Ferre</name>
<email>nicolas.ferre@atmel.com</email>
</author>
<published>2016-03-16T13:19:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f80cb488439879df6ae3ba32a5dc4e0892fcd3ff'/>
<id>urn:sha1:f80cb488439879df6ae3ba32a5dc4e0892fcd3ff</id>
<content type='text'>
Sama5d2 SoC has a completely new shutdown controller with new features and
register layout. It thus makes sense to add a new driver for this new
peripheral.

This driver is Device Tree only and handles events from the wake-up pin and
the RTC.
As the register layout may change in the future, so some values are encoded
in a configuration structure.

Signed-off-by: Nicolas Ferre &lt;nicolas.ferre@atmel.com&gt;
Acked-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
Signed-off-by: Sebastian Reichel &lt;sre@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'pm+acpi-4.6-rc1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm</title>
<updated>2016-03-25T23:55:37Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-03-25T23:55:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=15dbc136dff62ebefb03353cfb7d308d49b275f3'/>
<id>urn:sha1:15dbc136dff62ebefb03353cfb7d308d49b275f3</id>
<content type='text'>
Pull power management fixlet from Rafael Wysocki:
 "One of commits in my previous pull request changed the permissions of
  drivers/power/avs/rockchip-io-domain.c to executable by mistake"

* tag 'pm+acpi-4.6-rc1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  Fix permissions of drivers/power/avs/rockchip-io-domain.c
</content>
</entry>
<entry>
<title>Fix permissions of drivers/power/avs/rockchip-io-domain.c</title>
<updated>2016-03-25T21:36:17Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2016-03-25T21:33:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8e653b654497350f9cb3d6c2088207bc503f2c7c'/>
<id>urn:sha1:8e653b654497350f9cb3d6c2088207bc503f2c7c</id>
<content type='text'>
The permissions of this file were modified by commit (f447671b9e4f PM /
AVS: rockchip-io: add io selectors and supplies for rk3399) by mistake,
so fix them.

Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
</feed>
