<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/regulator/core.c, branch v3.5.7</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>regulator: Fix recursive mutex lockdep warning</title>
<updated>2012-07-03T19:25:58+00:00</updated>
<author>
<name>Stephen Boyd</name>
<email>sboyd@codeaurora.org</email>
</author>
<published>2012-07-03T02:21:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d92d95b6bf2722ffa0fefa7651c51bf336743dd7'/>
<id>d92d95b6bf2722ffa0fefa7651c51bf336743dd7</id>
<content type='text'>
A recursive lockdep warning occurs if you call
regulator_set_optimum_mode() on a regulator with a supply because
there is no nesting annotation for the rdev-&gt;mutex. To avoid this
warning, get the supply's load before locking the regulator's
mutex to avoid grabbing the same class of lock twice.

=============================================
[ INFO: possible recursive locking detected ]
3.4.0 #3257 Tainted: G        W
---------------------------------------------
swapper/0/1 is trying to acquire lock:
 (&amp;rdev-&gt;mutex){+.+.+.}, at: [&lt;c036e9e0&gt;] regulator_get_voltage+0x18/0x38

but task is already holding lock:
 (&amp;rdev-&gt;mutex){+.+.+.}, at: [&lt;c036ef38&gt;] regulator_set_optimum_mode+0x24/0x224

other info that might help us debug this:
 Possible unsafe locking scenario:

       CPU0
       ----
  lock(&amp;rdev-&gt;mutex);
  lock(&amp;rdev-&gt;mutex);

 *** DEADLOCK ***

 May be due to missing lock nesting notation

3 locks held by swapper/0/1:
 #0:  (&amp;__lockdep_no_validate__){......}, at: [&lt;c03dbb48&gt;] __driver_attach+0x40/0x8c
 #1:  (&amp;__lockdep_no_validate__){......}, at: [&lt;c03dbb58&gt;] __driver_attach+0x50/0x8c
 #2:  (&amp;rdev-&gt;mutex){+.+.+.}, at: [&lt;c036ef38&gt;] regulator_set_optimum_mode+0x24/0x224

stack backtrace:
[&lt;c001521c&gt;] (unwind_backtrace+0x0/0x12c) from [&lt;c00cc4d4&gt;] (validate_chain+0x760/0x1080)
[&lt;c00cc4d4&gt;] (validate_chain+0x760/0x1080) from [&lt;c00cd744&gt;] (__lock_acquire+0x950/0xa10)
[&lt;c00cd744&gt;] (__lock_acquire+0x950/0xa10) from [&lt;c00cd990&gt;] (lock_acquire+0x18c/0x1e8)
[&lt;c00cd990&gt;] (lock_acquire+0x18c/0x1e8) from [&lt;c080c248&gt;] (mutex_lock_nested+0x68/0x3c4)
[&lt;c080c248&gt;] (mutex_lock_nested+0x68/0x3c4) from [&lt;c036e9e0&gt;] (regulator_get_voltage+0x18/0x38)
[&lt;c036e9e0&gt;] (regulator_get_voltage+0x18/0x38) from [&lt;c036efb8&gt;] (regulator_set_optimum_mode+0xa4/0x224)
...

Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.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>
A recursive lockdep warning occurs if you call
regulator_set_optimum_mode() on a regulator with a supply because
there is no nesting annotation for the rdev-&gt;mutex. To avoid this
warning, get the supply's load before locking the regulator's
mutex to avoid grabbing the same class of lock twice.

=============================================
[ INFO: possible recursive locking detected ]
3.4.0 #3257 Tainted: G        W
---------------------------------------------
swapper/0/1 is trying to acquire lock:
 (&amp;rdev-&gt;mutex){+.+.+.}, at: [&lt;c036e9e0&gt;] regulator_get_voltage+0x18/0x38

but task is already holding lock:
 (&amp;rdev-&gt;mutex){+.+.+.}, at: [&lt;c036ef38&gt;] regulator_set_optimum_mode+0x24/0x224

other info that might help us debug this:
 Possible unsafe locking scenario:

       CPU0
       ----
  lock(&amp;rdev-&gt;mutex);
  lock(&amp;rdev-&gt;mutex);

 *** DEADLOCK ***

 May be due to missing lock nesting notation

3 locks held by swapper/0/1:
 #0:  (&amp;__lockdep_no_validate__){......}, at: [&lt;c03dbb48&gt;] __driver_attach+0x40/0x8c
 #1:  (&amp;__lockdep_no_validate__){......}, at: [&lt;c03dbb58&gt;] __driver_attach+0x50/0x8c
 #2:  (&amp;rdev-&gt;mutex){+.+.+.}, at: [&lt;c036ef38&gt;] regulator_set_optimum_mode+0x24/0x224

stack backtrace:
[&lt;c001521c&gt;] (unwind_backtrace+0x0/0x12c) from [&lt;c00cc4d4&gt;] (validate_chain+0x760/0x1080)
[&lt;c00cc4d4&gt;] (validate_chain+0x760/0x1080) from [&lt;c00cd744&gt;] (__lock_acquire+0x950/0xa10)
[&lt;c00cd744&gt;] (__lock_acquire+0x950/0xa10) from [&lt;c00cd990&gt;] (lock_acquire+0x18c/0x1e8)
[&lt;c00cd990&gt;] (lock_acquire+0x18c/0x1e8) from [&lt;c080c248&gt;] (mutex_lock_nested+0x68/0x3c4)
[&lt;c080c248&gt;] (mutex_lock_nested+0x68/0x3c4) from [&lt;c036e9e0&gt;] (regulator_get_voltage+0x18/0x38)
[&lt;c036e9e0&gt;] (regulator_get_voltage+0x18/0x38) from [&lt;c036efb8&gt;] (regulator_set_optimum_mode+0xa4/0x224)
...

Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>regulator: core: Properly handle the case min_uV &lt; rdev-&gt;desc-&gt;min_uV in map_voltage_linear</title>
<updated>2012-06-07T23:15:55+00:00</updated>
<author>
<name>Axel Lin</name>
<email>axel.lin@gmail.com</email>
</author>
<published>2012-06-07T01:52:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0bdc81e4e944781a2bcc971f9e3cf24ac7030939'/>
<id>0bdc81e4e944781a2bcc971f9e3cf24ac7030939</id>
<content type='text'>
Properly handle the case if the specified min_uV is less than the voltage given
by the lowest selector.

Signed-off-by: Axel Lin &lt;axel.lin@gmail.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>
Properly handle the case if the specified min_uV is less than the voltage given
by the lowest selector.

Signed-off-by: Axel Lin &lt;axel.lin@gmail.com&gt;
Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'regulator-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator</title>
<updated>2012-05-21T23:49:16+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-05-21T23:49:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ac1806572df55b6125ad9d117906820dacfa3145'/>
<id>ac1806572df55b6125ad9d117906820dacfa3145</id>
<content type='text'>
Pull regulator updates from Mark Brown:
 "The major thing here is the addition of some helpers to factor code
  out of drivers, making a fair proportion of regulators much more just
  data rather than code which is nice.

  - Helpers in the core for regulators using regmap, providing generic
    implementations of the enable and voltage selection operations which
    just need data to describe them in the drivers.
  - Split out voltage mapping and voltage setting, allowing many more
    drivers to take advantage of the infrastructure for selectors.
  - Loads and loads of cleanups from Axel Lin once again, including many
    changes to take advantage of the above new framework features
  - New drivers for Ricoh RC5T583, TI TPS62362, TI TPS62363, TI
    TPS65913, TI TWL6035 and TI TWL6037.

  Some of the registration changes to support the core refactoring
  caused so many conflicts that eventually topic branches were abandoned
  for this release."

* tag 'regulator-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (227 commits)
  regulator: tps65910: use of_node of matched regulator being register
  regulator: tps65910: dt: support when "regulators" node found
  regulator: tps65910: add error message in case of failure
  regulator: tps62360: dt: initialize of_node param for regulator register.
  regulator: tps65910: use devm_* for memory allocation
  regulator: tps65910: use small letter for regulator names
  mfd: tpx6586x:  Depend on regulator
  regulator: regulator for Palmas Kconfig
  regulator: regulator driver for Palmas series chips
  regulator: Enable Device Tree for the db8500-prcmu regulator driver
  regulator: db8500-prcmu: Separate regulator registration from probe
  regulator: ab3100: Use regulator_map_voltage_iterate()
  regulator: tps65217: Convert to set_voltage_sel and map_voltage
  regulator: Enable the ab8500 for Device Tree
  regulator: ab8500: Split up probe() into manageable pieces
  regulator: max8925: Remove check_range function and max_uV from struct rc5t583_regulator_info
  regulator: max8649: Remove unused check_range() function
  regulator: rc5t583: Remove max_uV from struct rc5t583_regulator_info
  regulator: da9052: Convert to set_voltage_sel and map_voltage
  regulator: max8952: Use devm_kzalloc
  ...
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull regulator updates from Mark Brown:
 "The major thing here is the addition of some helpers to factor code
  out of drivers, making a fair proportion of regulators much more just
  data rather than code which is nice.

  - Helpers in the core for regulators using regmap, providing generic
    implementations of the enable and voltage selection operations which
    just need data to describe them in the drivers.
  - Split out voltage mapping and voltage setting, allowing many more
    drivers to take advantage of the infrastructure for selectors.
  - Loads and loads of cleanups from Axel Lin once again, including many
    changes to take advantage of the above new framework features
  - New drivers for Ricoh RC5T583, TI TPS62362, TI TPS62363, TI
    TPS65913, TI TWL6035 and TI TWL6037.

  Some of the registration changes to support the core refactoring
  caused so many conflicts that eventually topic branches were abandoned
  for this release."

* tag 'regulator-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (227 commits)
  regulator: tps65910: use of_node of matched regulator being register
  regulator: tps65910: dt: support when "regulators" node found
  regulator: tps65910: add error message in case of failure
  regulator: tps62360: dt: initialize of_node param for regulator register.
  regulator: tps65910: use devm_* for memory allocation
  regulator: tps65910: use small letter for regulator names
  mfd: tpx6586x:  Depend on regulator
  regulator: regulator for Palmas Kconfig
  regulator: regulator driver for Palmas series chips
  regulator: Enable Device Tree for the db8500-prcmu regulator driver
  regulator: db8500-prcmu: Separate regulator registration from probe
  regulator: ab3100: Use regulator_map_voltage_iterate()
  regulator: tps65217: Convert to set_voltage_sel and map_voltage
  regulator: Enable the ab8500 for Device Tree
  regulator: ab8500: Split up probe() into manageable pieces
  regulator: max8925: Remove check_range function and max_uV from struct rc5t583_regulator_info
  regulator: max8649: Remove unused check_range() function
  regulator: rc5t583: Remove max_uV from struct rc5t583_regulator_info
  regulator: da9052: Convert to set_voltage_sel and map_voltage
  regulator: max8952: Use devm_kzalloc
  ...
</pre>
</div>
</content>
</entry>
<entry>
<title>regulator: core: Don't open code _regulator_is_enabled()</title>
<updated>2012-05-14T14:25:19+00:00</updated>
<author>
<name>Mark Brown</name>
<email>broonie@opensource.wolfsonmicro.com</email>
</author>
<published>2012-05-13T23:40:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b1a868310e7024650918119d292129446b2f8336'/>
<id>b1a868310e7024650918119d292129446b2f8336</id>
<content type='text'>
Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
Acked-by: Liam Girdwood &lt;lrg@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
Acked-by: Liam Girdwood &lt;lrg@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>regulator: core: Release regulator-regulator supplies on error</title>
<updated>2012-05-14T08:31:35+00:00</updated>
<author>
<name>Mark Brown</name>
<email>broonie@opensource.wolfsonmicro.com</email>
</author>
<published>2012-05-13T17:35:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e81dba85c6388dfabcb76cbc2b8bd02836a53ae5'/>
<id>e81dba85c6388dfabcb76cbc2b8bd02836a53ae5</id>
<content type='text'>
If we fail while registering a regulator make sure we release the supply
for the regulator if there is one.

Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
Acked-by: Liam Girdwood &lt;lrg@ti.com&gt;
Cc: stable@vger.kernel.org
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If we fail while registering a regulator make sure we release the supply
for the regulator if there is one.

Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
Acked-by: Liam Girdwood &lt;lrg@ti.com&gt;
Cc: stable@vger.kernel.org
</pre>
</div>
</content>
</entry>
<entry>
<title>regulator: core: Ensure simple linear voltage mappings falls within the specified range</title>
<updated>2012-05-14T08:11:34+00:00</updated>
<author>
<name>Axel Lin</name>
<email>axel.lin@gmail.com</email>
</author>
<published>2012-05-14T02:33:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ccfcb1c3cf5616ebd9c61e6c834af3b87fe6b7f7'/>
<id>ccfcb1c3cf5616ebd9c61e6c834af3b87fe6b7f7</id>
<content type='text'>
Integer division may truncate the result.
Use DIV_ROUND_UP to ensure simple linear voltage mappings falls within the
specified range.

Signed-off-by: Axel Lin &lt;axel.lin@gmail.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>
Integer division may truncate the result.
Use DIV_ROUND_UP to ensure simple linear voltage mappings falls within the
specified range.

Signed-off-by: Axel Lin &lt;axel.lin@gmail.com&gt;
Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>regulator: core: Allow drivers to set simple linear voltage maps as data</title>
<updated>2012-05-12T10:11:32+00:00</updated>
<author>
<name>Mark Brown</name>
<email>broonie@opensource.wolfsonmicro.com</email>
</author>
<published>2012-05-09T20:38:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=bca7bbfff37808d56355bbcf0ceec34f0cc6c85d'/>
<id>bca7bbfff37808d56355bbcf0ceec34f0cc6c85d</id>
<content type='text'>
A lot of regulator hardware maps selectors on to voltages with a simple
linear mapping function

    selector = base + (selector * step size)

Provide off the shelf list_voltage() and map_voltage() operations which
use new min_uV and uV_step members in the regulator_desc to implement
this function.

Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
Acked-by: Liam Girdwood &lt;lrg@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A lot of regulator hardware maps selectors on to voltages with a simple
linear mapping function

    selector = base + (selector * step size)

Provide off the shelf list_voltage() and map_voltage() operations which
use new min_uV and uV_step members in the regulator_desc to implement
this function.

Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
Acked-by: Liam Girdwood &lt;lrg@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>regulator: core: Allow regulators to provide a voltage to selector mapping</title>
<updated>2012-05-12T10:11:23+00:00</updated>
<author>
<name>Mark Brown</name>
<email>broonie@opensource.wolfsonmicro.com</email>
</author>
<published>2012-05-09T20:16:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e843fc4616485bbd8b5a115f5bd4f73808656373'/>
<id>e843fc4616485bbd8b5a115f5bd4f73808656373</id>
<content type='text'>
In order to allow more drivers to factor things out into data allow
drivers to provide a mapping function to convert voltages into selectors.
This allows any driver to use set_voltage_sel(). The existing mapping
based on iterating over list_voltage() is provided as an operation which
can be assigned to the new map_voltage() function though for ease of
transition it is treated as the default.

Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
Acked-by: Liam Girdwood &lt;lrg@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In order to allow more drivers to factor things out into data allow
drivers to provide a mapping function to convert voltages into selectors.
This allows any driver to use set_voltage_sel(). The existing mapping
based on iterating over list_voltage() is provided as an operation which
can be assigned to the new map_voltage() function though for ease of
transition it is treated as the default.

Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
Acked-by: Liam Girdwood &lt;lrg@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge remote-tracking branches 'regulator/topic/core', 'regulator/topic/regmap' and 'regulator/topic/register' into regulator-next</title>
<updated>2012-05-12T10:09:47+00:00</updated>
<author>
<name>Mark Brown</name>
<email>broonie@opensource.wolfsonmicro.com</email>
</author>
<published>2012-05-12T10:09:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=178e43aef2979525d7864daefd9499614e13800e'/>
<id>178e43aef2979525d7864daefd9499614e13800e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>regulator: core: Warn on missing struct device</title>
<updated>2012-05-10T09:48:37+00:00</updated>
<author>
<name>Mark Brown</name>
<email>broonie@opensource.wolfsonmicro.com</email>
</author>
<published>2012-05-08T17:09:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=dcf701125eefea6baf72753533cb8b60fb0e3934'/>
<id>dcf701125eefea6baf72753533cb8b60fb0e3934</id>
<content type='text'>
The core really wants a struct device to be supplied for regulators and
there's no reason this should be impossible so provide one so complain
if we didn't get one.

Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
Acked-by: Liam Girdwood &lt;lrg@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The core really wants a struct device to be supplied for regulators and
there's no reason this should be impossible so provide one so complain
if we didn't get one.

Signed-off-by: Mark Brown &lt;broonie@opensource.wolfsonmicro.com&gt;
Acked-by: Liam Girdwood &lt;lrg@ti.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
