[PATCH 2/2] regulator: lp8788: Implement list_voltage for lp8788_ldo_voltage_fixed_ops

2013-04-01 Thread Axel Lin
For fixed voltage, we can just set min_uV and use regulator_list_voltage_linear for list_voltage callback. Regulator core will call list_voltage(rdev, 0) if both get_voltage get_voltage_sel are not implemented. Thus we can also remove lp8788_ldo_fixed_get_voltage() function. Signed-off-by: Axel

[PATCH] regulator: ab8500: Staticize ab8500_ext_regulator_[init|exit] if !CONFIG_REGULATOR_AB8500_EXT

2013-04-01 Thread Axel Lin
-mop500.o:/home/axel/repos/git/regulator/include/linux/regulator/ab8500.h:335: first defined here make[1]: *** [arch/arm/mach-ux500/built-in.o] Error 1 make: *** [arch/arm/mach-ux500] Error 2 Signed-off-by: Axel Lin --- include/linux/regulator/ab8500.h |4 ++-- 1 file changed, 2 insertions(+),

[PATCH RFT] regulator: ab8500: Fix build error

2013-04-01 Thread Axel Lin
top level: drivers/regulator/ab8500.c:2619:34: warning: 'ab8505_regulator_match' defined but not used [-Wunused-variable] drivers/regulator/ab8500.c:2635:34: warning: 'ab8540_regulator_match' defined but not used [-Wunused-variable] make[2]: *** [drivers/regulator/ab8500.o] Err

[RFT][PATCH 1/2] regulator: ab8500: Fix list_voltage for fixed voltage regulators

2013-04-01 Thread Axel Lin
ned-off-by: Axel Lin --- drivers/regulator/ab8500.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/regulator/ab8500.c b/drivers/regulator/ab8500.c index 09eea32..5fd764e 100644 --- a/drivers/regulator/ab8500.c +++ b/drivers/regulator/ab8500.c @@ -423,14 +423,14

[RFT][PATCH 2/2] regulator: ab8500: Add missing volt_table setting for AB8540_LDO_TVOUT

2013-04-01 Thread Axel Lin
This is required for regulator_list_voltage_table() to properly work. Signed-off-by: Axel Lin --- Hi, The setting is copied from AB8500_LDO_TVOUT, I don't have the datasheet. Can someone test and review if this patch is correct or not? Axel drivers/regulator/ab8500.c |1 + 1 file ch

[PATCH] dmaengine: mmp_pdma: Remove duplicate code to set DMA_SLAVE capability

2013-03-07 Thread Axel Lin
Signed-off-by: Axel Lin --- drivers/dma/mmp_pdma.c |1 - 1 file changed, 1 deletion(-) diff --git a/drivers/dma/mmp_pdma.c b/drivers/dma/mmp_pdma.c index c26699f..3d0f51b 100644 --- a/drivers/dma/mmp_pdma.c +++ b/drivers/dma/mmp_pdma.c @@ -825,7 +825,6 @@ static int mmp_pdma_probe(struct

[PATCH] regulator: wm8400: Simplify set REGULATOR_MODE_IDLE mode in wm8400_dcdc_set_mode

2012-07-31 Thread Axel Lin
To set REGULATOR_MODE_IDLE mode, what we do is to clear DC1_ACTIVE and DC1_SLEEP bits, this can be done in one wm8400_set_bits() call. Signed-off-by: Axel Lin --- drivers/regulator/wm8400-regulator.c |7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/regulator

[PATCH RFT] leds: lp8788: Fix updating scale configuration bits

2012-08-01 Thread Axel Lin
We need to do left shift (cfg->num + LP8788_ISINK_SCALE_OFFSET) bits for updating scale configuration. Signed-off-by: Axel Lin --- Hi Milo, Current code of updating scale configuration bits looks wrong to me because the mask does not match the val. I don't have this hardware, can you t

[PATCH] iio: lm3533-als: Fix build warnings

2012-08-02 Thread Axel Lin
default] Signed-off-by: Axel Lin --- drivers/iio/light/lm3533-als.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/light/lm3533-als.c b/drivers/iio/light/lm3533-als.c index c3e7bac..e45712a9 100644 --- a/drivers/iio/light/lm3533-als.c +++ b/drivers/ii

[PATCH] pwm: Remove a redundant error message when devm_request_and_ioremap fails

2012-08-03 Thread Axel Lin
The implementation in devm_request_and_ioremap() already shows error message, so no need to show dev_err again if devm_request_and_ioremap() fails. Signed-off-by: Axel Lin Cc: Stephen Warren Cc: Philip, Avinash --- drivers/pwm/pwm-tegra.c|4 +--- drivers/pwm/pwm-tiecap.c |4

Re: [PATCH] regulator: core: Add intermediate cast to uintptr_t before casting to pointer

2012-08-05 Thread Axel Lin
2012/8/3 Mark Brown : > On Wed, Aug 01, 2012 at 12:08:08AM +0800, Axel Lin wrote: >> 於 二,2012-07-31 於 16:41 +0100,Mark Brown 提到: > >> > So the above cast probably isn't right... you shouldn't need a double >> > cast here. > >> The issue of orig

Re: [PATCH] regulator: ab3100: add missing voltage table

2012-08-06 Thread Axel Lin
; it works like a charm. > > Cc: Axel Lin > Signed-off-by: Linus Walleij Acked-by: Axel Lin -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majord

[PATCH] regulator: core: Fix cast to pointer from integer of different size warning

2012-08-06 Thread Axel Lin
to-pointer-cast] This patch adds a temporary variable to avoid double cast. Signed-off-by: Axel Lin --- drivers/regulator/core.c |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index b28221a..5f22210 100644 ---

Re: [PATCH RFT] regulator: ab8500: Set enable enable_time in regulator_desc

2012-08-06 Thread Axel Lin
2012/7/4 Mark Brown : > On Wed, Jul 04, 2012 at 10:31:45AM +0800, Axel Lin wrote: >> Signed-off-by: Axel Lin >> --- >> Hi Linus, >> While working on this patch, I found in original code: >> ab8500_regulator_ops set enable_time callback to >> ab8500_regulat

[PATCH] regulator: max8907: Add MODULE_ALIAS

2012-08-24 Thread Axel Lin
This driver can be built as a module, add MODULE_ALIAS for it. Signed-off-by: Axel Lin --- drivers/regulator/max8907-regulator.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/regulator/max8907-regulator.c b/drivers/regulator/max8907-regulator.c index 3a5104f..19c765a 100644

Re: [PATCH] mfd: Use devm_* APIs for mc13xxx: remove leftover kfree

2012-09-17 Thread Axel Lin
zsch Reviewed-by: Axel Lin -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

[PATCH] cpufreq: OMAP: Check IS_ERR() instead of NULL for omap_device_get_by_hwmod_name

2012-09-17 Thread Axel Lin
omap_device_get_by_hwmod_name() returns ERR_PTR on error. Signed-off-by: Axel Lin --- drivers/cpufreq/omap-cpufreq.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/cpufreq/omap-cpufreq.c b/drivers/cpufreq/omap-cpufreq.c index 6e22f44..65f8e9a 100644 --- a

[PATCH] ARM: OMAP: OMAP_DEBUG_LEDS needs to select LEDS_CLASS

2012-09-17 Thread Axel Lin
This fixes below build error when CONFIG_LEDS_CLASS is not set. LD init/built-in.o arch/arm/plat-omap/built-in.o: In function `fpga_probe': arch/arm/plat-omap/debug-leds.c:113: undefined reference to `led_classdev_register' make: *** [vmlinux] Error 1 Signed-off-by: Axel Lin

Re: [PATCH] ARM: OMAP: OMAP_DEBUG_LEDS needs to select LEDS_CLASS

2012-09-17 Thread Axel Lin
2012/9/18 Bryan Wu : > On Tue, Sep 18, 2012 at 11:30 AM, Axel Lin wrote: >> This fixes below build error when CONFIG_LEDS_CLASS is not set. >> >> LD init/built-in.o >> arch/arm/plat-omap/built-in.o: In function `fpga_probe': >> arch/arm/plat-omap/de

[PATCH RFT] memory: tegra{20,30}-mc: Fix reading incorrect register in mc_readl()

2012-09-19 Thread Axel Lin
The code reading the register does not match the code writing to the register, fix it. Also fix the coding style in mc_writel() for better readability. Signed-off-by: Axel Lin --- drivers/memory/tegra20-mc.c | 10 +++--- drivers/memory/tegra30-mc.c | 22 +++--- 2 files

Re: [PATCH RFT] memory: tegra{20,30}-mc: Fix reading incorrect register in mc_readl()

2012-09-20 Thread Axel Lin
2012/9/21 Stephen Warren : > On 09/19/2012 07:32 PM, Axel Lin wrote: >> The code reading the register does not match the code writing to the >> register, >> fix it. >> >> Also fix the coding style in mc_writel() for better readability. > > I assume RFT

[PATCH RESEND] regulator: ab8500: Set enable enable_time in regulator_desc

2012-08-07 Thread Axel Lin
Signed-off-by: Axel Lin Acked-by: Linus Walleij --- drivers/regulator/ab8500.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/regulator/ab8500.c b/drivers/regulator/ab8500.c index 13d424f..6230c40 100644 --- a/drivers/regulator/ab8500.c +++ b/drivers

[PATCH] power_supply: Remove broken mark for da9052-battery

2012-08-08 Thread Axel Lin
The fix for MFD part is already merged so we can remove the broken mark for da9052-battery. Signed-off-by: Axel Lin --- drivers/power/Kconfig |1 - 1 file changed, 1 deletion(-) diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig index c1892f3..fcc1bb0 100644 --- a/drivers/power

[PATCH 1/7] regulator: Update comment for set_current_limit callback of struct regulator_ops

2012-08-08 Thread Axel Lin
The regulators should be tending to the maximum in the available range and consumers should specify the widest range possible. Signed-off-by: Axel Lin --- include/linux/regulator/driver.h |1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/regulator/driver.h b/include/linux

[PATCH 2/7] regulator: wm8350: set_current_limit should select the maximum current in specific range

2012-08-08 Thread Axel Lin
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 7f0fa22..1e4f69e 100644 --- a/drivers/regulator/wm8350-regulator.c +++ b

[PATCH 3/7] regulator: wm831x-isink: set_current_limit should select the maximum current in specific range

2012-08-08 Thread Axel Lin
Signed-off-by: Axel Lin --- drivers/regulator/wm831x-isink.c |9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/regulator/wm831x-isink.c b/drivers/regulator/wm831x-isink.c index 0d207c2..5dba339 100644 --- a/drivers/regulator/wm831x-isink.c +++ b/drivers

[PATCH 4/7] regulator: wm831x-dcdc: set_current_limit should select the maximum current in specific range

2012-08-08 Thread Axel Lin
Signed-off-by: Axel Lin --- drivers/regulator/wm831x-dcdc.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/regulator/wm831x-dcdc.c b/drivers/regulator/wm831x-dcdc.c index 7413885..90cbcc6 100644 --- a/drivers/regulator/wm831x-dcdc.c +++ b/drivers

[PATCH 5/7] regulator: tps6524x: set_current_limit should select the maximum current in specific range

2012-08-08 Thread Axel Lin
Signed-off-by: Axel Lin --- drivers/regulator/tps6524x-regulator.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/regulator/tps6524x-regulator.c b/drivers/regulator/tps6524x-regulator.c index 947ece9..058d2f2 100644 --- a/drivers/regulator/tps6524x

[PATCH 6/7] regulator: lp872x: set_current_limit should select the maximum current in specific range

2012-08-08 Thread Axel Lin
Signed-off-by: Axel Lin --- drivers/regulator/lp872x.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/drivers/regulator/lp872x.c b/drivers/regulator/lp872x.c index 212c38e..6199d0f 100644 --- a/drivers/regulator/lp872x.c +++ b/drivers/regulator/lp872x.c

[PATCH 7/7] regulator: da9052: set_current_limit should select the maximum current in specific range

2012-08-08 Thread Axel Lin
Signed-off-by: Axel Lin --- drivers/regulator/da9052-regulator.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/regulator/da9052-regulator.c b/drivers/regulator/da9052-regulator.c index 903299c..27355b1 100644 --- a/drivers/regulator/da9052-regulator.c +++ b

[PATCH 1/6] regulator: core: Add checking n_voltages if using list_voltage() to read voltage regulators

2012-08-09 Thread Axel Lin
Use list_voltage() to read single voltage regulators should be only applied to single voltage regulators, thus add checking n_voltages for this case. Signed-off-by: Axel Lin --- drivers/regulator/core.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/regulator

[PATCH 2/6] regulator: ab3100: Remove get_voltage implementation for regulator_ops_fixed

2012-08-09 Thread Axel Lin
This is not required after commit f7df20ec "regulator: core: Use list_voltage() to read single voltage regulators" Signed-off-by: Axel Lin --- drivers/regulator/ab3100.c |6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/regulator/ab3100.c b/drivers/regulator/ab31

[PATCH 3/6] regulator: ab8500: Remove get_voltage implementation for ab8500_regulator_fixed_ops

2012-08-09 Thread Axel Lin
This is not required after commit f7df20ec "regulator: core: Use list_voltage() to read single voltage regulators" Signed-off-by: Axel Lin --- drivers/regulator/ab8500.c |6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/regulator/ab8500.c b/drivers/regulator/ab85

[PATCH 4/6] regulator: isl6271a: Remove get_voltage implementation for isl_fixed_ops

2012-08-09 Thread Axel Lin
This is not required after commit f7df20ec "regulator: core: Use list_voltage() to read single voltage regulators" Signed-off-by: Axel Lin --- drivers/regulator/isl6271a-regulator.c |6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/regulator/isl6271a-regulator.c

[PATCH 5/6] regulator: twl: Remove get_voltage implementation for single voltage regulators

2012-08-09 Thread Axel Lin
This is not required after commit f7df20ec "regulator: core: Use list_voltage() to read single voltage regulators" Signed-off-by: Axel Lin --- drivers/regulator/twl-regulator.c | 11 --- 1 file changed, 11 deletions(-) diff --git a/drivers/regulator/twl-regulator.c

[PATCH 6/6] regulator: mc13xxx: Remove get_voltage implementation for single voltage regulators

2012-08-09 Thread Axel Lin
This is not required after commit f7df20ec "regulator: core: Use list_voltage() to read single voltage regulators" Signed-off-by: Axel Lin --- drivers/regulator/mc13783-regulator.c |1 - drivers/regulator/mc13892-regulator.c |1 - drivers/regulator/mc13xxx-regula

[PATCH] leds: wm8350: Convert to devm_regulator_get()

2012-08-09 Thread Axel Lin
Signed-off-by: Axel Lin --- drivers/leds/leds-wm8350.c | 29 +++-- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/drivers/leds/leds-wm8350.c b/drivers/leds/leds-wm8350.c index 918d4ba..f5d9ac3 100644 --- a/drivers/leds/leds-wm8350.c +++ b/drivers/leds

Re: [PATCH 1/6] regulator: core: Add checking n_voltages if using list_voltage() to read voltage regulators

2012-08-10 Thread Axel Lin
2012/8/10 Mark Brown : > On Fri, Aug 10, 2012 at 09:32:33AM +0800, Axel Lin wrote: >> Use list_voltage() to read single voltage regulators should be only applied >> to >> single voltage regulators, thus add checking n_voltages for this case. > > We should be failing t

Re: [PATCH 1/6] regulator: core: Add checking n_voltages if using list_voltage() to read voltage regulators

2012-08-10 Thread Axel Lin
2012/8/10 Mark Brown : > On Fri, Aug 10, 2012 at 08:27:32PM +0800, Axel Lin wrote: >> 2012/8/10 Mark Brown : > >> > We should be failing to register these regulators in the first place, or >> > at least complaining extremely loudly about them. > >> Oh. My

[PATCH] regulator: max8907: Fix n_voltages for MAX8907B SD1

2012-08-15 Thread Axel Lin
For linear voltage mapping, the n_voltages is (max - min) / step + 1 Signed-off-by: Axel Lin --- drivers/regulator/max8907-regulator.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/regulator/max8907-regulator.c b/drivers/regulator/max8907-regulator.c index

[PATCH] extcon: extcon_gpio: Replace gpio_request_one by devm_gpio_request_one

2012-07-23 Thread Axel Lin
commit 01eaf24 "extcon: Convert extcon_gpio to devm_gpio_request_one" missed the replacement for devm_gpio_request_one. fix it. Signed-off-by: Axel Lin --- drivers/extcon/extcon_gpio.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/extcon/extco

[PATCH RFT] leds: max8997: Simplify max8997_led_set_mode implementation

2012-07-23 Thread Axel Lin
It is not necessary to call max8997_update_reg() twice just for updating MAX8997_REG_LEN_CNTL register. With proper val and mask arguments to max8997_update_reg() call, this can be done in one max8997_update_reg() call. And then we can remove max8997_led_clear_mode() function. Signed-off-by: Axel

[PATCH] gpio: msic: Fix calculating register address in msic_gpio_to_oreg()

2012-07-24 Thread Axel Lin
offset is 22: INTEL_MSIC_GPIO1HV2CTLO offset is 23: INTEL_MSIC_GPIO1HV3CTLO Signed-off-by: Axel Lin --- drivers/gpio/gpio-msic.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/gpio-msic.c b/drivers/gpio/gpio-msic.c index 71a838f..b389862 100644

[PATCH RFT] regulator: tps6586x: Convert to regulator_[enable|disable|is_enabled|get_voltage_sel]_regmap

2012-07-24 Thread Axel Lin
Signed-off-by: Axel Lin --- This patch depends on Laxman's patches converting tps6586x mfd driver to use regmap APIs. ( merged in mfd tree ) drivers/regulator/tps6586x-regulator.c | 76 +--- 1 file changed, 11 insertions(+), 65 deletions(-) diff --git a/dr

[PATCH] regulator: max8907: Properly set pmic pointer in max8907_regulator_remove()

2012-08-17 Thread Axel Lin
'pmic' is used uninitialized in this function [-Wuninitialized] Signed-off-by: Axel Lin --- drivers/regulator/max8907-regulator.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/max8907-regulator.c b/drivers/regulator/max8907-regulator.c in

regulator: max8907: build error when CONFIG_OF is not set

2012-08-17 Thread Axel Lin
Hi Stephen, I got below build error when CONFIG_OF is not set: CC [M] drivers/regulator/max8907-regulator.o drivers/regulator/max8907-regulator.c: In function 'max8907_regulator_probe': drivers/regulator/max8907-regulator.c:297:12: error: 'max8907_matches' undeclared (first use in this functi

Re: [PATCH] regulator: ab8500: fix voltage selector regression

2012-08-20 Thread Axel Lin
於 一,2012-08-20 於 14:18 +0200,Linus Walleij 提到: > From: Linus Walleij > > Commit 3bf6e90e476fb34ca47b6dda270f41d9cebcb1ac > "regulator: Convert ab8499 to use get_voltage_sel()" > and commit ae713d394d9e2aacaab620acd3212855f1f06b00 > "regulator: Convert ab8500 to set_voltage_sel" > corrupted the vo

Re: [PATCH] regulator: max8907: fix compile error when !CONFIG_OF

2012-08-20 Thread Axel Lin
> + > +static inline struct regulator_init_data *match_init_data(int index) > +{ > + return NULL; > +} > + Now match_init_data() returns NULL if !CONFIG_OF, so idata may be NULL. Then I think we may hit NULL pointer dereference here: switch (pmic->desc[i].id) {

Re: [PATCH] regulator: max8907: Properly set pmic pointer in max8907_regulator_remove()

2012-08-20 Thread Axel Lin
2012/8/20 Stephen Warren : > On 08/18/2012 12:33 AM, Axel Lin wrote: >> Add missing platform_get_drvdata() call in max8907_regulator_remove(), this >> fixes below build warning: >> >> CC [M] drivers/regulator/max8907-regulator.o >> drivers/regulator

[PATCH] gpio: bt8xx: Fix build error due to missing include file

2012-08-21 Thread Axel Lin
: *** [drivers] Error 2 drivers/media/video/bt8xx/bt848.h is moved to drivers/media/pci/bt8xx/bt848.h by commit 68de959f773a1d49096835c411390bceff5d1549 "[media] bt8xx: move analog TV part to be together with DTV one". Signed-off-by: Axel Lin Cc: Mauro Carvalho Chehab --- drivers/gpio/gp

[PATCH] mfd: Guard max77686_pmic_dt_match with CONFIG_OF

2012-07-09 Thread Axel Lin
This fixes below build warning if CONFIG_OF is not set. CC drivers/mfd/max77686.o drivers/mfd/max77686.c:37:42: warning: 'max77686_pmic_dt_match' defined but not used [-Wunused-variable] Signed-off-by: Axel Lin --- drivers/mfd/max77686.c | 10 +- 1 file changed, 5

[PATCH] mfd: Export pm80x_regmap_config

2012-07-09 Thread Axel Lin
This fixes below build error when CONFIG_MFD_88PM800=m. ERROR: "pm80x_regmap_config" [drivers/mfd/88pm800.ko] undefined! make[1]: *** [__modpost] Error 1 make: *** [modules] Error 2 Signed-off-by: Axel Lin --- drivers/mfd/88pm80x.c |1 + 1 file changed, 1 insertion(+) diff --git

[PATCH RFT] regulator: max8952: Use core GPIO enable support

2012-07-09 Thread Axel Lin
Signed-off-by: Axel Lin --- drivers/regulator/max8952.c | 59 +++ 1 file changed, 4 insertions(+), 55 deletions(-) diff --git a/drivers/regulator/max8952.c b/drivers/regulator/max8952.c index ea58a44..355ca7b 100644 --- a/drivers/regulator/max8952.c

[PATCH] mfd: Fix checking return value of regmap_read()

2012-07-10 Thread Axel Lin
Check the return value of regmap_read() rather than the read value. Signed-off-by: Axel Lin --- drivers/mfd/88pm800.c | 16 +--- drivers/mfd/88pm805.c |5 +++-- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/drivers/mfd/88pm800.c b/drivers/mfd/88pm800.c index

[PATCH] mfd: Remove __devexit annotation for pm80x_deinit

2012-07-10 Thread Axel Lin
__devexit pm80x_deinit(). This is often seen when error handling in the init function uses functionality in the exit path. The fix is often to remove the __devexit annotation of pm80x_deinit() so it may be used outside an exit section. Signed-off-by: Axel Lin --- drivers/mfd/88pm80x.c |2

[PATCH v2] mfd: Remove __devexit annotation for pm80x_deinit

2012-07-10 Thread Axel Lin
__devexit pm80x_deinit(). This is often seen when error handling in the init function uses functionality in the exit path. The fix is often to remove the __devexit annotation of pm80x_deinit() so it may be used outside an exit section. Signed-off-by: Axel Lin --- v2: Also remove the __devexit

[PATCH] mfd: Remove unneeded io_mutex from struct twl6040

2012-07-10 Thread Axel Lin
Current code has been converted to use regmap APIs, the io_mutex is not needed. Thus remove the io_mutex. Signed-off-by: Axel Lin --- drivers/mfd/twl6040-core.c | 23 +++ include/linux/mfd/twl6040.h |1 - 2 files changed, 3 insertions(+), 21 deletions(-) diff --git a

Re: [PATCH RFT] watchdog: Convert orion_wdt driver to watchdog core

2012-07-10 Thread Axel Lin
於 一,2012-06-18 於 16:01 +0200,Andrew Lunn 提到: > On Fri, Jun 15, 2012 at 03:22:44PM +0800, Axel Lin wrote: > > Convert the orion_wdt driver to the watchdog framework API. > > > > Signed-off-by: Axel Lin > > Hi Axel > > Tested-by: Andrew Lunn Hi Wim, This patch

[PATCH RFT] regulator: tps65910: Remvoe tps65910_reg_[read|modify_bits|read_locked|write_locked] functions

2012-07-11 Thread Axel Lin
] functions. With this change, we can also remove the mutex in struct tps65910_reg. Signed-off-by: Axel Lin --- drivers/regulator/tps65910-regulator.c | 184 +--- include/linux/mfd/tps65910.h |6 ++ 2 files changed, 79 insertions(+), 111 deletions(-) diff --git

[PATCH 1/3] regulator: s2mps11: Fixup missing commas

2012-07-11 Thread Axel Lin
Signed-off-by: Axel Lin --- drivers/regulator/s2mps11.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c index 514cf54..da8c3d1 100644 --- a/drivers/regulator/s2mps11.c +++ b/drivers/regulator/s2mps11.c

[PATCH 2/3] regulator: s2mps11: Fix wrong setting for config.dev

2012-07-11 Thread Axel Lin
Currently s2mps11->iodev, s2mps11->dev and config.dev point to NULL. This patch fixes the settings for config.dev. Current code does not need the *dev and *iodev of struct s2mps11_info, so remove them. Signed-off-by: Axel Lin --- drivers/regulator/s2mps11.c | 14 +- 1 file c

[PATCH 3/3] regulator: s2mps11: Use sec_reg_write rather than sec_reg_update when mask is 0xff

2012-07-11 Thread Axel Lin
Signed-off-by: Axel Lin --- drivers/regulator/s2mps11.c |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c index b3c2705..4669dc9 100644 --- a/drivers/regulator/s2mps11.c +++ b/drivers/regulator/s2mps11.c

[PATCH] regulator: da9052: initialize of_node param for regulator register

2012-07-12 Thread Axel Lin
Initialize config.of_node for regulator before registering. This is needed for DT based regulator support. Signed-off-by: Axel Lin --- drivers/regulator/da9052-regulator.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/regulator/da9052-regulator.c b/drivers/regulator/da9052

[PATCH] regulator: s2mps11: Use array to save pointer to rdev

2012-07-12 Thread Axel Lin
The number of regulator is known at compile time, use array to save pointer to rdev makes the code simpler. Signed-off-by: Axel Lin --- drivers/regulator/s2mps11.c | 27 --- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/drivers/regulator/s2mps11.c b

[PATCH 1/2] regulator: tps65217: Fix using wrong dev argument for calling of_regulator_match

2013-01-23 Thread Axel Lin
probe() is called, thus it should be freed when this driver is unloaded. 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/drivers/regulator/tps65217-regulator.c ind

[PATCH 2/2] regulator: tps65910: Fix using wrong dev argument for calling of_regulator_match

2013-01-23 Thread Axel Lin
is called, thus it should be freed when this driver is unloaded. Signed-off-by: Axel Lin --- drivers/regulator/tps65910-regulator.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/tps65910-regulator.c b/drivers/regulator/tps65910-regulator.c index 59c377

[PATCH] regulator: tps51632: Use regulator_[get|set]_voltage_sel_regmap

2013-02-13 Thread Axel Lin
Signed-off-by: Axel Lin --- drivers/regulator/tps51632-regulator.c | 52 +--- 1 file changed, 8 insertions(+), 44 deletions(-) diff --git a/drivers/regulator/tps51632-regulator.c b/drivers/regulator/tps51632-regulator.c index 7560d07..6e67be7 100644 --- a/drivers

[RFC/RFT][PATCH 1/3] regulator: core: Add enable_pulldown flag to indicate pulldown on EN input

2013-02-15 Thread Axel Lin
Add enable_pulldown flag to indicate pulldown on EN input when using regulator_enable_regmap and friends APIs. Signed-off-by: Axel Lin --- drivers/regulator/core.c | 24 include/linux/regulator/driver.h |3 +++ 2 files changed, 23 insertions(+), 4

[RFC/RFT][PATCH 2/3] regulator: 88pm8607: Use enable_pulldown flag with regulator_enable_regmap and friends APIs

2013-02-15 Thread Axel Lin
Signed-off-by: Axel Lin --- drivers/regulator/88pm8607.c | 36 1 file changed, 4 insertions(+), 32 deletions(-) diff --git a/drivers/regulator/88pm8607.c b/drivers/regulator/88pm8607.c index c79ab84..0a8d514 100644 --- a/drivers/regulator/88pm8607.c +++ b

[RFC/RFT][PATCH 3/3] regulator: max8649: Use enable_pulldown flag with regulator_enable_regmap and friends APIs

2013-02-15 Thread Axel Lin
Signed-off-by: Axel Lin --- drivers/regulator/max8649.c | 39 ++- 1 file changed, 6 insertions(+), 33 deletions(-) diff --git a/drivers/regulator/max8649.c b/drivers/regulator/max8649.c index 3ca1438..6dab 100644 --- a/drivers/regulator/max8649.c +++ b

[PATCH] regulator: max8925: Remove unused parameter from max8925_regulator_dt_init

2013-02-15 Thread Axel Lin
The info parameter is not used at all, remove it. Signed-off-by: Axel Lin --- drivers/regulator/max8925-regulator.c |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/regulator/max8925-regulator.c b/drivers/regulator/max8925-regulator.c index 0d5f64a..3597da8

[PATCH] regulator: twl: Remove VDD1_VSEL_table and VDD2_VSEL_table

2013-02-15 Thread Axel Lin
Since commit ba305e31 "regulator: twl: fix twl4030 support for smps regulators", VDD1_VSEL_table and VDD2_VSEL_table are not used any more. Remove them. Signed-off-by: Axel Lin --- drivers/regulator/twl-regulator.c |6 -- 1 file changed, 6 deletions(-) diff --git a/drivers

[PATCH] regulator: twl: Convert twl4030ldo_ops to get_voltage_sel

2013-02-15 Thread Axel Lin
This fixes an inconsistent behavior between list_voltage() and get_voltage() because current implementation of get_voltage() does not check the case IS_UNSUP() is true. Signed-off-by: Axel Lin --- drivers/regulator/twl-regulator.c |9 - 1 file changed, 4 insertions(+), 5 deletions

[PATCH] regulator: twl: Convert fixed voltage to use regulator_list_voltage_linear

2013-02-15 Thread Axel Lin
Signed-off-by: Axel Lin --- drivers/regulator/twl-regulator.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/regulator/twl-regulator.c b/drivers/regulator/twl-regulator.c index d62604c0..2b3dc5b 100644 --- a/drivers/regulator/twl-regulator.c +++ b

[PATCH] regulator: twl: Remove TWL6030_FIXED_RESOURCE

2013-02-15 Thread Axel Lin
g". Signed-off-by: Axel Lin --- drivers/regulator/twl-regulator.c | 13 - 1 file changed, 13 deletions(-) diff --git a/drivers/regulator/twl-regulator.c b/drivers/regulator/twl-regulator.c index 2b3dc5b..611e73e 100644 --- a/drivers/regulator/twl-regulator.c +++ b/drivers/regul

[RFT][PATCH 1/3] regulator: core: Add enable_is_inverted flag to indicate set enable_mask bits to disable

2013-02-15 Thread Axel Lin
Add enable_is_inverted flag to indicate set enable_mask bits to disable when using regulator_enable_regmap and friends APIs. Signed-off-by: Axel Lin --- drivers/regulator/core.c | 24 include/linux/regulator/driver.h |3 +++ 2 files changed, 23 insertions

[RFT][PATCH 2/3] regulator: 88pm8607: Use enable_is_inverted flag with regulator_enable_regmap and friends APIs

2013-02-15 Thread Axel Lin
Signed-off-by: Axel Lin --- drivers/regulator/88pm8607.c | 36 1 file changed, 4 insertions(+), 32 deletions(-) diff --git a/drivers/regulator/88pm8607.c b/drivers/regulator/88pm8607.c index c79ab84..493948a 100644 --- a/drivers/regulator/88pm8607.c +++ b

[RFT][PATCH 3/3] regulator: max8649: Use enable_is_inverted flag with regulator_enable_regmap and friends APIs

2013-02-15 Thread Axel Lin
Signed-off-by: Axel Lin --- drivers/regulator/max8649.c | 39 ++- 1 file changed, 6 insertions(+), 33 deletions(-) diff --git a/drivers/regulator/max8649.c b/drivers/regulator/max8649.c index 3ca1438..fdb67ff 100644 --- a/drivers/regulator/max8649.c +++ b

[PATCH] regulator: tps6586x: Having slew rate settings for other than SM0/1 is not fatal

2013-02-16 Thread Axel Lin
Ignore the setting and show "Only SM0/SM1 can set slew rate" warning is enough, then we can return 0 instead of -EINVAL in tps6586x_regulator_set_slew_rate(). Otherwise, probe() fails. Signed-off-by: Axel Lin --- drivers/regulator/tps6586x-regulator.c |2 +- 1 file changed, 1

[PATCH] pinctrl: abx500: Add terminating entry for of_device_id table

2013-02-17 Thread Axel Lin
The of_device_id table is supposed to be zero-terminated. Signed-off-by: Axel Lin --- drivers/pinctrl/pinctrl-abx500.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/pinctrl/pinctrl-abx500.c b/drivers/pinctrl/pinctrl-abx500.c index caecdd3..685808a 100644 --- a/drivers/pinctrl

[RFT][PATCH 1/2] regulator: ab8500: Fix build error

2013-02-17 Thread Axel Lin
s/regulator/ab8500.c:510:3: error: unknown field 'update_val_enable' specified in initializer make[2]: *** [drivers/regulator/ab8500.o] Error 1 make[1]: *** [drivers/regulator] Error 2 make: *** [drivers] Error 2 Signed-off-by: Axel Lin --- drivers/regulator/ab8500.c | 11 +--

[RFT][PATCH 2/2] regulator: ab8500: Use regulator_list_voltage_linear for fixed voltage

2013-02-17 Thread Axel Lin
Both ab8500_regulator_mode_ops and ab8500_regulator_ops do not have volt_table setting, thus we can not use regulator_list_voltage_table for them. However, they have min_uV setting with n_voltages = 1, so use regulator_list_voltage_linear instead. Signed-off-by: Axel Lin --- drivers/regulator

[RFT][PATCH] regulator: ab8500: Remove get_voltage_sel for fixed voltage

2013-02-17 Thread Axel Lin
cases. A simple fix is just not implement get_voltage_sel, regulator core will report microvolts in sysfs even with only list_voltage(). Signed-off-by: Axel Lin --- Just found this needs to be fixed after I sent previous ab8500 patches, this patch is on top of previous ab8500 fixes. Axel drivers

[PATCH] backlight: lm3639: Return proper error in lm3639_bled_mode_store error paths

2012-10-10 Thread Axel Lin
Signed-off-by: Axel Lin --- drivers/video/backlight/lm3639_bl.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/video/backlight/lm3639_bl.c b/drivers/video/backlight/lm3639_bl.c index c6915c6..585949b 100644 --- a/drivers/video/backlight/lm3639_bl.c +++ b

[PATCH] power: generic-adc-battery: Fix checking return value of request_any_context_irq

2012-10-11 Thread Axel Lin
On failure, request_any_context_irq() returns a negative value. On success, it returns either IRQC_IS_HARDIRQ or IRQC_IS_NESTED. Signed-off-by: Axel Lin --- drivers/power/generic-adc-battery.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/power/generic-adc

[PATCH] hwmon: da9052: Use da9052_reg_update for rmw operations

2012-10-11 Thread Axel Lin
Signed-off-by: Axel Lin --- drivers/hwmon/da9052-hwmon.c | 27 +++ 1 file changed, 7 insertions(+), 20 deletions(-) diff --git a/drivers/hwmon/da9052-hwmon.c b/drivers/hwmon/da9052-hwmon.c index b8d01c5..1970494 100644 --- a/drivers/hwmon/da9052-hwmon.c +++ b/drivers

[PATCH] hwmon: (ina2xx) Use module_i2c_driver macro

2012-10-11 Thread Axel Lin
Signed-off-by: Axel Lin --- drivers/hwmon/ina2xx.c | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/hwmon/ina2xx.c b/drivers/hwmon/ina2xx.c index 2b72634..8e7158c 100644 --- a/drivers/hwmon/ina2xx.c +++ b/drivers/hwmon/ina2xx.c @@ -302,19 +302,8

[PATCH] regulator: vexpress: Add terminating entry for vexpress_regulator_of_match table

2012-10-16 Thread Axel Lin
The of_device_id table is supposed to be zero-terminated. Signed-off-by: Axel Lin --- drivers/regulator/vexpress.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/regulator/vexpress.c b/drivers/regulator/vexpress.c index 1702945..1d55811 100644 --- a/drivers/regulator/vexpress.c

[PATCH RFT] regulator: vexpress: Add missing n_voltages setting

2012-10-16 Thread Axel Lin
Signed-off-by: Axel Lin --- Hi Pawel, I don't have a chance to compile test this patch because I could not find VEXPRESS_CONFIG in current tree. Can you help testing this patch? Thanks, Axel drivers/regulator/vexpress.c |8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-)

[PATCH] gpiolib: Fix use after free in gpiochip_add_pin_range

2012-11-20 Thread Axel Lin
This is introduced by commit 9ab6e988 "gpiolib: return any error code from range creation". Signed-off-by: Axel Lin --- This patch is against LinusW's linux-pinctrl tree, for-next branch. Axel drivers/gpio/gpiolib.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-

[PATCH] regulator: tps80031: Trivial cleanups

2012-11-22 Thread Axel Lin
This patch includes below cleanups: - Fix typo in comment - Fix showing wrong register in dev_err - Remove unnecessary rinfo variable - Add TPS80032 to MODULE_DESCRIPTION Signed-off-by: Axel Lin --- drivers/regulator/tps80031-regulator.c | 10 -- 1 file changed, 4 insertions(+), 6

[PATCH] regulator: max8973: Fix callback setting for max8973_dcdc_ops.enable

2012-11-22 Thread Axel Lin
Signed-off-by: Axel Lin --- drivers/regulator/max8973-regulator.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/max8973-regulator.c b/drivers/regulator/max8973-regulator.c index e6328f9..140ff9d 100644 --- a/drivers/regulator/max8973-regulator.c +++ b

[PATCH] regulator: tps80031: Implement list_voltage and set n_voltages = 1 for fixed regulators

2012-11-22 Thread Axel Lin
Implement list_voltage for fixed regulators, otherwise regulator_is_supported_voltage() returns 0. Signed-off-by: Axel Lin --- drivers/regulator/tps80031-regulator.c |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/regulator/tps80031-regulator.c b/drivers

[PATCH] regulator: tps65090: Add MODULE_ALIAS

2012-11-23 Thread Axel Lin
This driver can be built as a module, add MODULE_ALIAS for it. Signed-off-by: Axel Lin --- drivers/regulator/tps65090-regulator.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/regulator/tps65090-regulator.c b/drivers/regulator/tps65090-regulator.c index 3974a99..41c3917 100644

[PATCH 1/2] regulator: as3711: Fix valid min_uV/max_UV checking in as3711_bound_check

2012-11-23 Thread Axel Lin
t looks pointless. Signed-off-by: Axel Lin --- drivers/regulator/as3711-regulator.c |9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/regulator/as3711-regulator.c b/drivers/regulator/as3711-regulator.c index 81578bf..5e813b9 100644 --- a/drivers/regulator/a

[PATCH 2/2] regulator: as3711: Fix the logic in as3711_sel_check

2012-11-23 Thread Axel Lin
is not in the requested voltage range. This patch also includes below cleanups: - Use DIV_ROUND_UP - rename variable 'ret' to 'sel' for better readability because as3711_sel_check returns the selector. Signed-off-by: Axel Lin --- drivers/regulator/as3711-regulator.c | 23

[PATCH] regulator: da9052: Ensure setting current limit within specific range

2012-11-25 Thread Axel Lin
Checking da9052_current_limits[row][i] <= max_uA is not enough, it is possible da9052_current_limits[row][i] may less than the requested min_uA. Signed-off-by: Axel Lin --- drivers/regulator/da9052-regulator.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --gi

[PATCH RFT] regulator: da9055: Select maximum current in specific range for set_current_limit

2012-11-25 Thread Axel Lin
]. [1] https://lkml.org/lkml/2012/8/5/162 [2] https://lkml.org/lkml/2012/8/6/183 This patch also ensures da9055_buck_set_current_limit return -EINVAL when the supported current limit does not meet the request range. Signed-off-by: Axel Lin --- drivers/regulator/da9055-regulator.c | 21

[PATCH] regulator: lp8755: Don't show unrelated messags in lp8755_probe error paths

2013-01-11 Thread Axel Lin
Signed-off-by: Axel Lin --- drivers/regulator/lp8755.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/drivers/regulator/lp8755.c b/drivers/regulator/lp8755.c index decb3ad..8c3f3f2 100644 --- a/drivers/regulator/lp8755.c +++ b/drivers/regulator/lp8755

[PATCH v2] clk: max77686: Remove unnecessary NULL checking for container_of()

2013-01-12 Thread Axel Lin
container_of() never returns NULL, thus remove the NULL checking for it. Also rename get_max77686_clk() to to_max77686_clk() for better readability. Signed-off-by: Axel Lin --- v2: remove unrelated change for ~max77686->mask drivers/clk/clk-max77686.c | 28 +++-

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