<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/regulator/s5m8767.c, branch v3.10.11</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>Merge remote-tracking branch 'regulator/topic/s5m8767' into v3.9-rc8</title>
<updated>2013-04-28T01:13:46+00:00</updated>
<author>
<name>Mark Brown</name>
<email>broonie@sirena.org.uk</email>
</author>
<published>2013-04-28T01:13:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=eea8e85e3b4c19cfa1028822adfd85842553d841'/>
<id>eea8e85e3b4c19cfa1028822adfd85842553d841</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>regulator: Remove NULL test before calling regulator_unregister()</title>
<updated>2013-04-28T01:11:19+00:00</updated>
<author>
<name>Axel Lin</name>
<email>axel.lin@ingics.com</email>
</author>
<published>2013-04-27T05:58:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=020501f1a0911af70873e4d3d122b2e1889ccd03'/>
<id>020501f1a0911af70873e4d3d122b2e1889ccd03</id>
<content type='text'>
It's safe to call regulator_unregister() with NULL, thus remove the NULL test
before regulator_unregister() calls.

Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Signed-off-by: Mark Brown &lt;broonie@sirena.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It's safe to call regulator_unregister() with NULL, thus remove the NULL test
before regulator_unregister() calls.

Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Signed-off-by: Mark Brown &lt;broonie@sirena.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>regulator: s5m8767: adjust duplicate test</title>
<updated>2013-03-04T02:56:37+00:00</updated>
<author>
<name>Julia Lawall</name>
<email>Julia.Lawall@lip6.fr</email>
</author>
<published>2013-02-24T11:55:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=720a9717bcdad6fbfa22cde082c47fb969a22f6f'/>
<id>720a9717bcdad6fbfa22cde082c47fb969a22f6f</id>
<content type='text'>
Delete successive tests to the same location.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// &lt;smpl&gt;
@s exists@
local idexpression y;
expression x,e;
@@

*if ( \(x == NULL\|IS_ERR(x)\|y != 0\) )
 { ... when forall
   return ...; }
... when != \(y = e\|y += e\|y -= e\|y |= e\|y &amp;= e\|y++\|y--\|&amp;y\)
*if ( \(x == NULL\|IS_ERR(x)\|y != 0\) )
 { ... when forall
   return ...; }
// &lt;/smpl&gt;

Signed-off-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Delete successive tests to the same location.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// &lt;smpl&gt;
@s exists@
local idexpression y;
expression x,e;
@@

*if ( \(x == NULL\|IS_ERR(x)\|y != 0\) )
 { ... when forall
   return ...; }
... when != \(y = e\|y += e\|y -= e\|y |= e\|y &amp;= e\|y++\|y--\|&amp;y\)
*if ( \(x == NULL\|IS_ERR(x)\|y != 0\) )
 { ... when forall
   return ...; }
// &lt;/smpl&gt;

Signed-off-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>regulator: s5m8767: Prevent possible NULL pointer dereference</title>
<updated>2013-02-13T12:52:19+00:00</updated>
<author>
<name>Axel Lin</name>
<email>axel.lin@ingics.com</email>
</author>
<published>2013-02-13T01:31:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e81d7bc89c9623ea000890fb4cdf7e731dc21f71'/>
<id>e81d7bc89c9623ea000890fb4cdf7e731dc21f71</id>
<content type='text'>
s5m8767_pmic_dt_parse_pdata dereferenes pdata, thus check pdata earlier to
avoid NULL pointer dereference.

Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
s5m8767_pmic_dt_parse_pdata dereferenes pdata, thus check pdata earlier to
avoid NULL pointer dereference.

Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>regulator: s5m8767: Fix dev argument for devm_kzalloc and of_get_regulator_init_data</title>
<updated>2013-02-13T12:52:18+00:00</updated>
<author>
<name>Axel Lin</name>
<email>axel.lin@ingics.com</email>
</author>
<published>2013-02-13T01:29:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=cbb0ed495ca165a94d66610adf64961f2117ec36'/>
<id>cbb0ed495ca165a94d66610adf64961f2117ec36</id>
<content type='text'>
Use &amp;pdev-&gt;dev rather than iodev-&gt;dev for devm_kzalloc() and
of_get_regulator_init_data(), this fixes memory leak.

Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use &amp;pdev-&gt;dev rather than iodev-&gt;dev for devm_kzalloc() and
of_get_regulator_init_data(), this fixes memory leak.

Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>regulator: s5m8767: Use of_get_child_count()</title>
<updated>2013-02-08T11:16:40+00:00</updated>
<author>
<name>Axel Lin</name>
<email>axel.lin@ingics.com</email>
</author>
<published>2013-02-06T02:55:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1f91b6f6c747d3c584a5f37f68f5417bd328d745'/>
<id>1f91b6f6c747d3c584a5f37f68f5417bd328d745</id>
<content type='text'>
Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>regulator: add device tree support for s5m8767</title>
<updated>2013-02-04T10:31:31+00:00</updated>
<author>
<name>Amit Daniel Kachhap</name>
<email>amit.daniel@samsung.com</email>
</author>
<published>2013-02-03T23:49:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=26aec009f6b61c077c6de1a96cca7a5132851dbe'/>
<id>26aec009f6b61c077c6de1a96cca7a5132851dbe</id>
<content type='text'>
This device tree support is added for PMIC block of S5m8767 multi
function driver. The usage detail is added in the device tree
documentation section. This change is tested on exynos5250 based
arndale platform by regulator voltage set/get API's.

Reviewed-by: Thomas Abraham &lt;thomas.abraham@linaro.org&gt;
Signed-off-by: Amit Daniel Kachhap &lt;amit.daniel@samsung.com&gt;
Tested-by: Sachin Kamat &lt;sachin.kamat@linaro.org&gt;
Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This device tree support is added for PMIC block of S5m8767 multi
function driver. The usage detail is added in the device tree
documentation section. This change is tested on exynos5250 based
arndale platform by regulator voltage set/get API's.

Reviewed-by: Thomas Abraham &lt;thomas.abraham@linaro.org&gt;
Signed-off-by: Amit Daniel Kachhap &lt;amit.daniel@samsung.com&gt;
Tested-by: Sachin Kamat &lt;sachin.kamat@linaro.org&gt;
Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>regulator: s5m8767: Convert to regulator_[get|set]_voltage_sel_regmap</title>
<updated>2013-01-18T06:26:19+00:00</updated>
<author>
<name>Axel Lin</name>
<email>axel.lin@ingics.com</email>
</author>
<published>2013-01-18T01:55:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=31a932e1079d771df6c2daf0b8a871b9b34d7e83'/>
<id>31a932e1079d771df6c2daf0b8a871b9b34d7e83</id>
<content type='text'>
Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>regulator: s5m8767: Remove max_vol parameter from s5m8767_convert_voltage_to_sel</title>
<updated>2013-01-17T07:12:22+00:00</updated>
<author>
<name>Axel Lin</name>
<email>axel.lin@ingics.com</email>
</author>
<published>2012-12-29T01:38:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=854f73ecb5c207007f9e850abd6f82ab89eaefb7'/>
<id>854f73ecb5c207007f9e850abd6f82ab89eaefb7</id>
<content type='text'>
It looks pointless to pass max_vol to s5m8767_convert_voltage_to_sel().
Compare selected voltage to desc-&gt;max is enough to ensure selected voltage
is in supported range.

Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It looks pointless to pass max_vol to s5m8767_convert_voltage_to_sel().
Compare selected voltage to desc-&gt;max is enough to ensure selected voltage
is in supported range.

Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>regulator: s5m8767: Fix probe failure due to stack corruption</title>
<updated>2012-12-24T16:24:37+00:00</updated>
<author>
<name>Inderpal Singh</name>
<email>inderpal.singh@linaro.org</email>
</author>
<published>2012-12-12T03:27:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3ef303988cfcb35922f550892cf476e861377f0b'/>
<id>3ef303988cfcb35922f550892cf476e861377f0b</id>
<content type='text'>
The function sec_reg_read invokes regmap_read which expects unsigned int *
as the destination address. The existing driver is passing address of local
variable "val" which is u8. This causes the stack corruption and following
dump is observed during probe.

Hence change "val" from u8 to unsigned int.

Unable to handle kernel paging request at virtual address 02410020
pgd = c0004000
[02410020] *pgd=00000000
Internal error: Oops: 80000005 [#1] PREEMPT SMP ARM
Modules linked in:
CPU: 0    Not tainted  (3.6.0-00696-g98a28b18-dirty #27)
PC is at 0x2410020
LR is at _regulator_get_voltage+0x3c/0x70
pc : [&lt;02410020&gt;]    lr : [&lt;c02395d4&gt;]    psr: 20000013
sp : cf839b68  ip : 00000000  fp : cf92d410
r10: 0000cfd0  r9 : c06d9878  r8 : 0000f0a0
r7 : cf839b70  r6 : cf92d400  r5 : 00000011  r4 : cf000000
r3 : 02410020  r2 : 00000000  r1 : 00000048  r0 : cf000000
Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
...........................
.................................

[&lt;c02395d4&gt;] (_regulator_get_voltage+0x3c/0x70) from [&lt;c023ad80&gt;] (print_constraints+0x50/0x36c)
[&lt;c023ad80&gt;] (print_constraints+0x50/0x36c) from [&lt;c023e504&gt;] (set_machine_constraints+0xe8/0x2b0)
[&lt;c023e504&gt;] (set_machine_constraints+0xe8/0x2b0) from [&lt;c023e9c8&gt;] (regulator_register+0x2fc/0x604)
[&lt;c023e9c8&gt;] (regulator_register+0x2fc/0x604) from [&lt;c049d628&gt;] (s5m8767_pmic_probe+0x688/0x718)
[&lt;c049d628&gt;] (s5m8767_pmic_probe+0x688/0x718) from [&lt;c029915c&gt;] (platform_drv_probe+0x18/0x1c)
[&lt;c029915c&gt;] (platform_drv_probe+0x18/0x1c) from [&lt;c0297dd0&gt;] (really_probe+0x68/0x1f4)
[&lt;c0297dd0&gt;] (really_probe+0x68/0x1f4) from [&lt;c0298070&gt;] (driver_probe_device+0x30/0x48)

Signed-off-by: Inderpal Singh &lt;inderpal.singh@linaro.org&gt;
Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The function sec_reg_read invokes regmap_read which expects unsigned int *
as the destination address. The existing driver is passing address of local
variable "val" which is u8. This causes the stack corruption and following
dump is observed during probe.

Hence change "val" from u8 to unsigned int.

Unable to handle kernel paging request at virtual address 02410020
pgd = c0004000
[02410020] *pgd=00000000
Internal error: Oops: 80000005 [#1] PREEMPT SMP ARM
Modules linked in:
CPU: 0    Not tainted  (3.6.0-00696-g98a28b18-dirty #27)
PC is at 0x2410020
LR is at _regulator_get_voltage+0x3c/0x70
pc : [&lt;02410020&gt;]    lr : [&lt;c02395d4&gt;]    psr: 20000013
sp : cf839b68  ip : 00000000  fp : cf92d410
r10: 0000cfd0  r9 : c06d9878  r8 : 0000f0a0
r7 : cf839b70  r6 : cf92d400  r5 : 00000011  r4 : cf000000
r3 : 02410020  r2 : 00000000  r1 : 00000048  r0 : cf000000
Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
...........................
.................................

[&lt;c02395d4&gt;] (_regulator_get_voltage+0x3c/0x70) from [&lt;c023ad80&gt;] (print_constraints+0x50/0x36c)
[&lt;c023ad80&gt;] (print_constraints+0x50/0x36c) from [&lt;c023e504&gt;] (set_machine_constraints+0xe8/0x2b0)
[&lt;c023e504&gt;] (set_machine_constraints+0xe8/0x2b0) from [&lt;c023e9c8&gt;] (regulator_register+0x2fc/0x604)
[&lt;c023e9c8&gt;] (regulator_register+0x2fc/0x604) from [&lt;c049d628&gt;] (s5m8767_pmic_probe+0x688/0x718)
[&lt;c049d628&gt;] (s5m8767_pmic_probe+0x688/0x718) from [&lt;c029915c&gt;] (platform_drv_probe+0x18/0x1c)
[&lt;c029915c&gt;] (platform_drv_probe+0x18/0x1c) from [&lt;c0297dd0&gt;] (really_probe+0x68/0x1f4)
[&lt;c0297dd0&gt;] (really_probe+0x68/0x1f4) from [&lt;c0298070&gt;] (driver_probe_device+0x30/0x48)

Signed-off-by: Inderpal Singh &lt;inderpal.singh@linaro.org&gt;
Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
