regulator: output current-limit for all regulators in summary
authorHeiko Stübner <heiko@sntech.de>
Fri, 10 Apr 2015 11:48:41 +0000 (13:48 +0200)
committerMark Brown <broonie@kernel.org>
Fri, 10 Apr 2015 14:46:32 +0000 (15:46 +0100)
commit23296099e70854a272fc369bab8ddcc57f27f97a
tree95e08253259c31d5e75598a9a4eb815cd6b05b07
parent7c225ec90c368a474daa9803922f4b7d6fe6d5c8
regulator: output current-limit for all regulators in summary

Voltage regulators can have (unregulated) current limits too, so we should
probably output both voltage and current for all regulators.

Holding the rdev->mutex actually conflicts with _regulator_get_current_limit
but also is not really necessary, as the global regulator_list_mutex already
protects us from the regulator vanishing while we go through the list.

On the rk3288-firefly the summary now looks like:

 regulator                      use open bypass voltage current     min     max
-------------------------------------------------------------------------------
 vcc_sys                          0   12      0  5000mV     0mA  5000mV  5000mV
    vcc_lan                       1    1      0  3300mV     0mA  3300mV  3300mV
       ff290000.ethernet                                            0mV     0mV
    vcca_33                       0    0      0  3300mV     0mA  3300mV  3300mV
    vcca_18                       0    0      0  1800mV     0mA  1800mV  1800mV
    vdd10_lcd                     0    0      0  1000mV     0mA  1000mV  1000mV
 [...]

Suggested-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/core.c