<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers/power, branch v4.4.142</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.4.142</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.4.142'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2018-03-24T09:58:45Z</updated>
<entry>
<title>power: supply: pda_power: move from timer to delayed_work</title>
<updated>2018-03-24T09:58:45Z</updated>
<author>
<name>Michael Trimarchi</name>
<email>michael@amarulasolutions.com</email>
</author>
<published>2017-04-25T13:18:05Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=448de2395f966c6d0f5befede0b582619dedb89e'/>
<id>urn:sha1:448de2395f966c6d0f5befede0b582619dedb89e</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>
</entry>
<entry>
<title>power: bq27xxx_battery: mark some symbols __maybe_unused</title>
<updated>2018-02-25T10:03:50Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2018-02-20T11:54:50Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e8988dbe21b0449e1e5393e92fafd1f19b7db197'/>
<id>urn:sha1:e8988dbe21b0449e1e5393e92fafd1f19b7db197</id>
<content type='text'>
Without the I2C driver, we get a few warnings:

drivers/power/bq27xxx_battery.c:288:12: error: 'bq27xxx_regs' defined but not used [-Werror=unused-variable]
 static u8 *bq27xxx_regs[] = {
            ^
drivers/power/bq27xxx_battery.c:994:12: error: 'bq27xxx_powersupply_init' defined but not used [-Werror=unused-function]
 static int bq27xxx_powersupply_init(struct bq27xxx_device_info *di,
            ^
drivers/power/bq27xxx_battery.c:1029:13: error: 'bq27xxx_powersupply_unregister' defined but not used [-Werror=unused-function]
 static void bq27xxx_powersupply_unregister(struct bq27xxx_device_info *di)
             ^

In mainline kernels, this was addressed by a larger rework in 703df6c09795 ("power:
bq27xxx_battery: Reorganize I2C into a module"). We probably don't want this backported
into stable kernels, so instead let's shut up the warnings by marking the symbols
as __maybe_unused.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Revert "power: bq27xxx_battery: Remove unneeded dependency in Kconfig"</title>
<updated>2018-02-25T10:03:50Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2018-02-20T11:54:49Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=7131acefb98a5f96745847221ce9825fa21dbde7'/>
<id>urn:sha1:7131acefb98a5f96745847221ce9825fa21dbde7</id>
<content type='text'>
This reverts commit 6bd03ce3c12a22d86f59070f1da15aaa2bde8a51, it was applied
in error and cuased this link failure

drivers/built-in.o: In function `bq27xxx_battery_i2c_read':
core.c:(.text+0xa6da8): undefined reference to `i2c_transfer'
drivers/built-in.o: In function `bq27xxx_battery_init':
core.c:(.init.text+0x68e0): undefined reference to `i2c_register_driver'
drivers/built-in.o: In function `bq27xxx_battery_exit':
core.c:(.exit.text+0xc6c): undefined reference to `i2c_del_driver'

Later upstream kernels fixed this with a larger rework in commit
703df6c09795 ("power: bq27xxx_battery: Reorganize I2C into a module"),
but we cannot backport that to 4.4.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>power: reset: zx-reboot: add missing MODULE_DESCRIPTION/AUTHOR/LICENSE</title>
<updated>2018-02-03T16:04:25Z</updated>
<author>
<name>Jesse Chan</name>
<email>jc@linux.com</email>
</author>
<published>2017-11-20T20:58:27Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3f19b9ea13f49aed67192e768f207b7ecbd2cb1f'/>
<id>urn:sha1:3f19b9ea13f49aed67192e768f207b7ecbd2cb1f</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>
</entry>
<entry>
<title>power: supply: bq24190_charger: Handle fault before status on interrupt</title>
<updated>2017-05-14T11:32:54Z</updated>
<author>
<name>Liam Breck</name>
<email>liam@networkimprov.net</email>
</author>
<published>2017-01-18T17:26:54Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f9893beaaea0838dae4f5e7887e0b24944ad8768'/>
<id>urn:sha1:f9893beaaea0838dae4f5e7887e0b24944ad8768</id>
<content type='text'>
commit ba52e75718784fda1b683ee0bfded72a0b83b047 upstream.

Reading both fault and status registers and logging any fault should
take priority over handling status register update.

Fix by moving the status handling to later in interrupt routine.

Fixes: d7bf353fd0aa3 ("bq24190_charger: Add support for TI BQ24190 Battery Charger")
Signed-off-by: Liam Breck &lt;kernel@networkimprov.net&gt;
Acked-by: Mark Greer &lt;mgreer@animalcreek.com&gt;
Acked-by: Tony Lindgren &lt;tony@atomide.com&gt;
Signed-off-by: Sebastian Reichel &lt;sre@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>power: supply: bq24190_charger: Don't read fault register outside irq_handle_thread()</title>
<updated>2017-05-14T11:32:54Z</updated>
<author>
<name>Liam Breck</name>
<email>liam@networkimprov.net</email>
</author>
<published>2017-01-18T17:26:53Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=98cbfaaf4e4c699ab95eca9131770943ad71fd0e'/>
<id>urn:sha1:98cbfaaf4e4c699ab95eca9131770943ad71fd0e</id>
<content type='text'>
commit 68abfb8015832ddf728b911769659468efaf8bd9 upstream.

Caching the fault register after a single I2C read may not keep an accurate
value.

Fix by doing two reads in irq_handle_thread() and using the cached value
elsewhere. If a safety timer fault later clears itself, we apparently don't get
an interrupt (INT), however other interrupts would refresh the register cache.

From the data sheet: "When a fault occurs, the charger device sends out INT
 and keeps the fault state in REG09 until the host reads the fault register.
 Before the host reads REG09 and all the faults are cleared, the charger
 device would not send any INT upon new faults. In order to read the
 current fault status, the host has to read REG09 two times consecutively.
 The 1st reads fault register status from the last read [1] and the 2nd reads
 the current fault register status."

[1] presumably a typo; should be "last fault"

Fixes: d7bf353fd0aa3 ("bq24190_charger: Add support for TI BQ24190 Battery Charger")
Signed-off-by: Liam Breck &lt;kernel@networkimprov.net&gt;
Acked-by: Mark Greer &lt;mgreer@animalcreek.com&gt;
Acked-by: Tony Lindgren &lt;tony@atomide.com&gt;
Signed-off-by: Sebastian Reichel &lt;sre@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>power: supply: bq24190_charger: Call power_supply_changed() for relevant component</title>
<updated>2017-05-14T11:32:54Z</updated>
<author>
<name>Liam Breck</name>
<email>liam@networkimprov.net</email>
</author>
<published>2017-01-18T17:26:52Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=092a9c8ba3be6887e2422cb17d8d90bac0a1f725'/>
<id>urn:sha1:092a9c8ba3be6887e2422cb17d8d90bac0a1f725</id>
<content type='text'>
commit 2d9fee6a42ea170e4378b3363a7ad385d0e67281 upstream.

We wrongly get uevents for bq24190-charger and bq24190-battery on every
register change.

Fix by checking the association with charger and battery before
emitting uevent(s).

Fixes: d7bf353fd0aa3 ("bq24190_charger: Add support for TI BQ24190 Battery Charger")
Signed-off-by: Liam Breck &lt;kernel@networkimprov.net&gt;
Acked-by: Mark Greer &lt;mgreer@animalcreek.com&gt;
Acked-by: Tony Lindgren &lt;tony@atomide.com&gt;
Signed-off-by: Sebastian Reichel &lt;sre@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>power: supply: bq24190_charger: Install irq_handler_thread() at end of probe()</title>
<updated>2017-05-14T11:32:54Z</updated>
<author>
<name>Liam Breck</name>
<email>liam@networkimprov.net</email>
</author>
<published>2017-01-18T17:26:50Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=397cad3a37378fe6619578ab16db51ed879a4688'/>
<id>urn:sha1:397cad3a37378fe6619578ab16db51ed879a4688</id>
<content type='text'>
commit d62acc5ef0621463446091ebd7a345e06e9ab80c upstream.

The device specific data is not fully initialized on
request_threaded_irq(). This may cause a crash when the IRQ handler
tries to reference them.

Fix the issue by installing IRQ handler at the end of the probe.

Fixes: d7bf353fd0aa3 ("bq24190_charger: Add support for TI BQ24190 Battery Charger")
Signed-off-by: Liam Breck &lt;kernel@networkimprov.net&gt;
Acked-by: Mark Greer &lt;mgreer@animalcreek.com&gt;
Acked-by: Tony Lindgren &lt;tony@atomide.com&gt;
Signed-off-by: Sebastian Reichel &lt;sre@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>power: supply: bq24190_charger: Call set_mode_host() on pm_resume()</title>
<updated>2017-05-14T11:32:54Z</updated>
<author>
<name>Liam Breck</name>
<email>liam@networkimprov.net</email>
</author>
<published>2017-01-18T17:26:49Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=760d62e94017b55368a0905f36d47c5035c83b84'/>
<id>urn:sha1:760d62e94017b55368a0905f36d47c5035c83b84</id>
<content type='text'>
commit e05ad7e0741ce0505e1df157c62b22b95172bb97 upstream.

pm_resume() does a register_reset() which clears charger host mode.

Fix by calling set_mode_host() after the reset.

Fixes: d7bf353fd0aa3 ("bq24190_charger: Add support for TI BQ24190 Battery Charger")
Signed-off-by: Liam Breck &lt;kernel@networkimprov.net&gt;
Acked-by: Mark Greer &lt;mgreer@animalcreek.com&gt;
Acked-by: Tony Lindgren &lt;tony@atomide.com&gt;
Signed-off-by: Sebastian Reichel &lt;sre@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>power: supply: bq24190_charger: Fix irq trigger to IRQF_TRIGGER_FALLING</title>
<updated>2017-05-14T11:32:54Z</updated>
<author>
<name>Liam Breck</name>
<email>liam@networkimprov.net</email>
</author>
<published>2017-01-18T17:26:48Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ed2249841109beea80ec5cfdd2633e6025258989'/>
<id>urn:sha1:ed2249841109beea80ec5cfdd2633e6025258989</id>
<content type='text'>
commit 767eee362fd72bb2ca44cc80419ca4b38c6d8369 upstream.

The interrupt signal is TRIGGER_FALLING. This is is specified in the
data sheet PIN FUNCTIONS: "The INT pin sends active low, 256us
pulse to host to report charger device status and fault."

Also the direction can be seen in the data sheet Figure 37 "BQ24190
with D+/D- Detection and USB On-The-Go (OTG)" which shows a 10k
pull-up resistor installed for the sample configurations.

Fixes: d7bf353fd0aa3 ("bq24190_charger: Add support for TI BQ24190 Battery Charger")
Signed-off-by: Liam Breck &lt;kernel@networkimprov.net&gt;
Acked-by: Mark Greer &lt;mgreer@animalcreek.com&gt;
Acked-by: Tony Lindgren &lt;tony@atomide.com&gt;
Signed-off-by: Sebastian Reichel &lt;sre@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
</feed>
