Use regulator core's simplified DT parsing code to simply the driver
implementation.
Signed-off-by: Axel Lin
---
drivers/regulator/hi6421-regulator.c | 208 ++-
1 file changed, 78 insertions(+), 130 deletions(-)
diff --git a/drivers/regulator/hi6421-regulator
: Axel Lin
---
drivers/regulator/anatop-regulator.c | 63
1 file changed, 27 insertions(+), 36 deletions(-)
diff --git a/drivers/regulator/anatop-regulator.c
b/drivers/regulator/anatop-regulator.c
index d9d8155ed8cb..754739d004e5 100644
--- a/drivers/regulator/anatop
The S2MPA01_REGULATOR_CNT is no longer used after converted to use
simplified DT parsing.
Signed-off-by: Axel Lin
---
drivers/regulator/s2mpa01.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/regulator/s2mpa01.c b/drivers/regulator/s2mpa01.c
index da11ac5c09f2..51f7e8b74d8c
The rdev->desc->enable_mask setting is always the same as
BIT(regulator->ctrl_mask), so just use rdev->desc->enable_mask instead.
Signed-off-by: Axel Lin
---
drivers/regulator/hi655x-regulator.c | 13 +++--
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/dr
The regulators array should never need to be modified, make it const so
compiler can put it to .rodata.
Signed-off-by: Axel Lin
---
drivers/regulator/hi655x-regulator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/hi655x-regulator.c
b/drivers/regulator
Use rdev_get_id() instead of directly access rdev->desc->id.
While at it also remove unneeded init for ramp_value variable.
Signed-off-by: Axel Lin
---
drivers/regulator/bd718x7-regulator.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/regulator/b
Use regulator core's simplified DT parsing code to simply the driver
implementation.
Signed-off-by: Axel Lin
---
drivers/regulator/s2mpa01.c | 39 ++---
1 file changed, 10 insertions(+), 29 deletions(-)
diff --git a/drivers/regulator/s2mpa01.c b/dr
These regulator_ops variables never need to be modified, make them const so
compiler can put them to .rodata.
Signed-off-by: Axel Lin
---
drivers/regulator/twl-regulator.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/regulator/twl-regulator.c
b/drivers
regmap_read() takes unsigned int reg and unsigned int *val arguments,
use proper data type for these arguments.
Signed-off-by: Axel Lin
---
drivers/regulator/lm363x-regulator.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/regulator/lm363x-regulator.c
b
The lm363x_boost_voltage_table_ops and lm363x_regulator_voltage_table_ops
never need to be modified, make them const so compiler can put them to
.rodata.
Signed-off-by: Axel Lin
---
drivers/regulator/lm363x-regulator.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a
Use regulator core's simplified DT parsing code to simply the driver
implementation.
Signed-off-by: Axel Lin
---
drivers/regulator/bcm590xx-regulator.c | 105 +
1 file changed, 2 insertions(+), 103 deletions(-)
diff --git a/drivers/regulator/bcm590xx-regulator
Signed-off-by: Axel Lin
---
drivers/regulator/vctrl-regulator.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/regulator/vctrl-regulator.c
b/drivers/regulator/vctrl-regulator.c
index 78de002037c7..259864520a06 100644
--- a/drivers/regulator/vctrl-regulator.c
Use regulator core's simplified DT parsing code to simply the driver
implementation.
Signed-off-by: Axel Lin
---
drivers/regulator/tps6507x-regulator.c | 107 +
1 file changed, 19 insertions(+), 88 deletions(-)
diff --git a/drivers/regulator/tps6507x-regulator
This driver is using devm_regulator_register so no need to save *rdev for
clean up.
Signed-off-by: Axel Lin
---
drivers/regulator/tps6507x-regulator.c | 4
1 file changed, 4 deletions(-)
diff --git a/drivers/regulator/tps6507x-regulator.c
b/drivers/regulator/tps6507x-regulator.c
index
The tps6507x_pmic_ops never need to be modified, make it const so compiler
can put it to .rodata.
Signed-off-by: Axel Lin
---
drivers/regulator/tps6507x-regulator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/tps6507x-regulator.c
b/drivers/regulator
> What do you mean you don't have a public git tree? Can't you create a
> gitlab account and just push the tree there? Alternatively, given the
> amount of patches you send, I doubt the kernel.org maintainers would
> refuse if you asked for an account.
Because using linux-next tree is good enough f
Bartosz Golaszewski 於 2019年3月27日 週三 下午9:08寫道:
>
> śr., 27 mar 2019 o 11:17 Axel Lin napisał(a):
> >
> > > Hi,
> > >
> > > what tree is this patch based on, because it doesn't apply on top of
> > > v5.1-rc2.
> > Hi Bart,
> > You
The struct rc5t583_regulator only has 2 members, the *rdev is no longer
used because this driver is using devm_regulator_register now. After remove
*rdev, only *reg_info left. We can use struct rc5t583_regulator_info
directly, so remove struct rc5t583_regulator.
Signed-off-by: Axel Lin
> Hi,
>
> what tree is this patch based on, because it doesn't apply on top of v5.1-rc2.
Hi Bart,
You can use linux-next or regulator tree.
However, due to build dependency you need to manually apply max77650
mfd drvier manually because it's not exist in these tree.
Alternatively, you can check
Add a local variable *desc to avoid too many change lines due to over 80
characters.
Signed-off-by: Axel Lin
---
drivers/regulator/as3722-regulator.c | 137 ---
1 file changed, 58 insertions(+), 79 deletions(-)
diff --git a/drivers/regulator/as3722-regulator.c
b
Use regulator_set/get_current_limit_regmap helpers to save some code.
Signed-off-by: Axel Lin
---
drivers/regulator/as3722-regulator.c | 212 ---
1 file changed, 60 insertions(+), 152 deletions(-)
diff --git a/drivers/regulator/as3722-regulator.c
b/drivers/regulator
The regulators array should never need to be modified, make it const so
compiler can put it to .rodata.
Signed-off-by: Axel Lin
---
drivers/regulator/sc2731-regulator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/sc2731-regulator.c
b/drivers/regulator
-by: Axel Lin
---
Hi Bartosz,
I don't have this h/w, please help to review and test this patch.
Thanks,
Axel
drivers/regulator/max77650-regulator.c | 134 +
1 file changed, 45 insertions(+), 89 deletions(-)
diff --git a/drivers/regulator/max77650-regulator.c
b/dr
This driver does not use any syscon APIs, so remove MFD_SYSCON dependency.
Select REGMAP_MMIO since this driver uses devm_regmap_init_mmio().
Signed-off-by: Axel Lin
---
drivers/regulator/Kconfig | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/regulator/Kconfig b
According to the datasheet the latest seletor 11 b = 3.3 V.
Signed-off-by: Axel Lin
---
drivers/regulator/tps65217-regulator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/tps65217-regulator.c
b/drivers/regulator/tps65217-regulator.c
index
These regulator_ops variables never need to be modified, make them const so
compiler can put them to .rodata.
Signed-off-by: Axel Lin
---
drivers/regulator/tps65217-regulator.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/regulator/tps65217-regulator.c
b
These regulator_ops variables never need to be modified, make them const so
compiler can put them to .rodata.
Signed-off-by: Axel Lin
---
drivers/regulator/tps65218-regulator.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/regulator/tps65218-regulator.c
b
Olliver Schinagl 於 2019年2月24日 週日 上午4:37寫道:
>
> On 23-02-2019 13:54, Axel Lin wrote:
> >> I will not disagree that it may be extra work to look up the define
> >> (especially if there is no tool tip or split view in the editor) but
> >> reading the whole lot of
Hi,
In drivers/regulator/rn5t618-regulator.c:
The RC5T619 LDO9 and LDO10 have the same .enable_reg and .enable_mask setting:
static const struct regulator_desc rc5t619_regulators[] = {
...
REG(LDO9, LDOEN2, BIT(0), LDO9DAC, 0x7f, 90, 350, 25000),
REG(LDO10, LDOEN2, B
The act8865_ops and act8865_ldo_ops never need to be modified,
make them const so compiler can put them to .rodata.
Signed-off-by: Axel Lin
---
drivers/regulator/act8865-regulator.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/regulator/act8865-regulator.c
b
ff-by: Axel Lin
---
drivers/regulator/act8865-regulator.c | 143 --
1 file changed, 19 insertions(+), 124 deletions(-)
diff --git a/drivers/regulator/act8865-regulator.c
b/drivers/regulator/act8865-regulator.c
index e0239cf3f56d..af8f201e67d7 100644
--- a/drivers/regulator/ac
The tps65132_regulator_ops and tps_regs_desc never need to be modified,
make them const so compiler can put them to .rodata.
Signed-off-by: Axel Lin
---
drivers/regulator/tps65132-regulator.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/regulator/tps65132
These fields are not really need, remove them.
Signed-off-by: Axel Lin
---
drivers/regulator/tps65132-regulator.c | 25 +++--
1 file changed, 11 insertions(+), 14 deletions(-)
diff --git a/drivers/regulator/tps65132-regulator.c
b/drivers/regulator/tps65132-regulator.c
1010 2.5 1110 3.3
0011 1.7 0111 2.1 1011 2.6 Not Used
Fixes: d2a2e729a666 ("regulator: tps65086: Add regulator driver for the
TPS65086 PMIC")
Signed-off-by: Axel Lin
Acked-by: Andrew F. Davis
---
This patch was sent on https://lkml.org/lkml/2019/3/
Axel Lin 於 2019年2月24日 週日 上午9:27寫道:
>
> Current code always set pmic->rinfo[id] = &max77620_regs_info[id];
> It should set to either max77620_regs_info or max20024_regs_info
> depends on the chip_id.
>
> Signed-off-by: Axel Lin
> ---
> drivers/regulator/max776
The regulator_desc never need to be modified, so define them as const as a
hint to the compiler that they can go into .rodata.
Signed-off-by: Axel Lin
---
drivers/regulator/rn5t618-regulator.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/regulator/rn5t618
Use regulator core's simplified DT parsing code to simply the driver
implementation.
Signed-off-by: Axel Lin
---
drivers/regulator/max8925-regulator.c | 76 ---
1 file changed, 9 insertions(+), 67 deletions(-)
diff --git a/drivers/regulator/max8925-regulator
Use regulator core's simplified DT parsing code to simply the driver
implementation.
Signed-off-by: Axel Lin
---
drivers/regulator/88pm8607.c | 43
1 file changed, 9 insertions(+), 34 deletions(-)
diff --git a/drivers/regulator/88pm8607.c b/dr
Use rdev_get_id() to simplify the code a bit.
Signed-off-by: Axel Lin
---
drivers/regulator/axp20x-regulator.c | 14 +-
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/drivers/regulator/axp20x-regulator.c
b/drivers/regulator/axp20x-regulator.c
index 8a366f66208e
rdev won't be NULL in .enable callback.
Signed-off-by: Axel Lin
---
drivers/regulator/axp20x-regulator.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/regulator/axp20x-regulator.c
b/drivers/regulator/axp20x-regulator.c
index fba8f58ab769..8a366f66208e 100644
--- a/dr
This driver is using regulator core's simplified DT parsing code,
so regulator will call regulator_of_get_init_data() to get init_data.
No need to set config.init_data. In additional, current code does not
properly set the init_data setting, so just remove it.
Signed-off-by: Axe
Use of_device_get_match_data to simplify the code a bit.
Signed-off-by: Axel Lin
---
drivers/regulator/cpcap-regulator.c | 12
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/regulator/cpcap-regulator.c
b/drivers/regulator/cpcap-regulator.c
index c9d805d7a979
Current code is using devm_regulator_register() so it is not necessary
to save as3722_regs->rdevs[id] for clean up.
The *rdevs[] is not used now, remove it.
Signed-off-by: Axel Lin
---
drivers/regulator/as3722-regulator.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/regula
Remove #ifdef CONFIG_OF guard so linux/of.h will be included when
!CONFIG_OF. This fixes build warnings when !CONFIG_OF.
Reported-by: kbuild test robot
Signed-off-by: Axel Lin
---
drivers/regulator/da9052-regulator.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/regulator/da9052
The struct pm800_regulators only has 2 members: *chip and *map.
The pm800_data->chip is not used. The pm800_data->map is not necessary.
Thus remove the struct pm800_regulators.
Signed-off-by: Axel Lin
---
drivers/regulator/88pm800.c | 18 +-
1 file changed, 1 insertion(
.set_current_limit callback should select the current closest to max_uA.
Signed-off-by: Axel Lin
---
drivers/regulator/wm831x-isink.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/wm831x-isink.c b/drivers/regulator/wm831x-isink.c
index 6dd891d7eee3
.set_current_limit callback should select the current closest to max_uA.
Signed-off-by: Axel Lin
---
drivers/regulator/wm8350-regulator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/wm8350-regulator.c
b/drivers/regulator/wm8350-regulator.c
index
Use regulator_set/get_current_limit_regmap helpers to save some code.
Signed-off-by: Axel Lin
---
drivers/regulator/wm8350-regulator.c | 81
1 file changed, 11 insertions(+), 70 deletions(-)
diff --git a/drivers/regulator/wm8350-regulator.c
b/drivers/regulator
Use regulator_set/get_current_limit_regmap helpers to save some code.
Signed-off-by: Axel Lin
---
drivers/mfd/wm831x-core.c| 2 +-
drivers/regulator/wm831x-isink.c | 45 +---
include/linux/mfd/wm831x/regulator.h | 2 +-
3 files changed, 9 insertions
This driver has been converted to use regulator core's simplified DT
parsing code. So the match_init_data/match_of_node functions are not
necessary now, remove them.
Signed-off-by: Axel Lin
---
drivers/regulator/max14577-regulator.c | 55 --
1 file changed, 55 dele
Use regulator core's simplified DT parsing code to simply the driver
implementation.
Signed-off-by: Axel Lin
---
drivers/regulator/da9055-regulator.c | 67 +++-
1 file changed, 6 insertions(+), 61 deletions(-)
diff --git a/drivers/regulator/da9055-regulator.c
b/dr
Use regulator core's simplified DT parsing code to simply the driver
implementation.
Signed-off-by: Axel Lin
---
Hi,
I don't have this h/w, so please help testing it.
Thanks,
Axel
drivers/regulator/da9052-regulator.c | 33 +---
1 file changed, 6 inserti
This driver is using devm_regulator_register() so it is not necessary
to save *rdev for clean up. Actually the pmic->rdev[id] is not used now.
Signed-off-by: Axel Lin
---
drivers/regulator/palmas-regulator.c | 12
include/linux/mfd/palmas.h | 1 -
2 files changed,
Use devm_regulator_register to simplify the code.
Signed-off-by: Axel Lin
---
drivers/regulator/gpio-regulator.c | 18 --
1 file changed, 4 insertions(+), 14 deletions(-)
diff --git a/drivers/regulator/gpio-regulator.c
b/drivers/regulator/gpio-regulator.c
index 6157001df0a4
gpio_regulator_voltage_ops and gpio_regulator_current_ops should never
change, make them const.
Signed-off-by: Axel Lin
---
drivers/regulator/gpio-regulator.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/regulator/gpio-regulator.c
b/drivers/regulator/gpio
Current code is using devm_regulator_register() so it is not necessary
to save reg->rdev for clean up. Remove *rdev from struct ab3100_regulator,
then ab3100_regulators_remove() can be removed as well.
Signed-off-by: Axel Lin
---
drivers/regulator/ab3100.c | 24 ++--
1 f
Since devm_regmap_init_mmio_clk can fail, add return value checking.
Signed-off-by: Axel Lin
---
drivers/mfd/hi655x-pmic.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/mfd/hi655x-pmic.c b/drivers/mfd/hi655x-pmic.c
index 96c07fa1802a..6693f74aa6ab 100644
--- a/drivers/mfd/hi655x
Make it consistent as .volt_table should be const unsigned int *.
Signed-off-by: Axel Lin
---
drivers/regulator/mt6397-regulator.c | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/regulator/mt6397-regulator.c
b/drivers/regulator/mt6397-regulator.c
Make it consistent as .volt_table should be const unsigned int *.
Signed-off-by: Axel Lin
---
drivers/regulator/mt6380-regulator.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/regulator/mt6380-regulator.c
b/drivers/regulator/mt6380-regulator.c
index
Make it consistent as .volt_table should be const unsigned int *.
Signed-off-by: Axel Lin
---
drivers/regulator/mt6323-regulator.c | 20 ++--
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/regulator/mt6323-regulator.c
b/drivers/regulator/mt6323
Make it consistent as .volt_table should be const unsigned int *.
Signed-off-by: Axel Lin
---
drivers/regulator/max77650-regulator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/max77650-regulator.c
b/drivers/regulator/max77650-regulator.c
index
This driver does not really need struct as3711_regulator_info and
struct as3711_regulator, remove them.
Signed-off-by: Axel Lin
---
drivers/regulator/as3711-regulator.c | 37 ++--
1 file changed, 7 insertions(+), 30 deletions(-)
diff --git a/drivers/regulator/as3711
Use regulator_set/get_current_limit_regmap helpers to save some code.
Signed-off-by: Axel Lin
---
drivers/regulator/da9063-regulator.c | 107 +++
1 file changed, 28 insertions(+), 79 deletions(-)
diff --git a/drivers/regulator/da9063-regulator.c
b/drivers/regulator
Use regulator_set/get_current_limit_regmap helpers to save some code.
Signed-off-by: Axel Lin
---
drivers/regulator/da9062-regulator.c | 125 +++
1 file changed, 32 insertions(+), 93 deletions(-)
diff --git a/drivers/regulator/da9062-regulator.c
b/drivers/regulator
1010 2.5 1110 3.3
0011 1.7 0111 2.1 1011 2.6 Not Used
Fixes: d2a2e729a666 ("regulator: tps65086: Add regulator driver for the
TPS65086 PMIC")
Signed-off-by: Axel Lin
---
Hi Steven and Andrew,
I don't have this h/w to test. Can you help to verify it
ranges to one range.
Signed-off-by: Axel Lin
---
drivers/regulator/tps65217-regulator.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/regulator/tps65217-regulator.c
b/drivers/regulator/tps65217-regulator.c
index d84fab616abf..ada62f792258 100644
--- a/drivers
kbuild test robot 於 2019年3月1日 週五 下午7:32寫道:
>
> Hi Axel,
>
> Thank you for the patch! Yet something to improve:
>
> [auto build test ERROR on regulator/for-next]
> [also build test ERROR on next-20190228]
> [cannot apply to v5.0-rc8]
> [if your patch is applied to the wrong git tree, please drop us
These regulator_ops variables should never change, make them const.
Signed-off-by: Axel Lin
---
drivers/regulator/mc13783-regulator.c | 4 ++--
drivers/regulator/mc13892-regulator.c | 8
drivers/regulator/mc13xxx-regulator-core.c | 4 ++--
drivers/regulator/mc13xxx.h
The palmas_smps_ramp_delay array should never modify, make it const.
Signed-off-by: Axel Lin
---
drivers/regulator/palmas-regulator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/palmas-regulator.c
b/drivers/regulator/palmas-regulator.c
index
Use regulator_set/get_current_limit_regmap helpers to save some code.
Signed-off-by: Axel Lin
---
drivers/regulator/lp87565-regulator.c | 47 ---
1 file changed, 7 insertions(+), 40 deletions(-)
diff --git a/drivers/regulator/lp87565-regulator.c
b/drivers/regulator
LP87565_BUCK_0 is missed, fix it.
Fixes: f0168a9bf ("regulator: lp87565: Add support for lp87565 PMIC regulators")
Signed-off-by: Axel Lin
---
Hi J Keerthy,
While reading the code, it seems strange that LP87565_BUCK_0 is never used.
So current code only register 3 BUCKs for lp87565
Use regulator_set/get_current_limit_regmap helpers to save some code.
Signed-off-by: Axel Lin
---
drivers/regulator/max77650-regulator.c | 74 +-
1 file changed, 25 insertions(+), 49 deletions(-)
diff --git a/drivers/regulator/max77650-regulator.c
b/drivers/regulator
Use regulator_set/get_current_limit_regmap helpers to save some code.
Signed-off-by: Axel Lin
---
drivers/regulator/da9210-regulator.c | 53
1 file changed, 7 insertions(+), 46 deletions(-)
diff --git a/drivers/regulator/da9210-regulator.c
b/drivers/regulator
Use regulator_set/get_current_limit_regmap helpers to save some code.
Signed-off-by: Axel Lin
---
drivers/regulator/pv88080-regulator.c | 55 ---
1 file changed, 8 insertions(+), 47 deletions(-)
diff --git a/drivers/regulator/pv88080-regulator.c
b/drivers/regulator
Use regulator_set/get_current_limit_regmap helpers to save some code.
Signed-off-by: Axel Lin
---
drivers/regulator/wm831x-dcdc.c | 42 +
1 file changed, 6 insertions(+), 36 deletions(-)
diff --git a/drivers/regulator/wm831x-dcdc.c b/drivers/regulator/wm831x
Use regulator_set/get_current_limit_regmap helpers to save some code.
Signed-off-by: Axel Lin
---
drivers/regulator/pv88060-regulator.c | 51 ---
1 file changed, 7 insertions(+), 44 deletions(-)
diff --git a/drivers/regulator/pv88060-regulator.c
b/drivers/regulator
Use regulator_set/get_current_limit_regmap helpers to save some code.
Signed-off-by: Axel Lin
---
drivers/regulator/pv88090-regulator.c | 53 ---
1 file changed, 8 insertions(+), 45 deletions(-)
diff --git a/drivers/regulator/pv88090-regulator.c
b/drivers/regulator
Use regulator_set/get_current_limit_regmap helpers to save some code.
Signed-off-by: Axel Lin
---
drivers/regulator/da9055-regulator.c | 45 ++--
1 file changed, 9 insertions(+), 36 deletions(-)
diff --git a/drivers/regulator/da9055-regulator.c
b/drivers/regulator
By setting curr_table, n_current_limits, csel_reg and csel_mask, the
regmap users can use regulator_set_current_limit_regmap and
regulator_get_current_limit_regmap for set/get_current_limit callbacks.
Signed-off-by: Axel Lin
---
drivers/regulator/helpers.c | 86
Use regulator_set/get_current_limit_regmap helpers to save some code.
Signed-off-by: Axel Lin
---
drivers/regulator/lp873x-regulator.c | 45
1 file changed, 6 insertions(+), 39 deletions(-)
diff --git a/drivers/regulator/lp873x-regulator.c
b/drivers/regulator
The csel_reg and csel_mask fields in struct regulator_desc needs to
be generic for drivers. Not just for TPS65218.
Signed-off-by: Axel Lin
---
include/linux/regulator/driver.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/regulator/driver.h b/include
Use regulator_set/get_current_limit_regmap helpers to save some code.
Signed-off-by: Axel Lin
---
drivers/regulator/lp872x.c | 70 ++
1 file changed, 10 insertions(+), 60 deletions(-)
diff --git a/drivers/regulator/lp872x.c b/drivers/regulator/lp872x.c
index
regulator_set_current_limit_regmap() and
regulator_get_current_limit_regmap()
patch 3-11 convert drivers to use regulator_set/get_current_limit_regmap
helpers
I don't have h/w for these drivers, so please test it.
Axel Lin (11):
regulator: Fix comment for csel_reg and csel
Use WM8400_DC2_ENA_MASK for DCDC2 enable_mask.
The define is the same as WM8400_DC1_ENA_MASK, just a cleanup.
Signed-off-by: Axel Lin
---
drivers/regulator/wm8400-regulator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/wm8400-regulator.c
b/drivers
The only user of wm8400_block_read/wm8400_set_bits functions is the
wm8400 regulator driver. At the context of all the callers, we can
use regmap_bulk_read/regmap_update_bits directly.
Thus remove wm8400_block_read/wm8400_set_bits functions.
Signed-off-by: Axel Lin
---
drivers/mfd/wm8400-core.c
The *i2c and *i2c_8606 are no longer used since this driver was converted
to use regmap helpers. The *chip and *regulator are not really required.
So remove these unused fields.
Signed-off-by: Axel Lin
---
drivers/regulator/88pm8607.c | 19 +--
1 file changed, 5 insertions
Set volt_table filed then we can use regulator_list_voltage_table.
Since we have volt_table setting, now we can remove vol_table from
struct pm8607_regulator_info.
Signed-off-by: Axel Lin
---
drivers/regulator/88pm8607.c | 19 ++-
1 file changed, 10 insertions(+), 9 deletions
This driver uses regulator_get/set_voltage_sel_regmap so it does not use
vsel_shift. Actually, vsel_shift can be calculated by vsel_mask setting.
Signed-off-by: Axel Lin
---
drivers/regulator/cpcap-regulator.c | 102 ++--
1 file changed, 50 insertions(+), 52 deletions
They should never change, make them const.
Signed-off-by: Axel Lin
---
drivers/regulator/cpcap-regulator.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/regulator/cpcap-regulator.c
b/drivers/regulator/cpcap-regulator.c
index c15ced1b5968..e7dab5c4d1d1 100644
Setup .vsel_reg and .vsel_mask then we can use the standard
set/get_voltage_sel_regmap helpers to simplify the code.
Signed-off-by: Axel Lin
---
drivers/regulator/arizona-ldo1.c | 19 ++-
1 file changed, 6 insertions(+), 13 deletions(-)
diff --git a/drivers/regulator/arizona
The wm831x_dcdc_ilim entries needs to be uA because it is used to compare
with min_uA and max_uA.
While at it also make the array const and change to use unsigned int.
Fixes: e4ee831f949a ("regulator: Add WM831x DC-DC buck convertor support")
Signed-off-by: Axel Lin
---
drivers/regula
The module version is unlikely to be updated, use kernel version should be
enough.
Signed-off-by: Axel Lin
---
drivers/regulator/mcp16502.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/regulator/mcp16502.c b/drivers/regulator/mcp16502.c
index 0fc4963bd5b0..3a8004abe044 100644
Current code does not really avoid array access out of bounds,
fix it by add checking for pdata->slew_rate.
If pdata->slew_rate is too big, it's a bug in pdata that needs fix.
Signed-off-by: Axel Lin
---
drivers/regulator/fan53555.c | 8 +---
1 file changed, 5 insertions(+),
Current code always set pmic->rinfo[id] = &max77620_regs_info[id];
It should set to either max77620_regs_info or max20024_regs_info
depends on the chip_id.
Signed-off-by: Axel Lin
---
drivers/regulator/max77620-regulator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff
> I will not disagree that it may be extra work to look up the define
> (especially if there is no tool tip or split view in the editor) but
> reading the whole lot of code, with only the magic values, you still
> have to look up the meaning of each magic value, have to guess which one
> has the sa
Current code always return error, fix it.
Signed-off-by: Axel Lin
---
drivers/regulator/max77650-regulator.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/regulator/max77650-regulator.c
b/drivers/regulator/max77650-regulator.c
index 411912d5278b
Current code already set .min_uV and .uV_step fields and it actually can
use regulator_list_voltage_linear.
So remove buck_volt_range and use regulator_list_voltage_linear instead.
Signed-off-by: Axel Lin
---
drivers/regulator/mt6311-regulator.c | 10 ++
1 file changed, 2 insertions
The lp873x_buck_ramp_delay should never change, make it const.
Signed-off-by: Axel Lin
---
drivers/regulator/lp873x-regulator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/lp873x-regulator.c
b/drivers/regulator/lp873x-regulator.c
index 2ec5e833c379
Signed-off-by: Axel Lin
---
drivers/regulator/s5m8767.c | 6 +-
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/regulator/s5m8767.c b/drivers/regulator/s5m8767.c
index 5b0e1fe6723f..bb9d1a083299 100644
--- a/drivers/regulator/s5m8767.c
+++ b/drivers/regulator/s5m8767.c
The s5m8767_opmode_reg should never change, make it const.
Signed-off-by: Axel Lin
---
drivers/regulator/s5m8767.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/s5m8767.c b/drivers/regulator/s5m8767.c
index b581f01f3395..5b0e1fe6723f 100644
--- a/drivers
101 - 200 of 1252 matches
Mail list logo