<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/power, branch v3.12.10</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/power?h=v3.12.10</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/power?h=v3.12.10'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2014-01-09T20:25:12Z</updated>
<entry>
<title>power_supply: Fix Oops from NULL pointer dereference from wakeup_source_activate</title>
<updated>2014-01-09T20:25:12Z</updated>
<author>
<name>Shuah Khan</name>
<email>shuah.kh@samsung.com</email>
</author>
<published>2013-11-22T17:54:28Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ec3ee0c39ec8eee906aed39c1173e636d62840f9'/>
<id>urn:sha1:ec3ee0c39ec8eee906aed39c1173e636d62840f9</id>
<content type='text'>
commit 80c6463e2fa3377febfc98a6672d92d07f3c26c1 upstream.

power_supply_register() calls device_init_wakeup() to register a wakeup
source before initializing dev_name. As a result, device_wakeup_enable()
end up registering wakeup source with a null name when
wakeup_source_register() gets called with dev_name(dev) which is null at
the time.

When kernel is booted with wakeup_source_activate enabled, it will panic
when the trace point code tries to dereference ws-&gt;name.

Fixed the problem by moving up the kobject_set_name() call prior to
accesses to dev_name(). Replaced kobject_set_name() with dev_set_name()
which is the right interface to be called from drivers. Fixed the call to
device_del() prior to device_add() in for wakeup_init_failed error
handling code.

Trace after the change:

            bash-2143  [003] d...   132.280697: wakeup_source_activate: BAT1 state=0x20001
     kworker/3:2-1169  [003] d...   132.281305: wakeup_source_deactivate: BAT1 state=0x30000

Oops message:

[  819.769934] device: 'BAT1': device_add
[  819.770078] PM: Adding info for No Bus:BAT1
[  819.770235] BUG: unable to handle kernel NULL pointer dereference at           (null)
[  819.770435] IP: [&lt;ffffffff813381c0&gt;] skip_spaces+0x30/0x30
[  819.770572] PGD 3efd90067 PUD 3eff61067 PMD 0
[  819.770716] Oops: 0000 [#1] SMP
[  819.770829] Modules linked in: arc4 iwldvm mac80211 x86_pkg_temp_thermal coretemp kvm_intel joydev i915 kvm uvcvideo ghash_clmulni_intel videobuf2_vmalloc aesni_intel videobuf2_memops videobuf2_core aes_x86_64 ablk_helper cryptd videodev iwlwifi lrw rfcomm gf128mul glue_helper bnep btusb media bluetooth parport_pc hid_generic ppdev snd_hda_codec_hdmi drm_kms_helper snd_hda_codec_realtek cfg80211 drm tpm_infineon samsung_laptop snd_hda_intel usbhid snd_hda_codec hid snd_hwdep snd_pcm microcode snd_page_alloc snd_timer psmouse i2c_algo_bit lpc_ich tpm_tis video wmi mac_hid serio_raw ext2 lp parport r8169 mii
[  819.771802] CPU: 0 PID: 2167 Comm: bash Not tainted 3.12.0+ #25
[  819.771876] Hardware name: SAMSUNG ELECTRONICS CO., LTD. 900X3C/900X3D/900X4C/900X4D/SAMSUNG_NP1234567890, BIOS P03AAC 07/12/2012
[  819.772022] task: ffff88002e6ddcc0 ti: ffff8804015ca000 task.ti: ffff8804015ca000
[  819.772119] RIP: 0010:[&lt;ffffffff813381c0&gt;]  [&lt;ffffffff813381c0&gt;] skip_spaces+0x30/0x30
[  819.772242] RSP: 0018:ffff8804015cbc70  EFLAGS: 00010046
[  819.772310] RAX: 0000000000000003 RBX: ffff88040cfd6d40 RCX: 0000000000000018
[  819.772397] RDX: 0000000000020001 RSI: 0000000000000000 RDI: 0000000000000000
[  819.772484] RBP: ffff8804015cbcc0 R08: 0000000000000000 R09: ffff8803f0768d40
[  819.772570] R10: ffffea001033b800 R11: 0000000000000000 R12: ffffffff81c519c0
[  819.772656] R13: 0000000000020001 R14: 0000000000000000 R15: 0000000000020001
[  819.772744] FS:  00007ff98309b740(0000) GS:ffff88041f200000(0000) knlGS:0000000000000000
[  819.772845] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  819.772917] CR2: 0000000000000000 CR3: 00000003f59dc000 CR4: 00000000001407f0
[  819.773001] Stack:
[  819.773030]  ffffffff81114003 ffff8804015cbcb0 0000000000000000 0000000000000046
[  819.773146]  ffff880409757a18 ffff8803f065a160 0000000000000000 0000000000020001
[  819.773273]  0000000000000000 0000000000000000 ffff8804015cbce8 ffffffff8143e388
[  819.773387] Call Trace:
[  819.773434]  [&lt;ffffffff81114003&gt;] ? ftrace_raw_event_wakeup_source+0x43/0xe0
[  819.773520]  [&lt;ffffffff8143e388&gt;] wakeup_source_report_event+0xb8/0xd0
[  819.773595]  [&lt;ffffffff8143e3cd&gt;] __pm_stay_awake+0x2d/0x50
[  819.773724]  [&lt;ffffffff8153395c&gt;] power_supply_changed+0x3c/0x90
[  819.773795]  [&lt;ffffffff8153407c&gt;] power_supply_register+0x18c/0x250
[  819.773869]  [&lt;ffffffff813d8d18&gt;] sysfs_add_battery+0x61/0x7b
[  819.773935]  [&lt;ffffffff813d8d69&gt;] battery_notify+0x37/0x3f
[  819.774001]  [&lt;ffffffff816ccb7c&gt;] notifier_call_chain+0x4c/0x70
[  819.774071]  [&lt;ffffffff81073ded&gt;] __blocking_notifier_call_chain+0x4d/0x70
[  819.774149]  [&lt;ffffffff81073e26&gt;] blocking_notifier_call_chain+0x16/0x20
[  819.774227]  [&lt;ffffffff8109397a&gt;] pm_notifier_call_chain+0x1a/0x40
[  819.774316]  [&lt;ffffffff81095b66&gt;] hibernate+0x66/0x1c0
[  819.774407]  [&lt;ffffffff81093931&gt;] state_store+0x71/0xa0
[  819.774507]  [&lt;ffffffff81331d8f&gt;] kobj_attr_store+0xf/0x20
[  819.774613]  [&lt;ffffffff811f8618&gt;] sysfs_write_file+0x128/0x1c0
[  819.774735]  [&lt;ffffffff8118579d&gt;] vfs_write+0xbd/0x1e0
[  819.774841]  [&lt;ffffffff811861d9&gt;] SyS_write+0x49/0xa0
[  819.774939]  [&lt;ffffffff816d1052&gt;] system_call_fastpath+0x16/0x1b
[  819.775055] Code: 89 f8 48 89 e5 f6 82 c0 a6 84 81 20 74 15 0f 1f 44 00 00 48 83 c0 01 0f b6 10 f6 82 c0 a6 84 81 20 75 f0 5d c3 66 0f 1f 44 00 00 &lt;80&gt; 3f 00 55 48 89 e5 74 15 48 89 f8 0f 1f 40 00 48 83 c0 01 80
[  819.775760] RIP  [&lt;ffffffff813381c0&gt;] skip_spaces+0x30/0x30
[  819.775881]  RSP &lt;ffff8804015cbc70&gt;
[  819.775949] CR2: 0000000000000000
[  819.794175] ---[ end trace c4ef25127039952e ]---

Signed-off-by: Shuah Khan &lt;shuah.kh@samsung.com&gt;
Acked-by: Anton Vorontsov &lt;anton@enomsg.org&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Anton Vorontsov &lt;anton@enomsg.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>Remove GENERIC_HARDIRQ config option</title>
<updated>2013-09-13T13:09:52Z</updated>
<author>
<name>Martin Schwidefsky</name>
<email>schwidefsky@de.ibm.com</email>
</author>
<published>2013-08-30T07:39:53Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0244ad004a54e39308d495fee0a2e637f8b5c317'/>
<id>urn:sha1:0244ad004a54e39308d495fee0a2e637f8b5c317</id>
<content type='text'>
After the last architecture switched to generic hard irqs the config
options HAVE_GENERIC_HARDIRQS &amp; GENERIC_HARDIRQS and the related code
for !CONFIG_GENERIC_HARDIRQS can be removed.

Signed-off-by: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'for-v3.12' of git://git.infradead.org/battery-2.6</title>
<updated>2013-09-11T05:58:14Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2013-09-11T05:58:14Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a22a0fdba4191473581f86c9dd5361cf581521d3'/>
<id>urn:sha1:a22a0fdba4191473581f86c9dd5361cf581521d3</id>
<content type='text'>
Pull battery/power supply driver updates from Anton Vorontsov:
 "New drivers:

   - APM X-Gene system reboot driver by Feng Kan and Loc Ho (APM).

   - Qualcomm MSM reboot/poweroff driver by Abhimanyu Kapur (Codeaurora).

   - Texas Instruments BQ24190 charger driver by Mark A.  Greer (Animal
     Creek Technologies).

   - Texas Instruments TWL4030 MADC battery driver by Lukas Märdian and
     Marek Belisko (Golden Delicious Computers).  The driver is used on
     Freerunner GTA04 phones.

  Highlighted fixes and improvements:

   - Suspend/wakeup logic improvements: power supply objects will block
     system suspend until all power supply events are processed.  Thanks
     to Zoran Markovic (Linaro), Arve Hjonnevag and Todd Poynor (Google)"

* tag 'for-v3.12' of git://git.infradead.org/battery-2.6:
  rx51_battery: Fix channel number when reading adc value
  power: Add twl4030_madc battery driver.
  bq24190_charger: Workaround SS definition problem on i386 builds
  power_supply: Prevent suspend until power supply events are processed
  vexpress-poweroff: Should depend on the required infrastructure
  twl4030-charger: Fix compiler warning with regulator_enable()
  rx51_battery: Replace hardcoded channels values.
  bq24190_charger: Add support for TI BQ24190 Battery Charger
  ab8500-charger: We print an unintended error message
  max8925_power: Fix missing of_node_put
  power_supply: Replace strict_strtol() with kstrtol()
  power: Add APM X-Gene system reboot driver
  power_supply: tosa_battery: Get rid of irq_to_gpio usage
  power supply: collie_battery: Convert to use dev_pm_ops
  power_supply: Make goldfish_battery depend on GOLDFISH || COMPILE_TEST
  power: reset: Add msm restart support
  MAINTAINERS: drivers/power: add entry for SmartReflex AVS drivers
</content>
</entry>
<entry>
<title>rx51_battery: Fix channel number when reading adc value</title>
<updated>2013-08-31T00:49:15Z</updated>
<author>
<name>Marek Belisko</name>
<email>marek.belisko@open-nandra.com</email>
</author>
<published>2013-08-31T00:47:57Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=db15e6312efd537e2deb2cbad110c23f98704a3c'/>
<id>urn:sha1:db15e6312efd537e2deb2cbad110c23f98704a3c</id>
<content type='text'>
This issue was introduced in commit 8e2747f031bd "power: rx51_battery:
Replace hardcoded channels values."

Original code use channel as argument which was shifted by one in
function. After mentioned commit argument is already shifted so we need to
get index back.

Signed-off-by: Marek Belisko &lt;marek.belisko@open-nandra.com&gt;
Signed-off-by: Anton Vorontsov &lt;anton@enomsg.org&gt;
</content>
</entry>
<entry>
<title>power: Add twl4030_madc battery driver.</title>
<updated>2013-08-31T00:34:52Z</updated>
<author>
<name>Marek Belisko</name>
<email>marek@goldelico.com</email>
</author>
<published>2013-08-29T09:41:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=da0a00ebc239e852a504abfce2ad98957434ae58'/>
<id>urn:sha1:da0a00ebc239e852a504abfce2ad98957434ae58</id>
<content type='text'>
This driver is used and tested on gta04 phone. It's using twl4030_madc
(similar to rx51 existing driver). Driver also implement charging and
discharging calibration data so user can define ranges and level.

Signed-off-by: Marek Belisko &lt;marek@goldelico.com&gt;
Signed-off-by: Lukas Märdian &lt;lukas@goldelico.com&gt;
Signed-off-by: Anton Vorontsov &lt;anton@enomsg.org&gt;
</content>
</entry>
<entry>
<title>bq24190_charger: Workaround SS definition problem on i386 builds</title>
<updated>2013-08-29T00:52:50Z</updated>
<author>
<name>Anton Vorontsov</name>
<email>anton@enomsg.org</email>
</author>
<published>2013-08-29T00:45:07Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d24fed391dc50f68d27a57364e51888b3a9266b6'/>
<id>urn:sha1:d24fed391dc50f68d27a57364e51888b3a9266b6</id>
<content type='text'>
For __i386__ builds we have:

arch/x86/include/uapi/asm/ptrace-abi.h:#define SS   16

And in the driver:

BQ24190_SYSFS_FIELD_RO(vbus_stat,       SS,     VBUS_STAT)

That breaks the build like this:

drivers/power/bq24190_charger.c:375:138: error: ‘BQ24190_REG_16’
undeclared here (not in a function)
drivers/power/bq24190_charger.c:375:162: error:
‘BQ24190_REG_16_THERM_STAT_MASK’ undeclared here (not in a function)
drivers/power/bq24190_charger.c:375:203: error:
‘BQ24190_REG_16_THERM_STAT_SHIFT’ undeclared here (not
 in a function)

With this commit we workaround the problem by undefining 'SS'.

Reported-by: kbuild test robot &lt;fengguang.wu@intel.com&gt;
Signed-off-by: Anton Vorontsov &lt;anton@enomsg.org&gt;
</content>
</entry>
<entry>
<title>power_supply: Prevent suspend until power supply events are processed</title>
<updated>2013-08-28T01:42:48Z</updated>
<author>
<name>Zoran Markovic</name>
<email>zoran.markovic@linaro.org</email>
</author>
<published>2013-08-02T20:38:02Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=948dcf96622814d2a850a12851d27824530a9747'/>
<id>urn:sha1:948dcf96622814d2a850a12851d27824530a9747</id>
<content type='text'>
This patch, originally authored by Arve Hjonnevag and Todd Poynor,
prevents the system from entering suspend mode until the power supply
plug, unplug, or any other change of state event is fully processed. This
guarantees that the screen lights up and displays the battery charging
state. The implementation uses the power supply wakeup_source object.

Cc: David Woodhouse &lt;dwmw2@infradead.org&gt;
Cc: Arve Hjonnevag &lt;arve@android.com&gt;
Cc: Todd Poynor &lt;toddpoynor@google.com&gt;
Cc: John Stultz &lt;john.stultz@linaro.org&gt;
Signed-off-by: Zoran Markovic &lt;zoran.markovic@linaro.org&gt;
Signed-off-by: Anton Vorontsov &lt;anton@enomsg.org&gt;
</content>
</entry>
<entry>
<title>vexpress-poweroff: Should depend on the required infrastructure</title>
<updated>2013-08-28T01:30:57Z</updated>
<author>
<name>Pawel Moll</name>
<email>pawel.moll@arm.com</email>
</author>
<published>2013-08-15T15:35:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a2c0206ad6a32b9f7287c87f20060ba59222f3b3'/>
<id>urn:sha1:a2c0206ad6a32b9f7287c87f20060ba59222f3b3</id>
<content type='text'>
ARM Versatile Express reset driver requires platform-specific config
infrastructure to be present in the kernel. When VEXPRESS_CONFIG is not
selected, the build will fail like this:

drivers/built-in.o: In function `vexpress_reset_do.clone.0':
iio-trig-interrupt.c:(.text+0x1aff38): undefined reference to `__vexpress_config_func_get'
iio-trig-interrupt.c:(.text+0x1aff4c): undefined reference to `vexpress_config_write'

Added required dependency to the Kconfig entry.

Signed-off-by: Pawel Moll &lt;pawel.moll@arm.com&gt;
Signed-off-by: Anton Vorontsov &lt;anton@enomsg.org&gt;
</content>
</entry>
<entry>
<title>twl4030-charger: Fix compiler warning with regulator_enable()</title>
<updated>2013-08-28T01:28:30Z</updated>
<author>
<name>Peter Ujfalusi</name>
<email>peter.ujfalusi@ti.com</email>
</author>
<published>2013-08-21T08:31:37Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=697be361d2b3fd7760869341d7ce805092a5c1e5'/>
<id>urn:sha1:697be361d2b3fd7760869341d7ce805092a5c1e5</id>
<content type='text'>
The return value of regulator_enable need to be checked. This patch fixes
the following warning:
drivers/power/twl4030_charger.c: In function ‘twl4030_charger_enable_usb’:
drivers/power/twl4030_charger.c:192:20: warning: ignoring return value of ‘regulator_enable’, declared with attribute warn_unused_result [-Wunused-result]

Signed-off-by: Peter Ujfalusi &lt;peter.ujfalusi@ti.com&gt;
Signed-off-by: Anton Vorontsov &lt;anton@enomsg.org&gt;
</content>
</entry>
<entry>
<title>rx51_battery: Replace hardcoded channels values.</title>
<updated>2013-08-28T01:26:44Z</updated>
<author>
<name>Marek Belisko</name>
<email>marek.belisko@open-nandra.com</email>
</author>
<published>2013-08-21T22:45:10Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8e2747f031bd322d0fc25e0338ef50d4c18843d4'/>
<id>urn:sha1:8e2747f031bd322d0fc25e0338ef50d4c18843d4</id>
<content type='text'>
In twl4030_madc header exist defines for fixed channels + add rx51
specific channels and replace all hardcoded channels values.

Signed-off-by: Marek Belisko &lt;marek.belisko@open-nandra.com&gt;
Signed-off-by: Anton Vorontsov &lt;anton@enomsg.org&gt;
</content>
</entry>
</feed>
