[PATCH] regulator: hi6421: Convert to use simplified DT parsing

2019-04-10 Thread Axel Lin
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.c b

[PATCH] regulator: anatop: Remove unneeded fields from struct anatop_regulator

2019-04-09 Thread Axel Lin
-by: 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

[PATCH] regulator: s2mpa01: Remove unused define for S2MPA01_REGULATOR_CNT

2019-04-09 Thread Axel Lin
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

[PATCH 2/2] regulator: hi655x: Remove ctrl_mask field from struct hi655x_regulator

2019-04-08 Thread Axel Lin
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

[PATCH 1/2] regulator: hi655x: Constify regulators array

2019-04-08 Thread Axel Lin
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

[PATCH] regulator: bd718x7: Use rdev_get_id() to get regulator id

2019-04-07 Thread Axel Lin
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

[PATCH] regulator: s2mpa01: Convert to use simplified DT parsing

2019-04-04 Thread Axel Lin
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/drivers

[PATCH] regulator: twl: Constify regulator_ops

2019-04-02 Thread Axel Lin
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

[PATCH 1/2] regulator: lm363x: Use proper data type for regmap_read arguments

2019-04-02 Thread Axel Lin
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

[PATCH 2/2] regulator: lm363x: Constify regulator_ops

2019-04-02 Thread Axel Lin
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

[PATCH] regulator: bcm590xx: Convert to use simplified DT parsing

2019-04-01 Thread Axel Lin
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.c b

[PATCH] regulator: vctrl: Remove unneeded continue statement

2019-03-28 Thread Axel Lin
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

[PATCH 3/3] regulator: tps6507x: Convert to regulator core's simplified DT parsing code

2019-03-28 Thread Axel Lin
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.c b

[PATCH 2/3] regulator: tps6507x: Remove unused *rdev[] from struct tps6507x_pmic

2019-03-28 Thread Axel Lin
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

[PATCH 1/3] regulator: tps6507x: Constify tps6507x_pmic_ops

2019-03-28 Thread Axel Lin
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

Re: [PATCH] regulator: max77650: Convert MAX77651 SBB1 to pickable linear range

2019-03-28 Thread Axel Lin
> 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

Re: [PATCH] regulator: max77650: Convert MAX77651 SBB1 to pickable linear range

2019-03-27 Thread Axel Lin
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 can

[PATCH] regulator: rc5t583: Get rid of struct rc5t583_regulator

2019-03-27 Thread Axel Lin
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

Re: [PATCH] regulator: max77650: Convert MAX77651 SBB1 to pickable linear range

2019-03-27 Thread 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

[PATCH 2/2] regulator: as3722: Slightly improve readability

2019-03-26 Thread Axel Lin
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

[PATCH 1/2] regulator: as3722: Convert to use regulator_set/get_current_limit_regmap

2019-03-26 Thread Axel Lin
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

[PATCH] regulator: sc2731: Constify regulators

2019-03-25 Thread Axel Lin
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

[PATCH] regulator: max77650: Convert MAX77651 SBB1 to pickable linear range

2019-03-25 Thread Axel Lin
-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/drivers

[PATCH] regulator: uniphier: Fix build dependency

2019-03-25 Thread Axel Lin
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

[PATCH 1/2] regulator: tps65217: Fix off-by-one for latest seletor of tps65217_uv1_ranges

2019-03-24 Thread Axel Lin
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

[PATCH 2/2] regulator: tps65217: Constify regulator_ops

2019-03-24 Thread Axel Lin
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

[PATCH] regulator: tps65218: Constify regulator_ops

2019-03-23 Thread Axel Lin
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

Re: [PATCH] regulator: axp20x: Get rid of AXP20X_xxx_START/END/STEPS defines

2019-03-23 Thread Axel Lin
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

regulator: Question about RC5T619 LDO9/10 .enable_reg and .enable_mask setting

2019-03-23 Thread Axel Lin
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,

[PATCH 2/2] regulator: act8865: Constify regulator_ops

2019-03-22 Thread Axel Lin
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

[PATCH 1/2] regulator: act8865: Convert to regulator core's simplified DT parsing code

2019-03-22 Thread Axel Lin
-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/act8865

[PATCH 2/2] regulator: tps65132: Constify tps65132_regulator_ops and tps_regs_desc

2019-03-21 Thread Axel Lin
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

[PATCH 1/2] regulator: tps65132: Remove unneeded fields from struct tps65132_regulator

2019-03-21 Thread Axel Lin
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

[PATCH RESEND] regulator: tps65086: Fix tps65086_ldoa1_ranges for selector 0xB

2019-03-21 Thread Axel Lin
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/20

Re: [PATCH] regulator: max77620: Fix regulator info setting for max20024

2019-03-21 Thread Axel Lin
Axel Lin 於 2019年2月24日 週日 上午9:27寫道: > > Current code always set pmic->rinfo[id] = _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

[PATCH] regulator: rn5t618: Constify regulator_desc

2019-03-20 Thread Axel Lin
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

[PATCH] regulator: max8925: Convert to regulator core's simplified DT parsing code

2019-03-20 Thread Axel Lin
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.c b

[PATCH] regulator: 88pm8607: Convert to regulator core's simplified DT parsing code

2019-03-19 Thread Axel Lin
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/drivers

[PATCH 2/2] regulator: axp20x: Use rdev_get_id at appropriate places

2019-03-18 Thread Axel Lin
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

[PATCH 1/2] regulator: axp20x: Remove unneeded NULL test against rdev

2019-03-18 Thread Axel Lin
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/drivers

[PATCH 1/2] regulator: cpcap: Remove unneeded init_data setting

2019-03-16 Thread Axel Lin
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: Axel Lin

[PATCH 2/2] regulator: cpcap: Convert to use of_device_get_match_data

2019-03-16 Thread Axel Lin
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

[PATCH] regulator: as3722: Remove *rdevs[] from struct as3722_regulators

2019-03-15 Thread Axel Lin
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

[PATCH] regulator: da9052: Include linux/of.h to fix build warning for of_match_ptr

2019-03-15 Thread Axel Lin
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

[PATCH] regulator: 88pm800: Get rid of struct pm800_regulators

2019-03-14 Thread Axel Lin
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(

[PATCH 1/4] regulator: wm831x-isink: Select maximum current in specific range

2019-03-12 Thread Axel Lin
.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

[PATCH 2/4] regulator: wm8350: Select maximum current in specific range

2019-03-12 Thread Axel Lin
.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

[PATCH 4/4] regulator: wm8350: Convert to use regulator_set/get_current_limit_regmap

2019-03-12 Thread Axel Lin
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

[PATCH 3/4] regulator: wm831x-isink: Convert to use regulator_set/get_current_limit_regmap

2019-03-12 Thread Axel Lin
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

[PATCH] regulator: max14577: Get rid of match_init_data/match_of_node functions

2019-03-12 Thread Axel Lin
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 deletions

[PATCH 2/2] regulator: da9055: Convert to regulator core's simplified DT parsing code

2019-03-12 Thread Axel Lin
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/drivers

[PATCH 1/2] regulator: da9052: Convert to regulator core's simplified DT parsing code

2019-03-12 Thread Axel Lin
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 insertions(+), 27

[PATCH] regulator: palmas: Remove *rdev[PALMAS_NUM_REGS] from struct palmas_pmic

2019-03-10 Thread Axel Lin
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,

[PATCH 1/2] regulator: gpio: Convert to devm_regulator_register

2019-03-07 Thread Axel Lin
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

[PATCH 2/2] regulator: gpio: Constify regulator_ops

2019-03-07 Thread Axel Lin
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

[PATCH] regulator: ab3100: Remove ab3100_regulators_remove function

2019-03-07 Thread Axel Lin
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

[PATCH] mfd: hi655x-pmic: Fix missing return value check for devm_regmap_init_mmio_clk

2019-03-06 Thread Axel Lin
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

[PATCH 3/3] regulator: mt6397: Use unsigned int for volt_tables

2019-03-05 Thread Axel Lin
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

[PATCH 2/3] regulator: mt6380: Use unsigned int for volt_tables

2019-03-05 Thread Axel Lin
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

[PATCH 1/3] regulator: mt6323: Use unsigned int for volt_tables

2019-03-05 Thread Axel Lin
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

[PATCH] regulator: max77650: Use unsigned int for max77651_sbb1_regulator_volt_table

2019-03-05 Thread Axel Lin
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

[PATCH] regulator: as3711: Remove struct as3711_regulator_info and as3711_regulator

2019-03-05 Thread Axel Lin
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

[PATCH 2/2] regulator: da9063: Convert to use regulator_set/get_current_limit_regmap

2019-03-04 Thread Axel Lin
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

[PATCH 1/2] regulator: da9062: Convert to use regulator_set/get_current_limit_regmap

2019-03-04 Thread Axel Lin
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

[PATCH] regulator: tps65086: Fix tps65086_ldoa1_ranges for selector 0xB

2019-03-04 Thread Axel Lin
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? Th

[PATCH] regulator: tps65217: Simplify linear range for selector 25-52

2019-03-03 Thread Axel Lin
-52 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

Re: [PATCH] regulator: lp87565: Convert to use regulator_set/get_current_limit_regmap

2019-03-01 Thread Axel Lin
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

[PATCH] regulator: mc13xxx: Constify regulator_ops variables

2019-03-01 Thread Axel Lin
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

[PATCH] regulator: palmas: Constify palmas_smps_ramp_delay array

2019-03-01 Thread Axel Lin
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

[PATCH] regulator: lp87565: Convert to use regulator_set/get_current_limit_regmap

2019-02-28 Thread Axel Lin
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

[PATCH RFT] regulator: lp87565: Fix missing register for LP87565_BUCK_0

2019-02-28 Thread Axel Lin
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

[PATCH 07/11] regulator: max77650: Convert to use regulator_set/get_current_limit_regmap

2019-02-28 Thread Axel Lin
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

[PATCH 04/11] regulator: da9210: Convert to use regulator_set/get_current_limit_regmap

2019-02-28 Thread Axel Lin
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

[PATCH 09/11] regulator: pv88080: Convert to use regulator_set/get_current_limit_regmap

2019-02-28 Thread Axel Lin
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

[PATCH 11/11] regulator: wm831x-dcdc: Convert to use regulator_set/get_current_limit_regmap

2019-02-28 Thread Axel Lin
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

[PATCH 08/11] regulator: pv88060: Convert to use regulator_set/get_current_limit_regmap

2019-02-28 Thread Axel Lin
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

[PATCH 10/11] regulator: pv88090: Convert to use regulator_set/get_current_limit_regmap

2019-02-28 Thread Axel Lin
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

[PATCH 03/11] regulator: da9055: Convert to use regulator_set/get_current_limit_regmap

2019-02-28 Thread Axel Lin
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

[PATCH 02/11] regulator: core: Add set/get_current_limit helpers for regmap users

2019-02-28 Thread Axel Lin
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

[PATCH 06/11] regulator: lp873x: Convert to use regulator_set/get_current_limit_regmap

2019-02-28 Thread Axel Lin
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

[PATCH 01/11] regulator: Fix comment for csel_reg and csel_mask

2019-02-28 Thread Axel Lin
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

[PATCH 05/11] regulator: lp872x: Convert to use regulator_set/get_current_limit_regmap

2019-02-28 Thread Axel Lin
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

[PATCH 00/11] regulator: Add set/get_current_limit helpers and use it

2019-02-28 Thread Axel Lin
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_mask

[PATCH] regulator: wm8400: Fix trivial typo

2019-02-26 Thread Axel Lin
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

[PATCH] regulator: wm8400: Get rid of wm8400_block_read/wm8400_set_bits functions

2019-02-26 Thread Axel Lin
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

[PATCH 2/2] regulator: 88pm8607: Remove unused fields from struct pm8607_regulator_info

2019-02-26 Thread Axel Lin
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

[PATCH 1/2] regulator: 88pm8607: Simplify pm8607_list_voltage implementation

2019-02-26 Thread Axel Lin
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

[PATCH 1/2] regulator: cpcap: Remove unused vsel_shift from struct cpcap_regulator

2019-02-25 Thread Axel Lin
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

[PATCH 2/2] regulator: cpcap: Constify omap4_regulators and xoom_regulators

2019-02-25 Thread Axel Lin
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

[PATCH] regulator: arizona_ldo1: Simplify arizona_ldo1_hc_set/get_voltage_sel

2019-02-25 Thread Axel Lin
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

[PATCH] regulator: wm831x-dcdc: Fix list of wm831x_dcdc_ilim from mA to uA

2019-02-24 Thread Axel Lin
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

[PATCH] regulator: mcp16502: Remove module version

2019-02-23 Thread Axel Lin
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

[PATCH] regulator: fan53555: Check pdata->slew_rate setting

2019-02-23 Thread Axel Lin
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(+), 3 del

[PATCH] regulator: max77620: Fix regulator info setting for max20024

2019-02-23 Thread Axel Lin
Current code always set pmic->rinfo[id] = _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 --git a/driv

Re: [PATCH] regulator: axp20x: Get rid of AXP20X_xxx_START/END/STEPS defines

2019-02-23 Thread Axel Lin
> 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

[PATCH] regulator: max77650: Fix set_current_limit implementation

2019-02-22 Thread Axel Lin
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

[PATCH] regulator: mt6311: Use linear instead of linear range for mt6311_buck_ops

2019-02-21 Thread Axel Lin
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

[PATCH] regulator: lp873x: Constify lp873x_buck_ramp_delay array

2019-02-21 Thread Axel Lin
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

[PATCH 2/2] regulator: s5m8767: Simplify s5m8767_set_voltage_time_sel implementation

2019-02-21 Thread Axel Lin
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

[PATCH 1/2] regulator: s5m8767: Constify s5m8767_opmode_reg

2019-02-21 Thread Axel Lin
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

<    1   2   3   4   5   6   7   8   9   10   >