[PATCH] regulator: mt6315: Fix off-by-one for .n_voltages

2021-03-10 Thread Axel Lin
The valid selector is 0 ~ 0xbf, so the .n_voltages should be 0xc0. Signed-off-by: Axel Lin --- drivers/regulator/mt6315-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/mt6315-regulator.c b/drivers/regulator/mt6315-regulator.c index fc7654624dd6

Re: [PATCH] spi: mediatek: Re-license MTK SPI driver as Dual MIT/GPL

2021-03-03 Thread Axel Lin
Leilk Liu 於 2021年3月3日 週三 上午10:57寫道: > > From: "leilk.liu" > > It is wanted to use MTK spi bus driver with GPL-2.0 or MIT license. > But now it is only licensed as GPL-2.0, so re-license it as dual > MIT/GPL. > > Signed-off-by: leilk.liu Acked-by: Axel Lin

[PATCH] regulator: pf8x00: Use regulator_map_voltage_ascend for pf8x00_buck7_ops

2021-02-15 Thread Axel Lin
The voltages in pf8x00_sw7_voltages are in ascendant order, so use regulator_map_voltage_ascend. Signed-off-by: Axel Lin --- drivers/regulator/pf8x00-regulator.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/regulator/pf8x00-regulator.c b/drivers/regulator/pf8x00-regulator.c

[PATCH] regulator: mt6315: Return REGULATOR_MODE_INVALID for invalid mode

2021-02-14 Thread Axel Lin
-EINVAL is not a valid return value for .of_map_mode, return REGULATOR_MODE_INVALID instead. Signed-off-by: Axel Lin --- drivers/regulator/mt6315-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/mt6315-regulator.c b/drivers/regulator/mt6315

[PATCH] regulator: pf8x00: Fix typo for PF8200 chip name

2021-01-28 Thread Axel Lin
Trivial typo fix. Signed-off-by: Axel Lin --- drivers/regulator/pf8x00-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/pf8x00-regulator.c b/drivers/regulator/pf8x00-regulator.c index 827da25466cc..9b28bd63208d 100644 --- a/drivers/regulator

[PATCH] regulator: rt4801: Select REGMAP_I2C to fix build error

2020-08-19 Thread Axel Lin
Fix build error when CONFIG_REGMAP_I2C is not set. Signed-off-by: Axel Lin --- drivers/regulator/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig index ebce11cbab44..f719ed5a8c33 100644 --- a/drivers/regulator/Kconfig +++ b

[PATCH] regulator: lp8755: Get rid of lp8755_read/lp8755_write/lp8755_update_bits

2020-08-02 Thread Axel Lin
Just use regmap_read/regmap_write/regmap_update_bits instead. Signed-off-by: Axel Lin --- drivers/regulator/lp8755.c | 82 ++ 1 file changed, 21 insertions(+), 61 deletions(-) diff --git a/drivers/regulator/lp8755.c b/drivers/regulator/lp8755.c index

[PATCH] regulator: cros-ec-regulator: Add NULL test for devm_kmemdup call

2020-08-01 Thread Axel Lin
Fix possible NULL pointer dereference. Signed-off-by: Axel Lin --- drivers/regulator/cros-ec-regulator.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/regulator/cros-ec-regulator.c b/drivers/regulator/cros-ec-regulator.c index 3117bbd2826b..eb3fc1db4edc 100644 --- a/drivers

[PATCH] regulator: qcom_spmi: Improve readability for setting up enable/mode pin control

2020-07-31 Thread Axel Lin
By checking data->pin_ctrl_enable / data->pin_ctrl_hpm flags first, then use switch-case to improve readability. Signed-off-by: Axel Lin --- drivers/regulator/qcom_spmi-regulator.c | 70 - 1 file changed, 34 insertions(+), 36 deletions(-) diff --git a/drivers/reg

[PATCH] regulator: pca9450: Convert to use module_i2c_driver

2020-07-24 Thread Axel Lin
Use module_i2c_driver to simplify driver init boilerplate. Signed-off-by: Axel Lin --- drivers/regulator/pca9450-regulator.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/regulator/pca9450-regulator.c b/drivers/regulator/pca9450-regulator.c index

[PATCH] mfd/axp20x-i2c: Fix "CONFIG_ACPI" is not defined warning

2020-07-07 Thread Axel Lin
Fix below build warning: drivers/mfd/axp20x-i2c.c:82:5: warning: "CONFIG_ACPI" is not defined, evaluates to 0 [-Wundef] 82 | #if CONFIG_ACPI | ^~~ Fixes: 20f359cb236b ("mfd: axp20x-i2c: Do not define 'struct acpi_device_id' when !CONFIG_ACPI") Sig

[PATCH] regulator: fan53880: Add missing .owner field in regulator_desc

2020-07-06 Thread Axel Lin
Add missing .owner field in regulator_desc, which is used for refcounting. Signed-off-by: Axel Lin --- drivers/regulator/fan53880.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/regulator/fan53880.c b/drivers/regulator/fan53880.c index 285acc705a55..575d289b8e04 100644

[PATCH] regulator: mt6358: Remove BROKEN dependency

2020-06-16 Thread Axel Lin
The MFD part is merged into v5.8-rc1, thus remove BROKEN dependency. Signed-off-by: Axel Lin --- drivers/regulator/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig index c398e90e0e73..f60eeaae7afd 100644

Re: [RESEND][PATCH 2/2] regulator: da9062: Simplify da9062_buck_set_mode for BUCK_MODE_MANUAL case

2019-10-08 Thread Axel Lin
Mark Brown 於 2019年10月8日 週二 下午6:51寫道: > > On Tue, Oct 08, 2019 at 06:48:15PM +0800, Axel Lin wrote: > > Mark Brown 於 2019年10月8日 週二 下午6:44寫道: > > > > It doesn't seem to apply against current code. > > > I just test apply it and It looks fine to be applied by lin

Re: [RESEND][PATCH 2/2] regulator: da9062: Simplify da9062_buck_set_mode for BUCK_MODE_MANUAL case

2019-10-08 Thread Axel Lin
Mark Brown 於 2019年10月8日 週二 下午6:44寫道: > > On Tue, Oct 08, 2019 at 06:41:21PM +0800, Axel Lin wrote: > > > I'm wondering if any issue with this patch? > > Note, this patch is for da9062 (not for da9063 which is already applied). > > It doesn't seem to apply against curr

Re: [RESEND][PATCH 2/2] regulator: da9062: Simplify da9062_buck_set_mode for BUCK_MODE_MANUAL case

2019-10-08 Thread Axel Lin
Axel Lin 於 2019年10月7日 週一 下午7:50寫道: > > The sleep flag bit decides the mode for BUCK_MODE_MANUAL case, simplify > the logic as the result is the same. > > Signed-off-by: Axel Lin > Reviewed-by: Adam Thomson Hi Mark, I'm wondering if any issue with this patch? Note, this p

[PATCH 1/3] regulator: rk808: Constify rk817 regulator_ops

2019-10-07 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/rk808-regulator.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/regulator/rk808-regulator.c b

[PATCH 3/3] regulator: rk808: Remove rk817_set_suspend_voltage function

2019-10-07 Thread Axel Lin
The implement is exactly the same as rk808_set_suspend_voltage, so just use rk808_set_suspend_voltage instead. Signed-off-by: Axel Lin --- drivers/regulator/rk808-regulator.c | 17 + 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/drivers/regulator/rk808

[PATCH 2/3] regulator: rk808: Fix warning message in rk817_set_ramp_delay

2019-10-07 Thread Axel Lin
The default in rk817_set_ramp_delay is 25MV rather than 10MV. Signed-off-by: Axel Lin --- drivers/regulator/rk808-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/rk808-regulator.c b/drivers/regulator/rk808-regulator.c index eda056fce65f

[RESEND][PATCH 1/2] regulator: da9062: Simplify the code iterating all regulators

2019-10-07 Thread Axel Lin
It's more straightforward to use for statement here. Signed-off-by: Axel Lin Acked-by: Steve Twiss --- This was sent on https://lkml.org/lkml/2019/7/11/208 with Adam's Ack. drivers/regulator/da9062-regulator.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers

[RESEND][PATCH 2/2] regulator: da9062: Simplify da9062_buck_set_mode for BUCK_MODE_MANUAL case

2019-10-07 Thread Axel Lin
The sleep flag bit decides the mode for BUCK_MODE_MANUAL case, simplify the logic as the result is the same. Signed-off-by: Axel Lin Reviewed-by: Adam Thomson --- This was sent on https://lkml.org/lkml/2019/9/26/24 with Adam's Review. drivers/regulator/da9062-regulator.c | 9 +++-- 1 file

[PATCH] regulator: pbias: Get rid of struct pbias_regulator_data

2019-10-07 Thread Axel Lin
Only the desc field is really used, so use struct regulator_desc instead. Then struct pbias_regulator_data can be removed. Signed-off-by: Axel Lin --- drivers/regulator/pbias-regulator.c | 69 +++-- 1 file changed, 26 insertions(+), 43 deletions(-) diff --git a/drivers

Re: [PATCH 1/2] regulator: da9062: Simplify da9062_buck_set_mode for BUCK_MODE_MANUAL case

2019-10-01 Thread Axel Lin
Adam Thomson 於 2019年9月26日 週四 下午5:22寫道: > > On 26 September 2019 06:51, Axel Lin wrote: > > > The sleep flag bit decides the mode for BUCK_MODE_MANUAL case, simplify > > the logic as the result is the same. > > > > Signed-off-by: Axel Lin > > This patch wi

[PATCH] regulator: ti-abb: Fix timeout in ti_abb_wait_txdone/ti_abb_clear_all_txdone

2019-09-29 Thread Axel Lin
est iteration of the while loop. Fix it. Signed-off-by: Axel Lin --- drivers/regulator/ti-abb-regulator.c | 26 -- 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/drivers/regulator/ti-abb-regulator.c b/drivers/regulator/ti-abb-regulator.c index cced1ffb8

[PATCH 1/2] regulator: da9062: Simplify da9062_buck_set_mode for BUCK_MODE_MANUAL case

2019-09-25 Thread Axel Lin
The sleep flag bit decides the mode for BUCK_MODE_MANUAL case, simplify the logic as the result is the same. Signed-off-by: Axel Lin --- drivers/regulator/da9062-regulator.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/regulator/da9062-regulator.c b

[PATCH 2/2] regulator: da9063: Simplify da9063_buck_set_mode for BUCK_MODE_MANUAL case

2019-09-25 Thread Axel Lin
The sleep flag bit decides the mode for BUCK_MODE_MANUAL case, simplify the logic as the result is the same. Signed-off-by: Axel Lin --- drivers/regulator/da9063-regulator.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/regulator/da9063-regulator.c b

[PATCH] regulator: pbias: Use of_device_get_match_data

2019-09-25 Thread Axel Lin
Use of_device_get_match_data to simplify the code a bit. Signed-off-by: Axel Lin --- drivers/regulator/pbias-regulator.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/regulator/pbias-regulator.c b/drivers/regulator/pbias-regulator.c index 92b41a6a4dc2

[PATCH] regulator: fixed: Prevent NULL pointer dereference when !CONFIG_OF

2019-09-21 Thread Axel Lin
Use of_device_get_match_data which has NULL test for match before dereference match->data. Add NULL test for drvtype so it still works for fixed_voltage_ops when !CONFIG_OF. Signed-off-by: Axel Lin --- drivers/regulator/fixed.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) d

[PATCH v2] regulator: lp87565: Simplify lp87565_buck_set_ramp_delay

2019-09-07 Thread Axel Lin
Use rdev->regmap/>dev instead of lp87565->regmap/lp87565->dev. In additional, the lp87565->dev actually is the parent mfd device, so the dev_err message is misleading here with lp87565->dev. Signed-off-by: Axel Lin --- v2: Add lp87565 prefix in subject line drivers

[PATCH] regulator: Simplify lp87565_buck_set_ramp_delay

2019-09-07 Thread Axel Lin
Use rdev->regmap/>dev instead of lp87565->regmap/lp87565->dev. In additional, the lp87565->dev actually is the parent mfd device, so the dev_err message is misleading here with lp87565->dev. Signed-off-by: Axel Lin --- drivers/regulator/lp87565-regulator.c | 5 ++---

[PATCH RESEND] regulator: lp87565: Fix probe failure for "ti,lp87565"

2019-07-23 Thread Axel Lin
pport") Signed-off-by: Axel Lin --- This patch was sent on https://lkml.org/lkml/2019/7/11/203 This resend re-generate the patch against regulator tree for-5.3 branch. Note there is a conflict with commit f3f4363b1239 on Linus' tree which is merged from mfd tree. ("regulator: lp87565:

Re: [PATCH RFT] regulator: lp87565: Fix probe failure for "ti,lp87565"

2019-07-23 Thread Axel Lin
Mark Brown 於 2019年7月24日 週三 上午12:35寫道: > > On Tue, Jul 23, 2019 at 08:28:35PM +0800, Axel Lin wrote: > > Mark Brown 於 2019年7月23日 週二 下午7:26寫道: > > > On Thu, Jul 11, 2019 at 07:35:17PM +0800, Axel Lin wrote: > > > > > The "ti,lp87565" compat

Re: [PATCH RFT] regulator: lp87565: Fix probe failure for "ti,lp87565"

2019-07-23 Thread Axel Lin
Mark Brown 於 2019年7月23日 週二 下午7:26寫道: > > On Thu, Jul 11, 2019 at 07:35:17PM +0800, Axel Lin wrote: > > The "ti,lp87565" compatible string is still in of_lp87565_match_table, > > but current code will return -EINVAL because lp87565->dev_type is unknown. > &g

[PATCH] regulator: stm32-booster: Remove .min_uV and .list_voltage for fixed regulator

2019-07-22 Thread Axel Lin
Setting .n_voltages = 1 and .fixed_uV is enough for fixed regulator, remove the redundant .min_uV and .list_voltage settings. Signed-off-by: Axel Lin --- drivers/regulator/stm32-booster.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/regulator/stm32-booster.c b/drivers

[PATCH] regulator: rk808: Return REGULATOR_MODE_INVALID for invalid mode

2019-07-11 Thread Axel Lin
-EINVAL is not a valid return value for .of_map_mode, return REGULATOR_MODE_INVALID instead. Signed-off-by: Axel Lin --- drivers/regulator/rk808-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/rk808-regulator.c b/drivers/regulator/rk808

[PATCH] regulator: da9062: Simplify the code iterating all regulators

2019-07-11 Thread Axel Lin
It's more straightforward to use for statement here. Signed-off-by: Axel Lin --- drivers/regulator/da9062-regulator.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/regulator/da9062-regulator.c b/drivers/regulator/da9062-regulator.c index 2ffc64622451

[PATCH RFT] regulator: lp87565: Fix probe failure for "ti,lp87565"

2019-07-11 Thread Axel Lin
pport") Signed-off-by: Axel Lin --- Hi Keerthy, The commit "regulator: lp87565: Add 4-phase lp87561 regulator support" does not mention why it returns -EINVAL for "ti,lp87565" (The data field is not set for .compatible = "ti,lp87565"), so I think the support f

Re: [RFT][PATCH 2/2] regulator: lm363x: Fix n_voltages setting for lm36274

2019-07-07 Thread Axel Lin
Axel Lin 於 2019年6月27日 週四 上午7:58寫道: > > > > With your current code where LM36274_LDO_VSEL_MAX and n_voltages is 0x34, > > > the maximum voltage will become 40 + 5 * 0x34 = 6.6V which > > > does not match the datasheet. > > > > Not sure how you g

Re: [RFT][PATCH 1/2] regulator: lm363x: Fix off-by-one n_voltages for lm3632 ldo_vpos/ldo_vneg

2019-07-07 Thread Axel Lin
Axel Lin 於 2019年6月26日 週三 下午11:12寫道: > > Dan Murphy 於 2019年6月26日 週三 下午11:07寫道: > > > > Hello > > > > On 6/26/19 8:26 AM, Axel Lin wrote: > > > According to the datasheet https://www.ti.com/lit/ds/symlink/lm3632a.pdf > > > Table 20. VPOS Bias

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

2019-06-26 Thread Axel Lin
Hi Chen, Chen Feng 於 2019年6月27日 週四 上午10:03寫道: > > Thanks I assume this is an Ack. If you can add your Acked-by in the reply, it's easier for maintainer to accept the patch. > > On 2019/6/26 21:30, Axel Lin wrote: > > Since devm_regmap_init_mmio_clk can fail, add ret

Re: [RFT][PATCH 2/2] regulator: lm363x: Fix n_voltages setting for lm36274

2019-06-26 Thread Axel Lin
> > With your current code where LM36274_LDO_VSEL_MAX and n_voltages is 0x34, > > the maximum voltage will become 40 + 5 * 0x34 = 6.6V which > > does not match the datasheet. > > Not sure how you get 6.6v the LDO max is 6.5v. > > After 0x32->0x7f maps to 6.5v > > 00 = 4 V > 01 =

Re: [RFT][PATCH 2/2] regulator: lm363x: Fix n_voltages setting for lm36274

2019-06-26 Thread Axel Lin
Dan Murphy 於 2019年6月26日 週三 下午11:07寫道: > > Hello > > On 6/26/19 8:26 AM, Axel Lin wrote: > > According to the datasheet http://www.ti.com/lit/ds/symlink/lm36274.pdf: > > Table 23. VPOS Bias Register Field Descriptions VPOS[5:0]: > > VPOS voltage (50-mV steps): VPOS

Re: [RFT][PATCH 1/2] regulator: lm363x: Fix off-by-one n_voltages for lm3632 ldo_vpos/ldo_vneg

2019-06-26 Thread Axel Lin
Dan Murphy 於 2019年6月26日 週三 下午11:07寫道: > > Hello > > On 6/26/19 8:26 AM, Axel Lin wrote: > > According to the datasheet https://www.ti.com/lit/ds/symlink/lm3632a.pdf > > Table 20. VPOS Bias Register Field Descriptions VPOS[5:0] > > Sets the Positive Display Bias

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

2019-06-26 Thread Axel Lin
Since devm_regmap_init_mmio_clk can fail, add return value checking. Signed-off-by: Axel Lin Acked-by: Chen Feng --- This was sent on https://lkml.org/lkml/2019/3/6/904 drivers/mfd/hi655x-pmic.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/mfd/hi655x-pmic.c b/drivers/mfd

[RFT][PATCH 1/2] regulator: lm363x: Fix off-by-one n_voltages for lm3632 ldo_vpos/ldo_vneg

2019-06-26 Thread Axel Lin
) 01: 5.55 V 100111: 5.95 V 101000: 6 V Note: Codes 101001 to 11 map to 6 V The LM3632_LDO_VSEL_MAX should be 0b101000 (0x28), so the maximum voltage can match the datasheet. Fixes: 3a8d1a73a037 ("regulator: add LM363X driver") Signed-off-by: Axel Lin --- drivers

[RFT][PATCH 2/2] regulator: lm363x: Fix n_voltages setting for lm36274

2019-06-26 Thread Axel Lin
pport for LM36274") Signed-off-by: Axel Lin --- drivers/regulator/lm363x-regulator.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/regulator/lm363x-regulator.c b/drivers/regulator/lm363x-regulator.c index e4a27d63bf90..4b9f618b07e9 100644 --- a/drivers/regula

[PATCH 2/2] regulator: slg51000: Remove unneeded regl_pdata from struct slg51000

2019-05-24 Thread Axel Lin
Just use a local variable *ena_gpiod in slg51000_of_parse_cb instead. With this change, the struct slg51000_pdata can be removed. Signed-off-by: Axel Lin --- drivers/regulator/slg51000-regulator.c | 17 ++--- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/drivers

[PATCH 1/2] regulator: slg51000: Constify slg51000_regl_ops and slg51000_switch_ops

2019-05-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/slg51000-regulator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/regulator/slg51000-regulator.c b

Re: regulator: NULL-pointer dereference in tps6507x

2019-05-23 Thread Axel Lin
Bartosz Golaszewski 於 2019年5月23日 週四 下午5:28寫道: > > Hi Axel, > > commit f979c08f7624 ("regulator: tps6507x: Convert to regulator core's > simplified DT parsing code") causes the following crash on da850-evm > board with linux v5.2-rc1: The fix is already in regulator tree and linux-next tree:

Re: [PATCH] regulator: max77650: Move max77651_SBB1_desc's declaration down

2019-05-22 Thread Axel Lin
t; Link: https://github.com/ClangBuiltLinux/linux/issues/491 > Signed-off-by: Nathan Chancellor Reviewed-by: Axel Lin

[PATCH RFT] regulator: tps6507x: Fix boot regression due to testing wrong init_data pointer

2019-05-16 Thread Axel Lin
A NULL init_data once incremented will lead to oops, fix it. Fixes: f979c08f7624 ("regulator: tps6507x: Convert to regulator core's simplified DT parsing code") Reported-by: Sekhar Nori Signed-off-by: Axel Lin --- Hi Sekhar, Please check if this patch works, thanks. Axel drivers

Re: [PATCH] spi: bitbang: Fix NULL pointer dereference in spi_unregister_master

2019-05-16 Thread Axel Lin
YueHaibing 於 2019年5月16日 週四 下午3:57寫道: > > If spi_register_master fails in spi_bitbang_start > because device_add failure, We should return the > error code other than 0, otherwise calling > spi_bitbang_stop may trigger NULL pointer dereference > like this: Reviewed-by: Axel Lin

[PATCH] regulator: core: Slightly improve readability of _regulator_get_enable_time

2019-05-03 Thread Axel Lin
The logic is equivalent, but it looks more straightforward this way: If rdev->desc->ops->enable_time is set, call it. Otherwise fallback to return rdev->desc->enable_time. Signed-off-by: Axel Lin --- drivers/regulator/core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 del

[PATCH 2/2] regulator: da9xxx: Switch to SPDX identifier

2019-05-02 Thread Axel Lin
Convert Dialog Semiconductor DA9xxx regulator drivers to SPDX identifier. Signed-off-by: Axel Lin --- drivers/regulator/da903x.c | 16 ++-- drivers/regulator/da9052-regulator.c | 20 +++- drivers/regulator/da9055-regulator.c | 20

[PATCH 1/2] regulator: pv880x0: Switch to SPDX identifier

2019-05-02 Thread Axel Lin
Convert Powerventure Semiconductor PV88060/PV88080/PV88090 regulator drivers to SPDX identifier. Signed-off-by: Axel Lin --- drivers/regulator/pv88060-regulator.c | 18 -- drivers/regulator/pv88060-regulator.h | 11 +-- drivers/regulator/pv88080-regulator.c | 18

[PATCH 2/2] regulator: ab3100: Set fixed_uV instead of min_uV for fixed regulators

2019-05-02 Thread Axel Lin
Slightly better readability by setting fixed_uV instead of min_uV. Signed-off-by: Axel Lin --- drivers/regulator/ab3100.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/regulator/ab3100.c b/drivers/regulator/ab3100.c index edde907a7062..438509f55f05 100644

[PATCH 1/2] regulator: ab3100: Constify regulator_ops and ab3100_regulator_desc

2019-05-02 Thread Axel Lin
These regulator_ops variables and ab3100_regulator_desc array never need to be modified, make them const so compiler can put them to .rodata. Signed-off-by: Axel Lin --- drivers/regulator/ab3100.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers

[PATCH] regulator: hi6xxx: Switch to SPDX identifier

2019-04-30 Thread Axel Lin
Convert HiSilicon hi6xxx PMIC drivers to SPDX identifier. Signed-off-by: Axel Lin --- drivers/regulator/hi6421-regulator.c | 24 +- drivers/regulator/hi6421v530-regulator.c | 26 ++-- drivers/regulator/hi655x-regulator.c | 22

[PATCH 2/2] regulator: stm32-pwr: Remove unneeded .min_uV and .list_volage

2019-04-30 Thread Axel Lin
For fixed regulator, setting .n_voltages = 1 and .fixed_uV is enough, no need to set .min_uV and .list_volage. Signed-off-by: Axel Lin --- drivers/regulator/stm32-pwr.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/regulator/stm32-pwr.c b/drivers/regulator/stm32-pwr.c index

[PATCH 1/2] regulator: stm32-pwr: Remove unneeded *desc from struct stm32_pwr_reg

2019-04-30 Thread Axel Lin
Just use rdev->desc instead. Signed-off-by: Axel Lin --- drivers/regulator/stm32-pwr.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/regulator/stm32-pwr.c b/drivers/regulator/stm32-pwr.c index 7b39a41530d4..8bd15e4d2cea 100644 --- a/drivers/regulator/st

[PATCH 2/2] regulator: vexpress: Switch to SPDX identifier

2019-04-29 Thread Axel Lin
Signed-off-by: Axel Lin --- drivers/regulator/vexpress-regulator.c | 15 +++ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/drivers/regulator/vexpress-regulator.c b/drivers/regulator/vexpress-regulator.c index a15a1319436a..1235f46e633e 100644 --- a/drivers/regulator

[PATCH 1/2] regulator: vexpress: Get rid of struct vexpress_regulator

2019-04-29 Thread Axel Lin
The *regdev and *regmap can be replaced by local variables in probe(). Only desc of struct vexpress_regulator is really need, so just use struct regulator_desc directly and remove struct vexpress_regulator. Signed-off-by: Axel Lin --- drivers/regulator/vexpress-regulator.c | 53

regulator: Several commits are disappear in regulator tree

2019-04-25 Thread Axel Lin
Hi Mark, I found the commits between 2019-04-10 ~ 2019-04-17 are disappear since linux-next 20190424: linux-next 20190418: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/log/drivers/regulator?h=next-20190418 linux-next 20190424:

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

2019-04-21 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 --- This was sent on https://lkml.org/lkml/2019/2/23/482 drivers/regulator/max77620-regulator.c | 2 +- 1 file changed

[PATCH] regulator: mt63xx: Switch to SPDX identifier

2019-04-20 Thread Axel Lin
Convert MediaTek mt63xx PMIC drivers to SPDX identifier. Signed-off-by: Axel Lin --- drivers/regulator/mt6311-regulator.c | 17 - drivers/regulator/mt6311-regulator.h | 10 +- drivers/regulator/mt6323-regulator.c | 12 drivers/regulator/mt6380-regulator.c

[PATCH 1/2] regulator: sky81452: Constify sky81452_reg_ops

2019-04-20 Thread Axel Lin
sky81452_reg_ops is never changed, make it const. Signed-off-by: Axel Lin --- drivers/regulator/sky81452-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/sky81452-regulator.c b/drivers/regulator/sky81452-regulator.c index 647860611916

[PATCH 2/2] regulator: sky81452: Switch to SPDX identifier

2019-04-20 Thread Axel Lin
Signed-off-by: Axel Lin --- drivers/regulator/sky81452-regulator.c | 24 ++-- 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/drivers/regulator/sky81452-regulator.c b/drivers/regulator/sky81452-regulator.c index eb2b60968a1a..177dede82a61 100644 --- a/drivers

[PATCH] regulator: sy8106a: Get rid of struct sy8106a

2019-04-19 Thread Axel Lin
All the fields in struct sy8106a are only used in sy8106a_i2c_probe(), so use local variables instead. Signed-off-by: Axel Lin --- drivers/regulator/sy8106a-regulator.c | 40 +-- 1 file changed, 13 insertions(+), 27 deletions(-) diff --git a/drivers/regulator/sy8106a

[PATCH 1/2] regulator: fan53555: Clean up unneeded fields from struct fan53555_device_info

2019-04-18 Thread Axel Lin
The *regmap and *rdev can be replaced by local variables. The slew_rate is no longer used since commit dd7e71fbeefe ("regulator: fan53555: use set_ramp_delay to set the ramp up slew rate"). Signed-off-by: Axel Lin --- drivers/regulator/fan53555.c | 36 +

[PATCH 2/2] regulator: fan53555: Switch to SPDX identifier

2019-04-18 Thread Axel Lin
Signed-off-by: Axel Lin --- drivers/regulator/fan53555.c | 24 ++-- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/drivers/regulator/fan53555.c b/drivers/regulator/fan53555.c index e2caf4173ab5..dbe477da4e55 100644 --- a/drivers/regulator/fan53555.c +++ b

[PATCH 1/3] regulator: ltc3589: Convert to use simplified DT parsing

2019-04-18 Thread Axel Lin
Use regulator core's simplified DT parsing code to simplify the driver implementation. Signed-off-by: Axel Lin --- drivers/regulator/ltc3589.c | 194 +++- 1 file changed, 58 insertions(+), 136 deletions(-) diff --git a/drivers/regulator/ltc3589.c b/drivers

[PATCH 3/3] regulator: ltc3589: Switch to SPDX identifier

2019-04-18 Thread Axel Lin
Signed-off-by: Axel Lin --- drivers/regulator/ltc3589.c | 24 ++-- 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/drivers/regulator/ltc3589.c b/drivers/regulator/ltc3589.c index 077e73715514..9a037fdc5fc5 100644 --- a/drivers/regulator/ltc3589.c +++ b/drivers

[PATCH 2/3] regulator: ltc3589: Get rid of struct ltc3589_regulator

2019-04-18 Thread Axel Lin
After converting to use simplified DT parsing, the struct ltc3589_regulator only has a desc member. So let's remove struct ltc3589_regulator and use struct regulator_desc instead. Signed-off-by: Axel Lin --- drivers/regulator/ltc3589.c | 69 + 1 file changed

[PATCH 3/5] regulator: wm8350: Switch to SPDX identifier

2019-04-17 Thread Axel Lin
Signed-off-by: Axel Lin --- drivers/regulator/wm8350-regulator.c | 21 - 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/drivers/regulator/wm8350-regulator.c b/drivers/regulator/wm8350-regulator.c index 0eb3f3a33caa..56d6168a888d 100644 --- a/drivers/regulator

[PATCH 4/5] regulator: wm8400: Switch to SPDX identifier

2019-04-17 Thread Axel Lin
Signed-off-by: Axel Lin --- drivers/regulator/wm8400-regulator.c | 20 +++- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/drivers/regulator/wm8400-regulator.c b/drivers/regulator/wm8400-regulator.c index 5ce86b92851b..6f331b51e479 100644 --- a/drivers/regulator

[PATCH 1/5] regulator: arizona: Switch to SPDX identifier

2019-04-17 Thread Axel Lin
Signed-off-by: Axel Lin --- drivers/regulator/arizona-ldo1.c| 19 +++ drivers/regulator/arizona-micsupp.c | 19 +++ 2 files changed, 14 insertions(+), 24 deletions(-) diff --git a/drivers/regulator/arizona-ldo1.c b/drivers/regulator/arizona-ldo1.c index

[PATCH 5/5] regulator: wm8994: Switch to SPDX identifier

2019-04-17 Thread Axel Lin
Signed-off-by: Axel Lin --- drivers/regulator/wm8994-regulator.c | 19 +++ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/drivers/regulator/wm8994-regulator.c b/drivers/regulator/wm8994-regulator.c index 38928cdcb6e6..cadea0344486 100644 --- a/drivers/regulator

[PATCH 2/5] regulator: wm831x: Switch to SPDX identifier

2019-04-17 Thread Axel Lin
Signed-off-by: Axel Lin --- drivers/regulator/wm831x-dcdc.c | 19 +++ drivers/regulator/wm831x-isink.c | 19 +++ drivers/regulator/wm831x-ldo.c | 19 +++ 3 files changed, 21 insertions(+), 36 deletions(-) diff --git a/drivers/regulator/wm831x

[PATCH] regulator: stm32-pwr: Fix error checking for of_iomap

2019-04-17 Thread Axel Lin
of_iomap returns NULL on error. Signed-off-by: Axel Lin --- drivers/regulator/stm32-pwr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/regulator/stm32-pwr.c b/drivers/regulator/stm32-pwr.c index 222d593d76a2..dd5c2b383e5b 100644 --- a/drivers/regulator/stm32

[PATCH] regulator: stm32-pwr: Staticize local symbols

2019-04-17 Thread Axel Lin
These symbols are only used by this driver, make them static. Signed-off-by: Axel Lin --- drivers/regulator/stm32-pwr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/regulator/stm32-pwr.c b/drivers/regulator/stm32-pwr.c index e434b26d4c8b..222d593d76a2 100644

[PATCH 3/3] regulator: tps80031: Switch to SPDX identifier

2019-04-16 Thread Axel Lin
Signed-off-by: Axel Lin --- drivers/regulator/tps80031-regulator.c | 34 -- 1 file changed, 10 insertions(+), 24 deletions(-) diff --git a/drivers/regulator/tps80031-regulator.c b/drivers/regulator/tps80031-regulator.c index 8e65a13e2ef5..85a6a8ca8c1b 100644

[PATCH 2/3] regulator: tps80031: Constify regulator_ops and tps80031_dcdc_voltages array

2019-04-16 Thread Axel Lin
These regulator_ops variables and tps80031_dcdc_voltages array never need to be modified, make them const so compiler can put them to .rodata. Signed-off-by: Axel Lin --- drivers/regulator/tps80031-regulator.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git

[PATCH 1/3] regulator: tps80031: Remove unused *rdev from struct tps80031_regulator

2019-04-16 Thread Axel Lin
The ri-rdev is assigend but not used, so remove it. Signed-off-by: Axel Lin --- drivers/regulator/tps80031-regulator.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/regulator/tps80031-regulator.c b/drivers/regulator/tps80031-regulator.c index 1001147404c3..d97cd55b6850 100644

[PATCH 2/2] regulator: max8998: Factor out struct voltage_map_desc

2019-04-14 Thread Axel Lin
The struct voltage_map_desc is used for storing min/max/step fileds, and then setup the min_uV, uV_step and n_voltages fields for regulator_desc. Introduce MAX8998_LINEAR_REG/MAX8998_OTHERS_REG macro to setup these filds directly in regulator_desc to simplify the code. Signed-off-by: Axel Lin

[PATCH 1/2] regulator: max8998: Constify regulator_ops

2019-04-14 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/max8998.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/regulator/max8998.c b/drivers/regulator/max8998

[PATCH 2/2] regulator: tps6524x: Remove *rdev[N_REGULATORS] from struct tps6524x

2019-04-13 Thread Axel Lin
Current code is using devm_regulator_register() so we don't need to store *rdev for clean up, use a local variable instead. Signed-off-by: Axel Lin --- drivers/regulator/tps6524x-regulator.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/regulator/tps6524x

[PATCH 1/2] regulator: tps6524x: Constify regulator_ops

2019-04-13 Thread Axel Lin
The regulator_ops is never changed, make it const. Signed-off-by: Axel Lin --- drivers/regulator/tps6524x-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/tps6524x-regulator.c b/drivers/regulator/tps6524x-regulator.c index 67cac2682f50

[PATCH] regulator: tps65218: Convert to use regulator_get_current_limit_regmap

2019-04-12 Thread Axel Lin
Use regulator_get_current_limit_regmap helper to save some code. Signed-off-by: Axel Lin --- drivers/regulator/tps65218-regulator.c | 48 ++ 1 file changed, 19 insertions(+), 29 deletions(-) diff --git a/drivers/regulator/tps65218-regulator.c b/drivers/regulator

[PATCH 1/2] regulator: ab8500: Constify regulator_ops

2019-04-12 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/ab8500.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/regulator/ab8500.c b/drivers/regulator

[PATCH 2/2] regulator: ab8500: Remove *regulator from struct ab8500_regulator_info

2019-04-12 Thread Axel Lin
Current code is using devm_regulator_register() so we don't need to save *regulator for clean up, use a local variable instead. Signed-off-by: Axel Lin --- drivers/regulator/ab8500.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/regulator/ab8500.c b

[PATCH 3/3] regulator: ab8500-ext: Convert to use simplified DT parsing

2019-04-12 Thread Axel Lin
Use regulator core's simplified DT parsing code to simplify the driver implementation. Signed-off-by: Axel Lin --- drivers/regulator/ab8500-ext.c | 28 +--- 1 file changed, 5 insertions(+), 23 deletions(-) diff --git a/drivers/regulator/ab8500-ext.c b/drivers/regulator

[PATCH 2/3] regulator: ab8500-ext: Remove *rdev from struct ab8500_ext_regulator_info

2019-04-12 Thread Axel Lin
Current code is using devm_regulator_register() so we don't need to save *rdev for clean up, use a local variable instead. Signed-off-by: Axel Lin --- drivers/regulator/ab8500-ext.c | 19 --- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/drivers/regulator/ab8500

[PATCH 1/3] regulator: ab8500-ext: Constify ab8500_ext_regulator_ops

2019-04-12 Thread Axel Lin
ab8500_ext_regulator_ops never need to be modified, make it const so compiler can put it to .rodata. Signed-off-by: Axel Lin --- drivers/regulator/ab8500-ext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/ab8500-ext.c b/drivers/regulator/ab8500-ext.c

regulator: ab8500: Question about AB8505_LDO_USB

2019-04-12 Thread Axel Lin
Hi Lee, In ab8500 regulator driver code, I found the AB8505_LDO_USB entry does not has corresponding entry in ab8505_regulator_match. ab8505 support is added by below commit: 547f384f33dbd6171607f925ab246e25e315961e regulator: ab8500: add support for ab8505 For ab8505, I'm wondering if it make

[PATCH 2/3] regulator: db8500-prcmu: Convert to use simplified DT parsing

2019-04-11 Thread Axel Lin
Use regulator core's simplified DT parsing code to simplify the driver implementation. Signed-off-by: Axel Lin --- drivers/regulator/db8500-prcmu.c | 139 ++- 1 file changed, 42 insertions(+), 97 deletions(-) diff --git a/drivers/regulator/db8500-prcmu.c b/drivers

[PATCH 3/3] regulator: dbx500-prcmu: Remove unused fields from struct dbx500_regulator_info

2019-04-11 Thread Axel Lin
The *dev is assigned but not used, remove it. Current driver is using devm_regulator_register(), so no neeed to save *rdev for clean up. Use a local variable instead. Signed-off-by: Axel Lin --- drivers/regulator/db8500-prcmu.c | 10 +- drivers/regulator/dbx500-prcmu.h | 4 2

[PATCH 1/3] regulator: db8500-prcmu: Constify regulator_ops

2019-04-11 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/db8500-prcmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/regulator/db8500-prcmu.c b/drivers/regulator

[PATCH 2/2] regulator: mcp16502: Remove setup_regulators function

2019-04-10 Thread Axel Lin
It seems a little bit odd current code pass struct regulator_config rather than a pointer to setup_regulators. The setup_regulators is so simple and only has one caller, so remove it. Signed-off-by: Axel Lin --- drivers/regulator/mcp16502.c | 37 +++- 1 file

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

2019-04-10 Thread Axel Lin
At the context with rdev, we can use rdev->regmap instead of mcp->rmap. The *rdev[NUM_REGULATORS] is not required because current code uses devm_regulator_register() so we don't need to store *rdev for clean up paths. Signed-off-by: Axel Lin --- drivers/regulator/mcp16502.

[PATCH] regulator: vexpress: Constify regulator_ops

2019-04-10 Thread Axel Lin
vexpress_regulator_ops_ro and vexpress_regulator_ops are never changed, make them const. Signed-off-by: Axel Lin --- drivers/regulator/vexpress-regulator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/regulator/vexpress-regulator.c b/drivers/regulator

  1   2   3   4   5   6   7   8   9   10   >