08 Sep, 2020
1 commit
-
regulator_notifier_call_chain() doesn't need rdev lock and rdev's
existence is assumed in the code anyway. Remove the locks from drivers.Signed-off-by: Michał Mirosław
Acked-by: Adam Thomson
Reviewed-by: Dmitry Osipenko
Link: https://lore.kernel.org/r/42393f66dcc4d80dcd9797be45216b4035aa96cb.1597032945.git.mirq-linux@rere.qmqm.pl
Signed-off-by: Mark Brown
26 Jun, 2020
1 commit
-
Kerneldoc expects function arguments to be in the format '@.*:'. If
this format is not followed the kerneldoc tooling/parsers/validators
get confused.Fixes the following W=1 warning(s):
drivers/regulator/wm8350-regulator.c:1234: warning: Function parameter or member 'wm8350' not described in 'wm8350_register_led'
drivers/regulator/wm8350-regulator.c:1234: warning: Function parameter or member 'lednum' not described in 'wm8350_register_led'
drivers/regulator/wm8350-regulator.c:1234: warning: Function parameter or member 'dcdc' not described in 'wm8350_register_led'
drivers/regulator/wm8350-regulator.c:1234: warning: Function parameter or member 'isink' not described in 'wm8350_register_led'
drivers/regulator/wm8350-regulator.c:1234: warning: Function parameter or member 'pdata' not described in 'wm8350_register_led'Signed-off-by: Lee Jones
Link: https://lore.kernel.org/r/20200625163614.4001403-7-lee.jones@linaro.org
Signed-off-by: Mark Brown
09 May, 2020
1 commit
-
Change the regulator helpers to use common linear_ranges code.
Signed-off-by: Matti Vaittinen
Reviewed-by: Mark Brown
Acked-by: Charles Keepax
Acked-by: Adam Thomson
Link: https://lore.kernel.org/r/64f01d5e381b8631a271616b7790f9d5640974fb.1588944082.git.matti.vaittinen@fi.rohmeurope.com
Signed-off-by: Mark Brown
18 Apr, 2019
1 commit
-
Signed-off-by: Axel Lin
Signed-off-by: Mark Brown
13 Mar, 2019
2 commits
-
Use regulator_set/get_current_limit_regmap helpers to save some code.
Signed-off-by: Axel Lin
Acked-by: Charles Keepax
Signed-off-by: Mark Brown -
.set_current_limit callback should select the current closest to max_uA.
Signed-off-by: Axel Lin
Acked-by: Charles Keepax
Signed-off-by: Mark Brown
19 Nov, 2018
1 commit
-
Wait/wound mutex shall be used in order to avoid lockups on locking of
coupled regulators.Signed-off-by: Dmitry Osipenko
Suggested-by: Lucas Stach
Signed-off-by: Mark Brown
23 Apr, 2018
1 commit
-
It seems that the loop index i is not being incremented and hence
potentially the while loop could spin forever. Fortunately with the
data being used this does not appear to happen at the moment.Signed-off-by: Colin Ian King
Acked-by: Charles Keepax
Signed-off-by: Mark Brown
23 Dec, 2015
1 commit
-
The regulator_ops structures are never modified, so declare them as const.
Done with the help of Coccinelle.
Signed-off-by: Julia Lawall
Acked-by: Charles Keepax
Signed-off-by: Mark Brown
06 Mar, 2015
1 commit
-
Commit 8f45acb5f9f34eab ("regulator: wm8350: Pass NULL data with REGULATION_OUT
and UNDER_VOLTAGE events") introduced the following build warning:drivers/regulator/wm8350-regulator.c: In function 'pmic_uv_handler':
drivers/regulator/wm8350-regulator.c:1154:17: warning: unused variable 'wm8350' [-Wunused-variable]Remove 'wm8350' as it is unused now.
Signed-off-by: Fabio Estevam
Acked-by: Geert Uytterhoeven
Signed-off-by: Mark Brown
24 Feb, 2015
1 commit
-
According to the documentation, no data is passed with the
REGULATION_OUT and UNDER_VOLTAGE regulator notifier events.Signed-off-by: Geert Uytterhoeven
Signed-off-by: Mark Brown
19 Feb, 2014
1 commit
-
Propagate the error value returned by the function instead.
Signed-off-by: Sachin Kamat
Signed-off-by: Mark Brown
24 Oct, 2013
2 commits
11 Oct, 2013
2 commits
-
Add REGULATOR_LINEAR_RANGE macro and convert regulator drivers to use it.
Signed-off-by: Axel Lin
Signed-off-by: Mark Brown -
linear ranges means each range has linear voltage settings.
So we can calculate max_uV for each linear range in regulator core rather than
set the max_uV field in drivers.Signed-off-by: Axel Lin
Signed-off-by: Mark Brown
19 Sep, 2013
1 commit
-
As per datasheet, voltage range for LDOs are as follows:
0000 = 0.9V
...(50mV steps)
01111 = 1.65V
10000 = 1.8V
... (100mV stepns)
11111 = 3.3VSo, there is no selector for 1.65V to 1.8V.
Correcting the range for max_uV for selector between 0 to 15.Signed-off-by: Laxman Dewangan
Signed-off-by: Mark Brown
17 Sep, 2013
1 commit
-
Signed-off-by: Mark Brown
30 Jul, 2013
1 commit
-
Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly.Signed-off-by: Jingoo Han
Signed-off-by: Mark Brown
15 Jul, 2013
1 commit
-
Signed-off-by: Mark Brown
18 Jun, 2012
2 commits
-
Reuse map_voltage() to get the selector of a given uV.
Then we can remove wm8350_ldo_mvolts_to_val() and wm8350_dcdc_mvolts_to_val().
Also remove unused wm8350_dcdc_val_to_mvolts() function.Signed-off-by: Axel Lin
Signed-off-by: Mark Brown -
Call wm8350_ldo_list_voltage() instead of open code to verify selected voltage
falls within specified range.
Use wm8350_ldo_list_voltage() here is less error prone.wm8350_ldo_val_to_mvolts() is only used in wm8350_ldo_list_voltage now, so
remove it and move the implementation to wm8350_ldo_list_voltage().This patch also include below small changes in wm8350_ldo_map_voltage:
1. wm8350_ldo_map_voltage() returns selector, thus rename variable mV to sel.
2. Use DIV_ROUND_UP macro to calculate selector.Signed-off-by: Axel Lin
Signed-off-by: Mark Brown
13 Jun, 2012
1 commit
-
Signed-off-by: Axel Lin
Signed-off-by: Mark Brown
04 Jun, 2012
2 commits
-
Since there are two linear ranges for the LDO voltages provide a voltage
mapping function and then use regulator_set_voltage_sel_regmap().Signed-off-by: Mark Brown
-
wm8350_dcdc_ops uses simple linear voltage maps.
Thus use regulator_map_voltage_linear is more efficient than using the default
regulator_map_voltage_iterate.Signed-off-by: Axel Lin
Signed-off-by: Mark Brown
03 Jun, 2012
3 commits
-
The WM8350 DCDCs have a simple linear mapping from selectors to voltages
so can be converted very simply to use the new infrastructure for a nice
reduction in code size.Signed-off-by: Mark Brown
-
Signed-off-by: Mark Brown
-
Signed-off-by: Mark Brown
10 Apr, 2012
1 commit
-
Linux 3.4-rc2 contains some fixes that further patches depend upon.
09 Apr, 2012
1 commit
-
Rather than adding new arguments to regulator_register() every time we
want to add a new bit of dynamic information at runtime change the function
to take these via a struct. By doing this we avoid needing to do further
changes like the recent addition of device tree support which required each
regulator driver to be updated to take an additional parameter.The regulator_desc which should (mostly) be static data is still passed
separately as most drivers are able to configure this statically at build
time.Signed-off-by: Mark Brown
04 Apr, 2012
1 commit
-
Signed-off-by: Mark Brown
29 Mar, 2012
1 commit
-
What we want is to disable output by setting [LDOx|DCx]_HIB_MODE bits.
Current code also clears other bits in LDOx/DCDCx Low Power register.R202 (CAh) LDO1 Low Power
BIT[13:12] LDO1 Hibernate behaviour:
00 = Select voltage image settings
01 = disable output
10 = reserved
11 = reservedR182 (B6h) DCDC1 Low Power
BIT[14:12] DC-DC1 Hibernate behaviour:
000 = Use current settings (no change)
001 = Select voltage image settings
010 = Force standby mode
011 = Force standby mode and voltage image settings.
100 = Force LDO mode
101 = Force LDO mode and voltage image settings.
110 = Reserved.
111 = Disable outputSigned-off-by: Axel Lin
Signed-off-by: Mark Brown
28 Mar, 2012
2 commits
-
The values in isink_cur array are microamps.
The regulator core expects get_current_limit callback to return microamps.Signed-off-by: Axel Lin
Signed-off-by: Mark Brown -
Current implementation in get_isink_val actually choose the biggest current
limit setting falls within the specified range.
What we want is to choose the smallest current limit setting falls within the
specified range. Fix it.Signed-off-by: Axel Lin
Signed-off-by: Mark Brown
27 Mar, 2012
2 commits
-
DC[2|5]_HIB_MODE is BIT 12 of DCDC[2|5] Control register.
WM8350_DC2_HIB_MODE_ACTIVE/WM8350_DC2_HIB_MODE_DISABLE are defined as 1/0.
Thus we need to left shift WM8350_DC2_HIB_MODE_SHIFT bits.Signed-off-by: Axel Lin
Signed-off-by: Mark Brown -
What we want is to restore wm8350->pmic.dcdcx_hib_mode settings to
WM8350_DCDCx_LOW_POWER registers. Current code also clears all other
bits of WM8350_DCDCx_LOW_POWER registers which is wrong.Signed-off-by: Axel Lin
Signed-off-by: Mark Brown
12 Mar, 2012
1 commit
-
DIV_ROUND_CLOSEST performs the computation (x + d/2)/d with better readability.
Signed-off-by: Axel Lin
Signed-off-by: Mark Brown
02 Feb, 2012
1 commit
-
Very, very deprecated.
Signed-off-by: Mark Brown
24 Nov, 2011
1 commit
-
With device tree support for regulators, its needed that the
regulator_dev->dev device has the right of_node attached.
To be able to do this add an additional parameter to the
regulator_register() api, wherein the dt-adapted driver can
then pass this additional info onto the regulator core.Signed-off-by: Rajendra Nayak
Signed-off-by: Mark Brown
12 Jan, 2011
1 commit
-
Signed-off-by: Mark Brown
Signed-off-by: Liam Girdwood