.
Signed-off-by: Axel Lin
---
drivers/regulator/core.c | 12 +++-
include/linux/regulator/driver.h |6 ++
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 0f65b24..2021086 100644
--- a/drivers/regulator
Signed-off-by: Axel Lin
---
drivers/regulator/88pm8607.c | 43 --
1 file changed, 12 insertions(+), 31 deletions(-)
diff --git a/drivers/regulator/88pm8607.c b/drivers/regulator/88pm8607.c
index 2b55711..21a7334 100644
--- a/drivers/regulator/88pm8607.c
Signed-off-by: Axel Lin
---
drivers/regulator/da9052-regulator.c | 41 +-
1 file changed, 6 insertions(+), 35 deletions(-)
diff --git a/drivers/regulator/da9052-regulator.c
b/drivers/regulator/da9052-regulator.c
index d096309..47455ad 100644
--- a/drivers
Signed-off-by: Axel Lin
---
drivers/regulator/tps6586x-regulator.c | 54 ++--
1 file changed, 10 insertions(+), 44 deletions(-)
diff --git a/drivers/regulator/tps6586x-regulator.c
b/drivers/regulator/tps6586x-regulator.c
index f86da67..1b5e8b9 100644
--- a/drivers
regulator_get_voltage() may return negative error code.
Add error checking to avoid setting error code to st->vref_uv.
Signed-off-by: Axel Lin
---
drivers/iio/adc/ad7266.c |6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/iio/adc/ad7266.c b/drivers/iio/
regulator_get_voltage() may return negative error code.
Add error checking to avoid setting error code to st->vref_uv.
Signed-off-by: Axel Lin
---
drivers/iio/dac/ad5380.c |6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/iio/dac/ad5380.c b/drivers/iio/
regulator_get_voltage() may return negative error code.
Add error checking to avoid setting error code to voltage_uv.
Signed-off-by: Axel Lin
---
drivers/iio/dac/ad5504.c |6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/iio/dac/ad5504.c b/drivers/iio/dac
regulator_get_voltage() may return negative error code.
Add error checking to avoid setting error code to voltage_uv.
Signed-off-by: Axel Lin
---
drivers/iio/dac/ad5624r_spi.c |6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/iio/dac/ad5624r_spi.c b/drivers/iio
regulator_get_voltage() may return negative error code.
Add error checking to avoid setting error code to voltage_uv.
Signed-off-by: Axel Lin
---
drivers/iio/dac/ad5686.c |6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/iio/dac/ad5686.c b/drivers/iio/dac
regulator_get_voltage() may return negative error code.
Don't set error code to to pos_voltage_uv and neg_voltage_uv.
Signed-off-by: Axel Lin
---
drivers/iio/dac/ad5791.c | 13 +++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/drivers/iio/dac/ad5791.c b/driver
regulator_get_voltage() may return negative error code.
Add error checking to avoid setting error code to voltage_uv.
Signed-off-by: Axel Lin
---
v2: check if ret is negative value
drivers/iio/dac/ad5504.c |6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/iio
regulator_get_voltage() may return negative error code.
Add error checking to avoid setting error code to voltage_uv.
Signed-off-by: Axel Lin
---
v2: check if ret is negative value
drivers/iio/dac/ad5624r_spi.c |6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers
regulator_get_voltage() may return negative error code.
Add error checking to avoid setting error code to voltage_uv.
Signed-off-by: Axel Lin
---
v2: check if ret is negative value
drivers/iio/dac/ad5686.c |6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/iio
On failure, request_any_context_irq() returns a negative value.
On success, it returns either IRQC_IS_HARDIRQ or IRQC_IS_NESTED.
Also ensure adc_jack_probe() return 0 on success.
Signed-off-by: Axel Lin
---
drivers/extcon/extcon-adc-jack.c |5 ++---
1 file changed, 2 insertions(+), 3
This driver can be built as a module, add MODULE_LICENSE for it.
For completeness, also adds MODULE_AUTHOR and MODULE_DESCRIPTION.
Signed-off-by: Axel Lin
---
drivers/extcon/extcon-adc-jack.c |5 +
1 file changed, 5 insertions(+)
diff --git a/drivers/extcon/extcon-adc-jack.c b/drivers
Signed-off-by: Axel Lin
---
drivers/gpio/gpio-mvebu.c |3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c
index 902af43..7a874129 100644
--- a/drivers/gpio/gpio-mvebu.c
+++ b/drivers/gpio/gpio-mvebu.c
@@ -381,11 +381,13 @@ static int
Otherwise, we got NULL derefernce while calling backlight_device_unregister()
in tps65217_bl_remove().
Also convert to use module_platform_driver.
Signed-off-by: Axel Lin
---
drivers/video/backlight/tps65217_bl.c | 14 ++
1 file changed, 2 insertions(+), 12 deletions(-)
diff
Signed-off-by: Axel Lin
---
drivers/rtc/rtc-hid-sensor-time.c |1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/rtc/rtc-hid-sensor-time.c
b/drivers/rtc/rtc-hid-sensor-time.c
index 0438c9e..31c5728 100644
--- a/drivers/rtc/rtc-hid-sensor-time.c
+++ b/drivers/rtc/rtc-hid-sensor
The vout address for buck[1|2] can be easily calculated,
thus remote these arrays.
Signed-off-by: Axel Lin
---
drivers/regulator/lp8788-buck.c | 14 ++
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/drivers/regulator/lp8788-buck.c b/drivers/regulator/lp8788-buck.c
Signed-off-by: Axel Lin
---
This patch was sent on https://lkml.org/lkml/2012/12/28/91
This resend re-generate the patch against topic/s5m8767 branch.
drivers/regulator/s5m8767.c | 50 +++
1 file changed, 12 insertions(+), 38 deletions(-)
diff --git a
There is only one caller calling _rdev_to_offset(), and the code
looks simper if we remove _rdev_to_offset(). Thus remove it.
Signed-off-by: Axel Lin
---
drivers/regulator/lp872x.c | 32 +---
1 file changed, 5 insertions(+), 27 deletions(-)
diff --git a/drivers
Signed-off-by: Axel Lin
---
drivers/regulator/wm8994-regulator.c | 57 --
1 file changed, 26 insertions(+), 31 deletions(-)
diff --git a/drivers/regulator/wm8994-regulator.c
b/drivers/regulator/wm8994-regulator.c
index 6ff8723..fef2692 100644
--- a/drivers
wm8994_ldo1_ops and wm8994_ldo2_ops are the same after converting
wm8994_ldo2_ops to use regulator_list_voltage_linear, merge them.
Signed-off-by: Axel Lin
---
drivers/regulator/wm8994-regulator.c | 13 +++--
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/drivers
Use devm_gpio_request_one to save a few error handling code.
Also remove trivial comment for tps62360_remove.
Signed-off-by: Axel Lin
---
drivers/regulator/tps62360-regulator.c | 38 +++-
1 file changed, 8 insertions(+), 30 deletions(-)
diff --git a/drivers
Signed-off-by: Axel Lin
---
drivers/regulator/da9052-regulator.c |3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/regulator/da9052-regulator.c
b/drivers/regulator/da9052-regulator.c
index 88976d8..5f8f71a 100644
--- a/drivers/regulator/da9052-regulator.c
+++ b
the equation to: (This equation is common for linear mapping)
return rdev->desc->min_uV + vsel * rdev->desc->uV_step;
Signed-off-by: Axel Lin
---
drivers/regulator/twl-regulator.c | 17 -
1 file changed, 4 insertions(+), 13 deletions(-)
diff --git
Signed-off-by: Axel Lin
---
drivers/regulator/twl-regulator.c | 24 +++-
1 file changed, 7 insertions(+), 17 deletions(-)
diff --git a/drivers/regulator/twl-regulator.c
b/drivers/regulator/twl-regulator.c
index bb51dec..de99b78 100644
--- a/drivers/regulator/twl
Signed-off-by: Axel Lin
---
Sorry, I CCed wrong guys. So here is the resend.
Axel
drivers/regulator/twl-regulator.c | 24 +++-
1 file changed, 7 insertions(+), 17 deletions(-)
diff --git a/drivers/regulator/twl-regulator.c
b/drivers/regulator/twl-regulator.c
index bb51dec
於 一,2012-07-09 於 11:22 +0800,Axel Lin 提到:
> In twl6030ldo_set_voltage, current code use below formula to calculate vsel:
> vsel = (min_uV/1000 - 1000)/100 + 1;
> This is worng because when min_uV is 100 uV, vsel is 1.
> It should be 0 in this case.
> Fix it by change
Signed-off-by: Axel Lin
---
drivers/regulator/da9055-regulator.c |3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/regulator/da9055-regulator.c
b/drivers/regulator/da9055-regulator.c
index 1a05ac6..3022109 100644
--- a/drivers/regulator/da9055-regulator.c
+++ b/drivers/regulator
We already have enum lp8755_bucks in lp8755.h, so it looks pointless adding
enum bucks in lp8755.c.
Signed-off-by: Axel Lin
---
drivers/regulator/lp8755.c | 50 +++-
1 file changed, 17 insertions(+), 33 deletions(-)
diff --git a/drivers/regulator
Signed-off-by: Axel Lin
---
drivers/video/backlight/l4f00242t03.c | 24 +---
1 file changed, 5 insertions(+), 19 deletions(-)
diff --git a/drivers/video/backlight/l4f00242t03.c
b/drivers/video/backlight/l4f00242t03.c
index 9bef9cf..fb61557 100644
--- a/drivers/video
Use DIV_ROUND_UP to prevent truncation by integer division issue.
This ensures we return enough delay time.
Signed-off-by: Axel Lin
---
v2: Only fix integer division truncation issue, remove other optimization.
drivers/regulator/max8998.c |2 +-
1 file changed, 1 insertion(+), 1 deletion
/regulator/lp8788-buck.c:489:63: warning: array subscript is above array
bounds [-Warray-bounds]
Reported-by: Fengguang Wu
Signed-off-by: Axel Lin
---
Hi Fengguang,
My toolchain does not show the warning you mentioned,
can you test if this patch indeed silence the build warning?
Thanks,
Axe
2016-09-21 12:06 GMT+08:00 Kishon Vijay Abraham I :
>
>
> On Monday 19 September 2016 10:14 PM, Kevin Hilman wrote:
>> Martin Blumenstingl writes:
>>
>>> Hi Axel,
>>>
>>> On Fri, Sep 16, 2016 at 4:07 AM, Axel Lin wrote:
>>>> of_usb
No need to pass _nlr to LP873X_REGULATOR(), use ARRAY_SIZE to calculate it.
Signed-off-by: Axel Lin
---
drivers/regulator/lp873x-regulator.c | 14 ++
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/drivers/regulator/lp873x-regulator.c
b/drivers/regulator/lp873x
It's only used in this driver and never get modified, make it static const.
Signed-off-by: Axel Lin
---
drivers/mfd/altera-a10sr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mfd/altera-a10sr.c b/drivers/mfd/altera-a10sr.c
index c05aa4f..40ed65e 100644
The code to handle AXP803_ID and AXP813_ID cases are exactly the same.
Make the switch-case fall through to avoid duplicate code.
Signed-off-by: Axel Lin
---
drivers/regulator/axp20x-regulator.c | 12 +---
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/drivers/regulator
These functions are only used by this driver, make them static.
Signed-off-by: Axel Lin
---
drivers/regulator/bd9571mwv-regulator.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/regulator/bd9571mwv-regulator.c
b/drivers/regulator/bd9571mwv-regulator.c
Signed-off-by: Axel Lin
---
drivers/regulator/tps65218-regulator.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/regulator/tps65218-regulator.c
b/drivers/regulator/tps65218-regulator.c
index bc489958fed7..b3f89ebfb1a0 100644
--- a/drivers/regulator/tps65218-regulator.c
+++ b
The enum tps65218_regulators is no longer being used after
commit 2dc4940360d4 ("regulator: tps65218: Remove all the compatibles").
Signed-off-by: Axel Lin
---
drivers/regulator/tps65218-regulator.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/regulator/tps65218-regu
Since commit 7e5071199355 ("mfd: tps6105x: Use i2c regmap to access
registers"), we can use regmap helper functions instead of open coded.
Signed-off-by: Axel Lin
---
Hi Grigoryev,
I don't have this h/w, can you help test this patch? Thanks.
This patch depends on commit 7e
This is required since
commit 7e5071199355 ("mfd: tps6105x: Use i2c regmap to access registers").
Signed-off-by: Axel Lin
---
drivers/mfd/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
index 87e84e7..0063c92 100644
--- a/drivers/m
So the drivers can be compiled with CONFIG_RESET_CONTROLLER disabled.
Signed-off-by: Axel Lin
---
include/linux/reset.h | 12
1 file changed, 12 insertions(+)
diff --git a/include/linux/reset.h b/include/linux/reset.h
index da5602b..cd42c1b 100644
--- a/include/linux/reset.h
+++ b
So the drivers can be compiled with CONFIG_RESET_CONTROLLER disabled.
Signed-off-by: Axel Lin
---
v2: Add __must_check and WARN_ON(1); And make it return ERR_PTR(-EINVAL).
include/linux/reset.h | 14 ++
1 file changed, 14 insertions(+)
diff --git a/include/linux/reset.h b/include
Signed-off-by: Axel Lin
---
drivers/reset/reset-ath79.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/reset/reset-ath79.c b/drivers/reset/reset-ath79.c
index d2d2904..9aaf646 100644
--- a/drivers/reset/reset-ath79.c
+++ b/drivers/reset/reset-ath79.c
@@ -89,6 +89,7 @@ static int
Chained irq handlers usually set up handler data as well. We now have
a function to set both under irq_desc->lock. Replace the two calls
with one.
Signed-off-by: Axel Lin
---
drivers/irqchip/irq-i8259.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/irqchip/
Add missing .owner field in regulator_desc, which is used for refcounting.
Signed-off-by: Axel Lin
---
drivers/regulator/isl9305.c | 4
1 file changed, 4 insertions(+)
diff --git a/drivers/regulator/isl9305.c b/drivers/regulator/isl9305.c
index 257c1943e753..9c2607e912cf 100644
--- a
Set it once is enough.
Also move n_voltages close to volt_table for better readability.
Signed-off-by: Axel Lin
---
drivers/regulator/bd71837-regulator.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/regulator/bd71837-regulator.c
b/drivers/regulator/bd71837
The voltages in bd718xx_3rd_nodvs_buck_volts are in ascendant order, so use
regulator_map_voltage_ascend.
Signed-off-by: Axel Lin
---
drivers/regulator/bd718x7-regulator.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/regulator/bd718x7-regulator.c
b/drivers/regulator/bd718x7
Signed-off-by: Axel Lin
---
drivers/regulator/bd71837-regulator.c | 12
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/regulator/bd71837-regulator.c
b/drivers/regulator/bd71837-regulator.c
index 403b45de1262..f57f42ed7160 100644
--- a/drivers/regulator
Signed-off-by: Axel Lin
---
drivers/regulator/bd71837-regulator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/bd71837-regulator.c
b/drivers/regulator/bd71837-regulator.c
index 6eae4d0432a2..403b45de1262 100644
--- a/drivers/regulator/bd71837-regulator.c
The n_voltages setting is not set, fix it.
Signed-off-by: Axel Lin
---
drivers/regulator/mcp16502.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/regulator/mcp16502.c b/drivers/regulator/mcp16502.c
index 25d7b433fafd..ec5b6836a20c 100644
--- a/drivers/regulator/mcp16502.c
+++ b
‘mcp16502_suspend_noirq’?
mcp16502_resume_noirq)
^
./include/linux/pm.h:343:18: note: in definition of macro
‘SET_NOIRQ_SYSTEM_SLEEP_PM_OPS’
.resume_noirq = resume_fn, \
^
Signed-off-by: Axel Lin
---
drivers/regulator/mcp16502.c | 7 ++-
1 file
mcp16502_suspend/resume_noirq is only used by SET_NOIRQ_SYSTEM_SLEEP_PM_OPS
when CONFIG_PM_SLEEP is defined.
So use #ifdef CONFIG_PM_SLEEP instead CONFIG_SUSPEND guard.
Signed-off-by: Axel Lin
---
This patch replaces below patch I sent today.
regulator: mcp16502: Fix build error when
Fix build error when CONFIG_REGMAP_I2C=m && CONFIG_REGULATOR_MCP16502=y.
drivers/regulator/mcp16502.o: In function `mcp16502_probe':
mcp16502.c:(.text+0xca): undefined reference to `__devm_regmap_init_i2c'
Signed-off-by: Axel Lin
---
drivers/regulator/Kconfig | 1 +
1 file ch
Current implementation missed the case BCM590XX_REG_VSR, so
bcm590xx_get_enable_register() returns 0 when id is BCM590XX_REG_VSR.
Signed-off-by: Axel Lin
---
Hi Matt,
Current code looks strange becasue bcm590xx_get_enable_register() returns 0
for BCM590XX_REG_VSR but there is a
Use rdev_get_id() instead of directly access rdev->desc->id.
Signed-off-by: Axel Lin
---
drivers/regulator/act8945a-regulator.c | 11 ++-
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/regulator/act8945a-regulator.c
b/drivers/regulator/act8945a-regulator.c
Fix trival copy-n-paste mistake.
Signed-off-by: Axel Lin
---
drivers/regulator/lochnagar-regulator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/lochnagar-regulator.c
b/drivers/regulator/lochnagar-regulator.c
index 5a89e6d4b9a6..818d20410518 100644
-EINVAL is not a valid return value for .of_map_mode, return
REGULATOR_MODE_INVALID instead.
Signed-off-by: Axel Lin
---
drivers/regulator/stpmic1_regulator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/stpmic1_regulator.c
b/drivers/regulator
All the fields in struct bd718xx_pmic are not really necessary.
Remove struct bd718xx_pmic to simplify the code.
Signed-off-by: Axel Lin
Reviewed-by: Matti Vaittinen
---
v3: Remove the references to struct bd718xx_pmic from
include/linux/mfd/rohm-bd718x7.h
drivers/regulator/bd718x7
All the fields in struct bd718xx_pmic are not really necessary.
Remove struct bd718xx_pmic to simplify the code.
Signed-off-by: Axel Lin
Reviewed-by: Matti Vaittinen
---
v4: Drop the pointer to struct bd718xx_pmic inside the struct bd718xx
v3: Remove the references to struct bd718xx_pmic from
When enable_val is the same as enable_mask and disable_val is 0,
the regulator core will use enable_mask as enable_val by default.
So don't need to explicitly set enable_val and disable_val.
Signed-off-by: Axel Lin
---
drivers/regulator/stpmic1_regulator.c | 17 +
1 file ch
-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
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
Ensure get_voltage return correct voltage if set_voltage fails.
Signed-off-by: Axel Lin
---
drivers/regulator/qcom_rpm-regulator.c | 12
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/regulator/qcom_rpm-regulator.c
b/drivers/regulator/qcom_rpm-regulator.c
Signed-off-by: Axel Lin
---
include/linux/regulator/driver.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h
index d4ad5b5..045f709 100644
--- a/include/linux/regulator/driver.h
+++ b/include/linux/regulator
Current code is using devm_regulator_register(), so we don't need to store *rdev
in struct lp872x for clean up.
Also clean up lp872x_probe() a bit to remove unnecessary goto and num_regulators
variable.
Signed-off-by: Axel Lin
---
drivers/regulator/lp872x.c | 24 +---
1
The mutex lock is not used at all, remove it.
The *vmmc_regulator is not necessary, use a local variable in
stw481x_vmmc_regulator_probe() instead.
Signed-off-by: Axel Lin
Reviewed-by: Linus Walleij
Acked-by: Lee Jones
---
Change the prefix from mfd to regulator.
drivers/regulator/stw481x
vers/phy/phy-qcom-ufs-qmp-14nm.ko]
undefined!
ERROR: "ufs_qcom_phy_remove" [drivers/phy/phy-qcom-ufs-qmp-14nm.ko] undefined!
ERROR: "get_ufs_qcom_phy" [drivers/phy/phy-qcom-ufs-qmp-14nm.ko] undefined!
make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2
Signed-off-by: A
"dev_ref_clk_ctrl_mem" is optional resource, so don't return error if fail to
get the resource. Since it's an optional resource, don't emit error if
fail to get dev_ref_clk_ctrl_mem.
Also remove redundant test for res, it's done by devm_ioremap_resource().
Signed-
This is a common checking in various drivers, so move the checking to
_of_phy_get().
Signed-off-by: Axel Lin
---
drivers/phy/phy-core.c | 6 ++
drivers/phy/phy-miphy28lp.c | 5 -
drivers/phy/phy-miphy365x.c | 5 -
drivers/phy/phy-rcar-gen2.c | 5 -
4 files changed, 6
This is a common checking in various drivers, so move the checking to
_of_phy_get().
Signed-off-by: Axel Lin
---
v2: Fixup the error patch. It needs to call module_put if Requested PHY is
disabled.
drivers/phy/phy-core.c | 12 ++--
drivers/phy/phy-miphy28lp.c | 5
The of_xlate callback should return ERR_PTR on error.
Signed-off-by: Axel Lin
---
v2: Return -ENODEV instead of -EINVAL so that phy_optional_get() doesn't fail.
drivers/phy/phy-spear1310-miphy.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/phy/phy-spea
The of_xlate callback should return ERR_PTR on error.
Signed-off-by: Axel Lin
---
v2: Return -ENODEV instead of -EINVAL so that phy_optional_get() doesn't fail.
drivers/phy/phy-spear1340-miphy.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/phy/phy-spea
Don't pass valid pointer to PTR_ERR, use PTR_ERR(phy) only when
IS_ERR(phy) is true.
Signed-off-by: Axel Lin
---
drivers/phy/phy-core.c | 12
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c
index 3791838f..f112fff 1
Don't pass valid pointer to PTR_ERR, use PTR_ERR(phy) only when
IS_ERR(phy) is true.
Signed-off-by: Axel Lin
---
drivers/phy/phy-core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c
index 3791838f..63bc12d 100644
2015-04-07 22:21 GMT+08:00 Kishon Vijay Abraham I :
> Hi,
>
> On Tuesday 07 April 2015 05:13 PM, Axel Lin wrote:
>>
>> Don't pass valid pointer to PTR_ERR, use PTR_ERR(phy) only when
>> IS_ERR(phy) is true.
>>
>> Signed-off-by: Axel Lin
>> ---
&g
2015-04-09 16:46 GMT+08:00 :
> From: Axel Lin
>
> 3.4.107-rc1 review patch. If anyone has any objections, please let me know.
>
> --
>
>
> commit d297933cc7fcfbaaf2d37570baac73287bf0357d upstream.
>
> Current code tries to find the highest valid fi
This was missing until now and the underlying
_regulator_do_set_voltage is using this value when calling list_voltage.
Signed-off-by: Axel Lin
---
Not very sure if we should implement set_voltage callback for fixed voltage.
( Other drivers do not implement set_voltage callback for fixed voltage
cases to ensure the selected
voltage still in bounds.
Signed-off-by: Axel Lin
---
drivers/regulator/twl-regulator.c | 36
1 file changed, 16 insertions(+), 20 deletions(-)
diff --git a/drivers/regulator/twl-regulator.c
b/drivers/regulator/twl-regulator.c
inde
Signed-off-by: Axel Lin
---
drivers/regulator/twl-regulator.c | 24 +---
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a/drivers/regulator/twl-regulator.c
b/drivers/regulator/twl-regulator.c
index 03d0bea..8dae1e3 100644
--- a/drivers/regulator/twl
Pass regulator id rahter than the index to lp872x_find_regulator_init_data(),
then the code can be simpler.
We can also get max_regulators by lp->num_regulators.
Signed-off-by: Axel Lin
---
drivers/regulator/lp872x.c | 28 +++-
1 file changed, 7 insertions(+),
> On Monday 09 July 2012 04:31 PM, Axel Lin wrote:
> > 於 一,2012-07-09 於 11:22 +0800,Axel Lin 提到:
> >> In twl6030ldo_set_voltage, current code use below formula to calculate
> >> vsel:
> >> vsel = (min_uV/1000 - 1000)/100 + 1;
> >> This is wor
This patch implements the list_voltage callback based on above table.
Signed-off-by: Axel Lin
---
drivers/regulator/twl-regulator.c | 31 ---
1 file changed, 24 insertions(+), 7 deletions(-)
diff --git a/drivers/regulator/twl-regulator.c
b/drivers/regulator/twl
The mask used in anatop_get_voltage_sel does not match the mask used in
anatop_set_voltage_sel.
We need to do left shift anatop_reg->vol_bit_shift bits for the correct mask.
Signed-off-by: Axel Lin
---
drivers/regulator/anatop-regulator.c |5 +++--
1 file changed, 3 insertions(+)
ake into account with the multiplier set in VSEL register when
calculating selector in palmas_map_voltage_smps()
Signed-off-by: Axel Lin
---
drivers/regulator/palmas-regulator.c | 17 ++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/drivers/regulator/pal
The ramp_delay settings were missing while converting to
regulator_set_voltage_time_sel(). Fix it.
There is no ramp_delay setting for s2mps11_ldo_ops, thus remove
setting set_voltage_sel callback for s2mps11_ldo_ops.
Signed-off-by: Axel Lin
---
drivers/regulator/s2mps11.c | 27
han requested min_uV.
For example, if the requested min_uV is 945000, current code chooses
selector = 1 which is lower than requested min_uV.
DIV_ROUND_UP to avoid this case.
Signed-off-by: Axel Lin
---
drivers/regulator/palmas-regulator.c |9 ++---
1 file changed, 6 insertions(+)
Signed-off-by: Axel Lin
---
drivers/regulator/palmas-regulator.c |4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/regulator/palmas-regulator.c
b/drivers/regulator/palmas-regulator.c
index 0fcf355..9e3e7f3 100644
--- a/drivers/regulator/palmas-regulator.c
+++ b
Also remove palmas_ldo_write() function because it is not used after this
conversion.
Signed-off-by: Axel Lin
---
drivers/regulator/palmas-regulator.c | 55 --
1 file changed, 5 insertions(+), 50 deletions(-)
diff --git a/drivers/regulator/palmas-regulator.c
於 三,2012-07-18 於 11:49 +0800,Axel Lin 提到:
> Also remove palmas_ldo_write() function because it is not used after this
> conversion.
Oh. Just found another issue in current code.
Current code in palmas_ldo_init() calls palmas_smps_[read|write]
is wrong. It should call palmas_ldo_[read
han requested min_uV.
For example, if the requested min_uV is 945000, current code chooses
selector = 1 which is lower than requested min_uV.
DIV_ROUND_UP to avoid this case.
Signed-off-by: Axel Lin
---
drivers/regulator/palmas-regulator.c |9 ++---
1 file changed, 6 insertions(+)
Signed-off-by: Axel Lin
---
drivers/regulator/palmas-regulator.c |4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/regulator/palmas-regulator.c
b/drivers/regulator/palmas-regulator.c
index 0fcf355..9e3e7f3 100644
--- a/drivers/regulator/palmas-regulator.c
+++ b
Current code uses wrong calls palmas_smps_[read|write] in palmas_ldo_init(),
should be palmas_ldo_[read|write] instead.
Signed-off-by: Axel Lin
---
drivers/regulator/palmas-regulator.c |4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/regulator/palmas
registered in this for loop iteration.
Signed-off-by: Axel Lin
---
drivers/regulator/palmas-regulator.c |6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/regulator/palmas-regulator.c
b/drivers/regulator/palmas-regulator.c
index de68347..46c7e88 100644
--- a/drivers
Signed-off-by: Axel Lin
---
drivers/regulator/palmas-regulator.c | 45 --
1 file changed, 5 insertions(+), 40 deletions(-)
diff --git a/drivers/regulator/palmas-regulator.c
b/drivers/regulator/palmas-regulator.c
index 46c7e88..2ba7502 100644
--- a/drivers
Then we can remove lock/unlock around the caller.
Signed-off-by: Axel Lin
---
drivers/regulator/mc13783-regulator.c | 22 --
1 file changed, 8 insertions(+), 14 deletions(-)
diff --git a/drivers/regulator/mc13783-regulator.c
b/drivers/regulator/mc13783-regulator.c
index
Then we can remove lock/unlock around the caller.
Signed-off-by: Axel Lin
---
drivers/regulator/mc13892-regulator.c | 22 --
1 file changed, 8 insertions(+), 14 deletions(-)
diff --git a/drivers/regulator/mc13892-regulator.c
b/drivers/regulator/mc13892-regulator.c
index
leave MC13892_SWITCHERS0_SWxHI bit untouched
We already know the selector, so we don't need to calculate the selector again.
Signed-off-by: Axel Lin
---
drivers/regulator/mc13892-regulator.c | 42 -
1 file changed, 15 insertions(+), 27 deletions(-)
d
601 - 700 of 1317 matches
Mail list logo