[PATCH RFT 2/2] regulator: ab8500: Optimize ab8540_aux3_regulator_get_voltage_sel

2013-04-09 Thread Axel Lin
We can save a register read operation in some case if read expand_register first. If info->expand_register.voltage_mask bit is set, no need to read voltage_reg. Signed-off-by: Axel Lin --- drivers/regulator/ab8500.c | 42 ++ 1 file changed,

[RFT][PATCH 1/3] regulator: ab8500-ext: Don't allow set idle mode if info->cfg->hwreq is set

2013-04-10 Thread Axel Lin
e(). Signed-off-by: Axel Lin --- drivers/regulator/ab8500-ext.c |4 1 file changed, 4 insertions(+) diff --git a/drivers/regulator/ab8500-ext.c b/drivers/regulator/ab8500-ext.c index 9aee21c..f0a1bbf 100644 --- a/drivers/regulator/ab8500-ext.c +++ b/drivers/regulator/ab8500-ext.c @@ -1

[RFT][PATCH 2/3] regulator: ab8500-ext: Don't update info->update_val if set_mode() fails

2013-04-10 Thread Axel Lin
This ensures info->update_val status is still correct if set_mode() call fails. Otherwise, get_mode() may return wrong status if a set_mode() call fails. Signed-off-by: Axel Lin --- drivers/regulator/ab8500-ext.c | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) d

[RFT][PATCH 3/3] regulator: ab8500-ext: Remove enable() and disable() functions

2013-04-10 Thread Axel Lin
Both enable() and disable() functions have only one caller, thus remove them. Signed-off-by: Axel Lin --- drivers/regulator/ab8500-ext.c | 62 ++-- 1 file changed, 22 insertions(+), 40 deletions(-) diff --git a/drivers/regulator/ab8500-ext.c b/drivers

[RFT][PATCH 1/2] clk: wm831x: Fix update wrong register for enable/disable FLL

2013-05-01 Thread Axel Lin
dev_crit message. Signed-off-by: Axel Lin --- drivers/clk/clk-wm831x.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/clk/clk-wm831x.c b/drivers/clk/clk-wm831x.c index 16ed068..4bdf0b0 100644 --- a/drivers/clk/clk-wm831x.c +++ b/drivers/clk/clk-wm831x.c @@ -97,7

[RFT][PATCH 2/2] clk: wm831x: Fix wm831x_clkout_get_parent

2013-05-01 Thread Axel Lin
= 32.768kHz oscillator Thus fix the entry order in wm831x_clkout_parents[] to make it has the same meaning as the datasheet and make the return value of wm831x_clkout_get_parent() consistent with the parent pass to wm831x_clkout_set_parent(). Signed-off-by: Axel Lin --- drivers/clk/clk-wm831x.c | 6

[PATCH] regulator: Remove all platform_set_drvdata(pdev, NULL) in drivers

2013-05-03 Thread Axel Lin
Since 0998d06310 "device-core: Ensure drvdata = NULL when no driver is bound", this is done by driver core after device_release or on probe failure. Thus we can remove all platform_set_drvdata(pdev, NULL) in drivers. Signed-off-by: Axel Lin --- drivers/regulator/88pm8607.c

[PATCH] power_supply: wm831x_backup: Remove kfree call for devdata->backup.name

2013-05-03 Thread Axel Lin
devdata->backup.name points to devdata->name, the memory for devdata->name is part of struct wm831x_backup. Thus remove kfree call for devdata->backup.name. Signed-off-by: Axel Lin --- drivers/power/wm831x_backup.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/power/wm8

[PATCH] power_supply: pm2301_charger: Fix module alias prefix

2013-05-04 Thread Axel Lin
This driver is a i2c driver, use "i2c" rather than "platform" prefix for module alias. Signed-off-by: Axel Lin --- drivers/power/pm2301_charger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/power/pm2301_charger.c b/drivers/power/pm2301_cha

[PATCH] regulator: ti-abb: Fix off-by-one valid range checking for abb->current_info_idx

2013-05-04 Thread Axel Lin
abb->current_info_idx is used as array subscript to access volt_table, thus the valid value range should be 0 ... desc->n_voltages - 1. Signed-off-by: Axel Lin --- drivers/regulator/ti-abb-regulator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/regula

[PATCH] ARM: U300: Add proper ifdef guard to fix build error when CONFIG_I2C_STU300=m

2013-05-06 Thread Axel Lin
piled when CONFIG_I2C_STU300 is configured as built-in or as a module. Signed-off-by: Axel Lin --- arch/arm/mach-u300/Makefile | 4 +++- arch/arm/mach-u300/i2c.h| 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-u300/Makefile b/arch/arm/mach-u300/Makefile ind

[PATCH] irqchip: renesas-irqc: Fix irqc_probe error handling

2013-05-06 Thread Axel Lin
The code in goto err3 path is wrong because it will call fee_irq() with k == 0, which means it does free_irq(p->irq[-1].requested_irq, &p->irq[-1]); Signed-off-by: Axel Lin --- drivers/irqchip/irq-renesas-irqc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH RFC] iio: dac: Fix build error when CONFIG_SPI_MASTER=y && CONFIG_I2C=m

2013-05-08 Thread Axel Lin
e: When CONFIG_I2C=m, meaning we can't build the drivers in with I2C support. Thus don't allow the drivers to be compiled as built-in. Signed-off-by: Axel Lin --- drivers/iio/dac/Kconfig | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/drivers/iio/dac

Re: [PATCH RFC] iio: dac: Fix build error when CONFIG_SPI_MASTER=y && CONFIG_I2C=m

2013-05-08 Thread Axel Lin
於 三,2013-05-08 於 16:36 +0800,Axel Lin 提到: > This patch fixes below build error when CONFIG_SPI_MASTER=y && CONFIG_I2C=m: > > drivers/built-in.o: In function `ad5064_i2c_write': > drivers/iio/dac/ad5064.c:608: undefined reference to `i2c_master_send' >

Re: [PATCH RFC] iio: dac: Fix build error when CONFIG_SPI_MASTER=y && CONFIG_I2C=m

2013-05-08 Thread Axel Lin
2013/5/8 Lars-Peter Clausen : > On 05/08/2013 10:36 AM, Axel Lin wrote: >> This patch fixes below build error when CONFIG_SPI_MASTER=y && CONFIG_I2C=m: >> >> drivers/built-in.o: In function `ad5064_i2c_write': >> drivers/iio/dac/ad5064.c:608: undefined r

[PATCH v2] iio: dac: Fix build error when CONFIG_SPI_MASTER=y && CONFIG_I2C=m

2013-05-08 Thread Axel Lin
NFIG_I2C=m, meaning we can't build the drivers in with I2C support. Thus don't allow the drivers to be compiled as built-in. Reported-by: Wu Fengguang Signed-off-by: Axel Lin --- drivers/iio/dac/Kconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers

[PATCH v3] iio: dac: Fix build error when CONFIG_SPI_MASTER=y && CONFIG_I2C=m

2013-05-09 Thread Axel Lin
s in with I2C support. Thus don't allow the drivers to be compiled as built-in when CONFIG_I2C=m. The real fix though is to break the driver apart into a SPI part, an I2C part and a common part. But that's something for 3.11 while this is something for 3.10/stable. Reported-by: Wu Fengg

[PATCH] gpio: stmpe: Staticize non-exported symbols

2013-05-10 Thread Axel Lin
Both stmpe_gpio_irq_map() and stmpe_gpio_irq_unmap() are not referenced outside of this file, make them static. Signed-off-by: Axel Lin --- drivers/gpio/gpio-stmpe.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpio/gpio-stmpe.c b/drivers/gpio/gpio-stmpe.c

[PATCH] regulator: mc13892: Fix MC13892_SWITCHERS0_SWxHI bit in set_voltage_sel

2013-04-23 Thread Axel Lin
because the HI bit is still set. Signed-off-by: Axel Lin --- drivers/regulator/mc13892-regulator.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/regulator/mc13892-regulator.c b/drivers/regulator/mc13892-regulator.c index 9891aec..cc76c52 100644 --- a/drivers

[PATCH] regulator: mc13892: Use regulator_map_voltage_ascend for mc13892_sw_regulator_ops

2013-04-24 Thread Axel Lin
Both mc13892_sw1 and mc13892_sw voltage table have ascendant voltage list. Use regulator_map_voltage_ascend for them. Signed-off-by: Axel Lin --- drivers/regulator/mc13892-regulator.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/regulator/mc13892-regulator.c b/drivers

[PATCH 1/2] regulator: lp872x: Use regulator_map_voltage_ascend

2013-04-24 Thread Axel Lin
All regulators have ascendant voltage list in this driver. Use regulator_map_voltage_ascend for them. Signed-off-by: Axel Lin --- drivers/regulator/lp872x.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/regulator/lp872x.c b/drivers/regulator/lp872x.c index 8e3c7ae..f5fc4a1

[PATCH 2/2] regulator: lp8788-buck: Use regulator_map_voltage_ascend

2013-04-24 Thread Axel Lin
All regulators have ascendant voltage list in this driver. Use regulator_map_voltage_ascend for them. Signed-off-by: Axel Lin --- drivers/regulator/lp8788-buck.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/regulator/lp8788-buck.c b/drivers/regulator/lp8788-buck.c index

[PATCH 1/3] regulator: tps65023: Merge tps65020 ldo1 and ldo2 vsel table

2013-04-24 Thread Axel Lin
tps65020 ldo1 and ldo2 vsel tables are identical, merge them. Signed-off-by: Axel Lin --- drivers/regulator/tps65023-regulator.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/regulator/tps65023-regulator.c b/drivers/regulator/tps65023

[PATCH 2/3] regulator: tps65023: Use regulator_map_voltage_ascend

2013-04-24 Thread Axel Lin
All regulators have ascendant voltage list in this driver. Use regulator_map_voltage_ascend for them. Signed-off-by: Axel Lin --- drivers/regulator/tps65023-regulator.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/regulator/tps65023-regulator.c b/drivers/regulator/tps65023

[PATCH 3/3] regulator: tps6507x: Use regulator_map_voltage_ascend

2013-04-24 Thread Axel Lin
All regulators have ascendant voltage list in this driver. Use regulator_map_voltage_ascend for them. Signed-off-by: Axel Lin --- drivers/regulator/tps6507x-regulator.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/regulator/tps6507x-regulator.c b/drivers/regulator/tps6507x

[PATCH] regulator: max8952: Add missing config.of_node setting for regulator register

2013-04-25 Thread Axel Lin
Signed-off-by: Axel Lin --- drivers/regulator/max8952.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/regulator/max8952.c b/drivers/regulator/max8952.c index 4259c78..5259c2f 100644 --- a/drivers/regulator/max8952.c +++ b/drivers/regulator/max8952.c @@ -225,6 +225,7 @@ static

[PATCH] regulator: tps6524x: Use regulator_map_voltage_ascend

2013-04-25 Thread Axel Lin
All regulators have ascendant voltage list in this driver. Use regulator_map_voltage_ascend for them. Signed-off-by: Axel Lin --- drivers/regulator/tps6524x-regulator.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/regulator/tps6524x-regulator.c b/drivers/regulator/tps6524x

[PATCH] regulator: ab3100: Fix regulator register error handling

2013-04-26 Thread Axel Lin
ove ab3100_regulators_remove() to avoid forward declaration. Signed-off-by: Axel Lin --- drivers/regulator/ab3100.c | 33 +++-- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/drivers/regulator/ab3100.c b/drivers/regulator/ab3100.c index be1e6ad..3be9e46 100644 --

[PATCH] regulator: Remove NULL test before calling regulator_unregister()

2013-04-26 Thread Axel Lin
It's safe to call regulator_unregister() with NULL, thus remove the NULL test before regulator_unregister() calls. Signed-off-by: Axel Lin Cc: Robert Jarzmik Cc: Haojian Zhuang Cc: Wolfram Sang Cc: Sangbeom Kim Cc: Cyril Chemparathy --- drivers/regulator/max1586.c|

[PATCH] regulator: max77686: Don't update max77686->opmode if update register fails

2013-04-27 Thread Axel Lin
Ensure max77686->opmode always has correct status. Signed-off-by: Axel Lin --- drivers/regulator/max77686.c | 32 +--- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/drivers/regulator/max77686.c b/drivers/regulator/max77686.c index e4586ee..2093

regulator: Some patches for twl-regulator are not found in regulator tree

2013-04-10 Thread Axel Lin
Hi Mark, I found some patches for twl are not in linux-next, and I cannot find them in your tree ( although you replied the patches applied. ) I think below patches are missing: [PATCH] regulator: twl: Remove TWL6030_FIXED_RESOURCE [1] [PATCH] regulator: twl: Remove VDD1_VSEL_table and VDD2_VSEL_t

[PATCH 1/2] regulator: ab8500-ext: Make the return type of ab8500_ext_regulator_exit() void

2013-04-10 Thread Axel Lin
ab8500_ext_regulator_exit() never fails. Signed-off-by: Axel Lin --- drivers/regulator/ab8500-ext.c |4 +--- drivers/regulator/ab8500.c |9 +++-- include/linux/regulator/ab8500.h |2 +- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/regulator

[PATCH 2/2] regulator: ab8500: Unregister ab8500-ext regulators in probe() failure path

2013-04-10 Thread Axel Lin
Signed-off-by: Axel Lin --- drivers/regulator/ab8500.c |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/regulator/ab8500.c b/drivers/regulator/ab8500.c index c200f8b..ea182d3 100644 --- a/drivers/regulator/ab8500.c +++ b/drivers/regulator/ab8500.c @@ -3172,8

[RESEND][PATCH 1/3] regulator: twl: Remove VDD1_VSEL_table and VDD2_VSEL_table

2013-04-11 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 Acked-by: Tero Kristo --- drivers/regulator/twl-regulator.c |6 -- 1 file changed, 6 deletions(-)

[RESEND][PATCH 2/3] regulator: twl: Convert fixed voltage to use regulator_list_voltage_linear

2013-04-11 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

[RESEND][PATCH 3/3] regulator: twl: Remove TWL6030_FIXED_RESOURCE

2013-04-11 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

[RESEND][PATCH 1/3] PM / devfreq: exynos4_bus: Fix missing mutex_unlock if opp_find_freq_floor fails

2013-04-11 Thread Axel Lin
We need to call mutex_unlock() in the error path. Signed-off-by: Axel Lin --- drivers/devfreq/exynos4_bus.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/devfreq/exynos4_bus.c b/drivers/devfreq/exynos4_bus.c index 1deee09..54b9615 100644 --- a/drivers/devfreq

[RESEND][PATCH 2/3] PM / devfreq: exynos4_bus: Constify clock divider table

2013-04-11 Thread Axel Lin
These tables are never modified, make them const. Signed-off-by: Axel Lin --- drivers/devfreq/exynos4_bus.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/devfreq/exynos4_bus.c b/drivers/devfreq/exynos4_bus.c index 3f37f3b..45d00d1 100644 --- a

[RESEND][PATCH 3/3] PM / devfreq: exynos4_bus: Fix table entry size for exynos4x12_clkdiv_dmc1

2013-04-11 Thread Axel Lin
exynos4x12_clkdiv_dmc1 contains { G2DACP, DIVC2C, DIVC2C_ACLK }, thus set the size to 3 rather than 6. Signed-off-by: Axel Lin --- drivers/devfreq/exynos4_bus.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/devfreq/exynos4_bus.c b/drivers/devfreq/exynos4_bus.c

[RFT][PATCH] regulator: ab8500: Fix voltage_mask for AB8505_LDO_AUDIO

2013-04-12 Thread Axel Lin
The voltage_mask and voltage_shift settings of AB8505_LDO_AUDIO are not matched. It looks like a typo in the voltage_mask settings. Signed-off-by: Axel Lin --- Hi Lee and Bengt, I don't have the datasheet. Can you confirm if this fix is correct? Thanks, Axel drivers/regulator/ab8500.c |

[PATCH] Documentation: DT: usage-model: Fix typo for arch/arm/kernel/devtree.c file path

2013-04-12 Thread Axel Lin
arch/arm/kernel/devicetree.c does not exist. The correct file path is arch/arm/kernel/devtree.c. Signed-off-by: Axel Lin --- Documentation/devicetree/usage-model.txt |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/devicetree/usage-model.txt b/Documentation

[PATCH] regulator: rc5t583: Remove unused fields from struct rc5t583_regulator_info

2013-04-12 Thread Axel Lin
The *dev and *mfd of struct rc5t583_regulator_info are not used after convert to use regmap, remove them. Signed-off-by: Axel Lin --- drivers/regulator/rc5t583-regulator.c |6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/regulator/rc5t583-regulator.c b/drivers/regulator

Re: [RESEND][PATCH 1/3] PM / devfreq: exynos4_bus: Fix missing mutex_unlock if opp_find_freq_floor fails

2013-04-12 Thread Axel Lin
2013/4/13 Rafael J. Wysocki : > On Friday, April 12, 2013 09:11:00 PM myungjoo.ham wrote: >> > On Friday, April 12, 2013 11:52:01 AM 함명주 wrote: >> > > > On Friday, April 12, 2013 01:54:18 PM Axel Lin wrote: >> > > > > We need to call mutex_unlock() in

[PATCH RESEND] mfd: max8997: Return proper error if pdata is NULL

2013-04-13 Thread Axel Lin
Return proper error instead of 0 if pdata is NULL. Signed-off-by: Axel Lin --- drivers/mfd/max8997.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/mfd/max8997.c b/drivers/mfd/max8997.c index 1471405..823f34b 100644 --- a/drivers/mfd/max8997.c +++ b/drivers

[PATCH] regulator: max8997: Test pdata by NULL checking instead of IS_ERR_OR_NULL

2013-04-13 Thread Axel Lin
pdata is either a valid pointer or NULL, use NULL checking rather than IS_ERR_OR_NULL macro. Signed-off-by: Axel Lin --- drivers/regulator/max8997.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/regulator/max8997.c b/drivers/regulator/max8997.c index 0ac7a87

Re: [PATCH] regulator: ab8500: Fix get_mode for shared mode regulators

2013-04-13 Thread Axel Lin
Ping. Hi Lee, Can you review this patch. I think this one is a bug fix. Regards, Axel 2013/4/8 Axel Lin : > The special handling code for getting shared mode status is wrong > because it needs to check info->shared_mode->lp_mode_req for > both regulators that shared the sam

Re: [PATCH] regulator: ab8500: Fix get_mode for shared mode regulators

2013-04-15 Thread Axel Lin
2013/4/15 Bengt Jönsson : > On 04/08/2013 02:31 PM, Axel Lin wrote: >> >> The special handling code for getting shared mode status is wrong >> because it needs to check info->shared_mode->lp_mode_req for >> both regulators that shared the same mode register.

[PATCH RFT] regulator: ab8500: Fix voltage_shift setting for AB8540_LDO_DMIC

2013-04-15 Thread Axel Lin
The voltage_mask is 0xc0, thus we need to set voltage_shift = 6 to get correct selector in get_voltage_sel and set_voltage_sel. Signed-off-by: Axel Lin --- Hi Bengt, I don't have the datasheet. Can you confirm if this fix is correct? BTW, can you also review a couple patches for ab850

Re: [PATCH] regulator: ab8500: Fix get_mode for shared mode regulators

2013-04-15 Thread Axel Lin
> My understanding is for shared mode regulators: > It can be in LP mode only when *BOTH* are in LP mode. > If only one of the regulator in HP mode, then *BOTH* should be in HP mode. > Did I misunderstand something? Let me put this issue this way: Current code behavior: get_mode() returns IDLE if

Re: [PATCH] regulator: ab8500: Fix get_mode for shared mode regulators

2013-04-15 Thread Axel Lin
> I guess what you don't like with the current approach is that the driver > returns REGULATOR_MODE_IDLE in some cases where the mode register is set to > LP. But I think, with patch applied, the control may be wrong in some cases > because the regulator framework will call get_mode and see that th

Re: [PATCH] regulator: ab8500: Fix get_mode for shared mode regulators

2013-04-15 Thread Axel Lin
2013/4/15 Bengt Jönsson : > On 04/15/2013 02:13 PM, Axel Lin wrote: >>> >>> I guess what you don't like with the current approach is that the driver >>> returns REGULATOR_MODE_IDLE in some cases where the mode register is set >>> to >>> LP. But

[PATCH v2] regulator: ab8500: Fix set voltage for AB8540_LDO_AUX3

2013-04-16 Thread Axel Lin
going to 3.05V, set the expand register bit. When leaving 3.05V for another voltage, set the target voltage before clearing the expand register bit. Signed-off-by: Axel Lin --- drivers/regulator/ab8500.c | 69 1 file changed, 51 insertions(

Re: [RFT][PATCH 1/3] regulator: ab8500-ext: Don't allow set idle mode if info->cfg->hwreq is set

2013-04-16 Thread Axel Lin
2013/4/16 Bengt Jönsson : > On 04/10/2013 02:54 PM, Axel Lin wrote: >> >> The regulator always on with high power mode if info->cfg->hwreq is set. >> >> If we allow set idle mode when info->cfg->hwreq is set, get_mode() returns >> REGULAT

[PATCH v2 1/2] regulator: ab8500-ext: Don't update info->update_val if set_mode() fails

2013-04-16 Thread Axel Lin
This ensures info->update_val status is still correct if set_mode() call fails. Otherwise, get_mode() may return wrong status if a set_mode() call fails. Signed-off-by: Axel Lin --- drivers/regulator/ab8500-ext.c | 26 ++ 1 file changed, 18 insertions(+), 8 deleti

[PATCH v2 2/2] regulator: ab8500-ext: Remove enable() and disable() functions

2013-04-16 Thread Axel Lin
Both enable() and disable() functions have only one caller, thus remove them. Signed-off-by: Axel Lin --- drivers/regulator/ab8500-ext.c | 64 +++- 1 file changed, 23 insertions(+), 41 deletions(-) diff --git a/drivers/regulator/ab8500-ext.c b/drivers

[PATCH v3] regulator: ab8500: Fix set voltage for AB8540_LDO_AUX3

2013-04-16 Thread Axel Lin
going to 3.05V, set the expand register bit. When leaving 3.05V for another voltage, set the target voltage before clearing the expand register bit. Signed-off-by: Axel Lin --- v3: Just coding style change (compare to v2), to make the code smaller. Axel drivers/regulator/ab8500.c

Re: [PATCH 1/2] regulator: ab8500: Don't update info->update_val if write to register fails

2013-04-16 Thread Axel Lin
Hi Bengt, This serial also needs your review. Thanks, Axel 2013/4/9 Axel Lin : > This patch ensures info->update_val is consistent with current register value. > > Signed-off-by: Axel Lin > --- > drivers/regulator/ab8500.c | 20 +++- > 1 file changed

[PATCH] pwm: renesas-tpu: Add missing pwmchip_remove() call in tpu_remove()

2013-05-18 Thread Axel Lin
Signed-off-by: Axel Lin --- drivers/pwm/pwm-renesas-tpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pwm/pwm-renesas-tpu.c b/drivers/pwm/pwm-renesas-tpu.c index 8e6d8d7..351addd 100644 --- a/drivers/pwm/pwm-renesas-tpu.c +++ b/drivers/pwm/pwm-renesas-tpu.c

[PATCH 1/2] pinctrl: Don't override the error code in probe error handling

2013-05-18 Thread Axel Lin
Otherwise, we return 0 in probe error paths when gpiochip_remove() returns 0. Also show error message if gpiochip_remove() fails. Signed-off-by: Axel Lin Cc: Linus Walleij Cc: Maxime Ripard Cc: Tony Prisk --- drivers/pinctrl/pinctrl-coh901.c | 3 ++- drivers/pinctrl/pinctrl-sunxi.c

[PATCH 2/2] gpio: Don't override the error code in probe error handling

2013-05-18 Thread Axel Lin
Otherwise, we return 0 in probe error paths when gpiochip_remove() returns 0. Also show error message if gpiochip_remove() fails. Signed-off-by: Axel Lin Cc: Tomoya MORINAGA Cc: Denis Turischev Cc: Lars Poeschel --- drivers/gpio/gpio-ml-ioh.c | 3 +-- drivers/gpio/gpio-pch.c| 3

[PATCH] gpio: mcp23s08: Fix build error when CONFIG_SPI_MASTER=y && CONFIG_I2C=m

2013-05-18 Thread Axel Lin
don't allow the drivers to be compiled as built-in when CONFIG_I2C=m. The real fix though is to break the driver apart into a SPI part, an I2C part and a common part. But that's something for 3.11 while this is something for 3.10/stable. Signed-off-by: Axel Lin --- drivers/gpio/Kconf

[PATCH] gpio: max7300: Fix trivial typo in Kconfig help text

2013-05-18 Thread Axel Lin
max7301 is controlled through SPI interface which means another driver. Signed-off-by: Axel Lin --- drivers/gpio/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index 6575d77..4e0884a 100644 --- a/drivers/gpio/Kconfig +++ b

[PATCH v2] gpio: mcp23s08: Fix build error when CONFIG_SPI_MASTER=y && CONFIG_I2C=m

2013-05-19 Thread Axel Lin
don't allow the drivers to be compiled as built-in when CONFIG_I2C=m. The real fix though is to break the driver apart into a SPI part, an I2C part and a common part. But that's something for 3.11 while this is something for 3.10/stable. Signed-off-by: Axel Lin --- drivers/gpio/Kconf

Re: [PATCH] gpio: mcp23s08: Fix build error when CONFIG_SPI_MASTER=y && CONFIG_I2C=m

2013-05-19 Thread Axel Lin
>> --- a/drivers/gpio/Kconfig >> +++ b/drivers/gpio/Kconfig >> @@ -636,7 +636,7 @@ config GPIO_MAX7301 >> >> config GPIO_MCP23S08 >> tristate "Microchip MCP23xxx I/O expander" >> - depends on SPI_MASTER || I2C >> + depends on (SPI_MASTER && I2C!=m) || I2C > > For me it looks li

[PATCH v2] pwm: renesas-tpu: Add missing pwmchip_remove() call in tpu_remove()

2013-05-20 Thread Axel Lin
Signed-off-by: Axel Lin --- drivers/pwm/pwm-renesas-tpu.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/pwm/pwm-renesas-tpu.c b/drivers/pwm/pwm-renesas-tpu.c index 8e6d8d7..319a6fe 100644 --- a/drivers/pwm/pwm-renesas-tpu.c +++ b/drivers/pwm/pwm-renesas-tpu.c @@ -432,6 +432,11

[RESEND][PATCH 1/2] clk: wm831x: Fix update wrong register for enable/disable FLL

2013-05-21 Thread Axel Lin
dev_crit message. Signed-off-by: Axel Lin Acked-by: Mark Brown --- Hi Mike, This patch serial was sent on http://lkml.org/lkml/2013/5/1/152 With Mark's Ack. Regards, Axel drivers/clk/clk-wm831x.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/clk/clk-wm831

[RESEND][PATCH 2/2] clk: wm831x: Fix wm831x_clkout_get_parent

2013-05-21 Thread Axel Lin
= 32.768kHz oscillator Thus fix the entry order in wm831x_clkout_parents[] to make it has the same meaning as the datasheet and make the return value of wm831x_clkout_get_parent() consistent with the parent pass to wm831x_clkout_set_parent(). Signed-off-by: Axel Lin Acked-by: Mark Brown --- drivers

[PATCH] power_supply: generic-adc-battery: Fix checking if none of the channels are supported

2013-05-24 Thread Axel Lin
If none of the channels are supported, index is 0. Also ensure to return error code instead of 0 in goto second_mem_fail path. Signed-off-by: Axel Lin --- drivers/power/generic-adc-battery.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/power/generic-adc

Re: [PATCH v2] pwm: renesas-tpu: Add missing pwmchip_remove() call in tpu_remove()

2013-05-25 Thread Axel Lin
gt;> > > >> > > Thank you for the patch. >> > > >> > > On Monday 20 May 2013 21:45:41 Axel Lin wrote: >> > > > Signed-off-by: Axel Lin >> > > >> > > Acked-by: Laurent Pinchart >> > >> > Thanks. I have qu

regulator: ab8500: ambiguous meaning of delay setting in struct ab8500_regulator_info

2013-03-26 Thread Axel Lin
Hi, The comment of struct ab8500_regulator_info says the delay means "startup/set voltage delay in us". I'm confused by the meaning, does it mean enable_time or set_voltage_time_sel time or both? * @enable_time: Time taken for the regulator voltage output voltage to * stabilise af

[PATCH RFT 1/2] regulator: ab8500: Add missing enable_time settings

2013-03-27 Thread Axel Lin
: enable time = 500 us Vaudio: enable time = 140 us Vusb: enable time = 150 us This discussion thread is available at: https://lkml.org/lkml/2013/3/26/795 Signed-off-by: Axel Lin --- drivers/regulator/ab8500.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/regulator

[PATCH RFT 2/2] regulator: ab8500: Remove set_voltage_time_sel and delay setting

2013-03-27 Thread Axel Lin
The data sheet does not specify time delay for voltage selection, thus remove set_voltage_time_sel and delay setting. Note, currently set_voltage_time_sel callback returns 0 due to missing delay settings. Signed-off-by: Axel Lin --- drivers/regulator/ab8500.c | 13 - 1 file

[PATCH] iommu: exynos: Fix out of bound array access

2013-03-27 Thread Axel Lin
In the case of no-match in "for (i = 0; i < (pdev->num_resources / 2); i++)", i is "pdev->num_resources / 2". Fix the boundary checking to avoid the out of bound array access for data->sfrbases[i]. Signed-off-by: Axel Lin --- drivers/iommu/exynos-iommu.c |2

[PATCH] regulator: ab8500: Update info->update_val only when successfully update register

2013-03-28 Thread Axel Lin
This fixes 2 issues: 1. Don't update info->update_val if write to the register fails. 2. Don't update info->update_val if regulator is disabled, this avoid inconsistent status between the register value and info->update_val. Signed-off-by: Axel Lin --- drivers/regula

[PATCH RFT v2] regulator: ab8500: Update info->update_val only when successfully update register

2013-03-28 Thread Axel Lin
Don't update info->update_val if write to the register fails. Signed-off-by: Axel Lin --- v2: On the second thought, I think it's ok to update info->update_val when regulator is disabled, the mode will change when the regulator is enabled. Hi Bengt, I just got your Ack for v1

[PATCH] pinctrl: coh901: Fix error checking in u300_gpio_to_irq

2013-03-28 Thread Axel Lin
The pointer "port" is always not NULL if gpio->port_list is not empty. Signed-off-by: Axel Lin --- drivers/pinctrl/pinctrl-coh901.c |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/pinctrl/pinctrl-coh901.c b/drivers/pinctrl/pinctrl-coh901.c i

[PATCH] pwm: spear: Fix enable pwm output

2013-03-29 Thread Axel Lin
The logic to check return value of clk_enable() is reversed, thus when clek_enable() success PWMCR_PWM_ENABLE bit is never set. Fix it. Signed-off-by: Axel Lin --- drivers/pwm/pwm-spear.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pwm/pwm-spear.c b/drivers

[PATCH v2] pwm: spear: Fix enable pwm output

2013-03-29 Thread Axel Lin
The logic to check return value of clk_enable() is reversed, thus when clk_enable() passes PWMCR_PWM_ENABLE bit is not set. Fix it. Signed-off-by: Axel Lin --- drivers/pwm/pwm-spear.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pwm/pwm-spear.c b/drivers

[PATCH] regulator: max1586: Constify v6_voltages_uv table

2013-03-29 Thread Axel Lin
Make v6_voltages_uv to be const unsigned int. Signed-off-by: Axel Lin --- drivers/regulator/max1586.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/max1586.c b/drivers/regulator/max1586.c index 8c5a54f..dac0490 100644 --- a/drivers/regulator/max1586.c

[PATCH] pwm: spear: Fix checking return value of clk_enable() and clk_prepare()

2013-03-30 Thread Axel Lin
The logic to check return value of clk_enable() and clk_prepare() is reversed, fix it. Signed-off-by: Axel Lin Cc: --- This is v3 of "pwm: spear: Fix enable pwm output". I change the subject line because it also fixes checking return value of clk_prepare(). Also add cc stable. Axel

Re: [PATCH] pwm: spear: Fix checking return value of clk_enable() and clk_prepare()

2013-03-30 Thread Axel Lin
> > Sorry for the delays caused due to me. > > Acked-by: Viresh Kumar Actually, I'm really appreciate having your review. Thanks, Axel -- 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://v

[RFT][PATCH 1/2] pwm: lpc32xx: Properly set PWM_ENABLE bit in lpc32xx_pwm_[enable|disable]

2013-03-30 Thread Axel Lin
clear PWMx_RELOADV and PWMx_DUTY bits. [1] http://www.nxp.com/documents/user_manual/UM10326.pdf Signed-off-by: Axel Lin --- Hi, I don't have this hardware handy so I'd appreciate if someone can test this patch serial. Thanks, Axel drivers/pwm/pwm-lpc32xx.c | 18

[RFT][PATCH 2/2] pwm: lpc32xx: Don't change PWM_ENABLE bit in lpc32xx_pwm_config

2013-03-30 Thread Axel Lin
lpc32xx_pwm_config() is supposed to set duty_ns and period_ns, it should not change PWM_ENABLE bit. Signed-off-by: Axel Lin --- drivers/pwm/pwm-lpc32xx.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pwm/pwm-lpc32xx.c b/drivers/pwm/pwm-lpc32xx.c index 1a5075e

[RFT][PATCH v2 2/2] pwm: lpc32xx: Don't change PWM_ENABLE bit in lpc32xx_pwm_config

2013-03-30 Thread Axel Lin
lpc32xx_pwm_config() is supposed to set duty_ns and period_ns, it should not change PWM_ENABLE and other bits. Signed-off-by: Axel Lin --- drivers/pwm/pwm-lpc32xx.c |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/pwm/pwm-lpc32xx.c b/drivers/pwm/pwm

[PATCH 1/4] pwm: ab8500: Add .owner to struct pwm_ops

2013-03-30 Thread Axel Lin
Add missing .owner of struct pwm_ops. This prevents the module from being removed from underneath its users. Signed-off-by: Axel Lin --- drivers/pwm/pwm-ab8500.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/pwm/pwm-ab8500.c b/drivers/pwm/pwm-ab8500.c index 3beb2b5..1d07a6f

[PATCH 2/4] pwm: atmel-tcb: Add .owner to struct pwm_ops

2013-03-30 Thread Axel Lin
Add missing .owner of struct pwm_ops. This prevents the module from being removed from underneath its users. Signed-off-by: Axel Lin --- drivers/pwm/pwm-atmel-tcb.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/pwm/pwm-atmel-tcb.c b/drivers/pwm/pwm-atmel-tcb.c index 16cb530

[PATCH 3/4] pwm: twl-led: Add .owner to struct pwm_ops

2013-03-30 Thread Axel Lin
Add missing .owner of struct pwm_ops. This prevents the module from being removed from underneath its users. Signed-off-by: Axel Lin --- drivers/pwm/pwm-twl-led.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/pwm/pwm-twl-led.c b/drivers/pwm/pwm-twl-led.c index 83e25d4

[PATCH 4/4] pwm: twl: Add .owner to struct pwm_ops

2013-03-30 Thread Axel Lin
Add missing .owner of struct pwm_ops. This prevents the module from being removed from underneath its users. Signed-off-by: Axel Lin --- drivers/pwm/pwm-twl.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/pwm/pwm-twl.c b/drivers/pwm/pwm-twl.c index bf3fda2..ee7fa5d 100644

[PATCH 1/3] pwm: imx: Remove enabled field from struct imx_chip

2013-03-31 Thread Axel Lin
We can test PWMF_ENABLED bit to know if pwm is enabled or not. Thus remove enabled field from struct imx_chip. Signed-off-by: Axel Lin --- drivers/pwm/pwm-imx.c |6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/pwm/pwm-imx.c b/drivers/pwm/pwm-imx.c index

[PATCH 2/3] pwm: puv3: Remove unused enabled filed from struct puv3_pwm_chip

2013-03-31 Thread Axel Lin
Signed-off-by: Axel Lin --- drivers/pwm/pwm-puv3.c |1 - 1 file changed, 1 deletion(-) diff --git a/drivers/pwm/pwm-puv3.c b/drivers/pwm/pwm-puv3.c index db964e6..d1eb499 100644 --- a/drivers/pwm/pwm-puv3.c +++ b/drivers/pwm/pwm-puv3.c @@ -27,7 +27,6 @@ struct puv3_pwm_chip { struct

[PATCH 3/3] pwm: pxa: Remove clk_enabled field from struct pxa_pwm_chip

2013-03-31 Thread Axel Lin
abled counter here. Signed-off-by: Axel Lin --- drivers/pwm/pwm-pxa.c | 16 ++-- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/drivers/pwm/pwm-pxa.c b/drivers/pwm/pwm-pxa.c index 20370e6..b789882 100644 --- a/drivers/pwm/pwm-pxa.c +++ b/drivers/pwm/pwm-pxa.c @@ -48,7

[PATCH] pwm: twl: Return proper error if twl6030_pwm_enable() fails

2013-03-31 Thread Axel Lin
Return proper error instead of 0 if twl6030_pwm_enable() fails. Signed-off-by: Axel Lin --- drivers/pwm/pwm-twl.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pwm/pwm-twl.c b/drivers/pwm/pwm-twl.c index ee7fa5d..2782001 100644 --- a/drivers/pwm/pwm-twl.c +++ b

[PATCH] pwm: pxa: Use driver_data field to store pwm_nr

2013-03-31 Thread Axel Lin
The driver_data field was used to store information about PWM_ID_BASE and HAS_SECONDARY_PWM. PWM_ID_BASE is not used now after convert to pwm framework. This patch stores the pwm_nr in driver_data field to simplify the code. Signed-off-by: Axel Lin --- drivers/pwm/pwm-pxa.c | 11

[PATCH 1/2] pwm: mxs: Remove unused *dev from struct mxs_pwm_chip

2013-03-31 Thread Axel Lin
Signed-off-by: Axel Lin --- drivers/pwm/pwm-mxs.c |2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/pwm/pwm-mxs.c b/drivers/pwm/pwm-mxs.c index a53d309..23d5180 100644 --- a/drivers/pwm/pwm-mxs.c +++ b/drivers/pwm/pwm-mxs.c @@ -38,7 +38,6 @@ struct mxs_pwm_chip { struct

[PATCH 2/2] pwm: mxs: Remove unused *dev from struct spear_pwm_chip

2013-03-31 Thread Axel Lin
Signed-off-by: Axel Lin --- drivers/pwm/pwm-spear.c |3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/pwm/pwm-spear.c b/drivers/pwm/pwm-spear.c index 3223b57..9563599 100644 --- a/drivers/pwm/pwm-spear.c +++ b/drivers/pwm/pwm-spear.c @@ -49,13 +49,11 @@ * @mmio_base: base

[PATCH v2 2/2] pwm: spear: Remove unused *dev from struct spear_pwm_chip

2013-03-31 Thread Axel Lin
Signed-off-by: Axel Lin Acked-by: Shiraz Hashim --- v2: fix the prefix in subject line drivers/pwm/pwm-spear.c |3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/pwm/pwm-spear.c b/drivers/pwm/pwm-spear.c index 3223b57..9563599 100644 --- a/drivers/pwm/pwm-spear.c +++ b/drivers/pwm

Re: [PATCH 3/3] pwm: pxa: Remove clk_enabled field from struct pxa_pwm_chip

2013-04-01 Thread Axel Lin
2013/4/1 Eric Miao : > On Sun, Mar 31, 2013 at 11:04 PM, Axel Lin wrote: >> clk_enable/clk_disable maintain an enable_count, clk_prepare and >> clk_unprepare >> also maintain a prepare_count. These APIs will do prepare/enable when the >> first >> user c

Re: [PATCH] pwm: pxa: Use driver_data field to store pwm_nr

2013-04-01 Thread Axel Lin
2013/4/1 Eric Miao : > On Mon, Apr 1, 2013 at 12:12 AM, Axel Lin wrote: >> The driver_data field was used to store information about PWM_ID_BASE and >> HAS_SECONDARY_PWM. PWM_ID_BASE is not used now after convert to pwm >> framework. >> This patch stores the pwm

[PATCH] pwm: pxa: Remove PWM_ID_BASE macro

2013-04-01 Thread Axel Lin
PWM_ID_BASE() is not used after convert to PWM framework, remove it. Also update driver_data field of struct platform_device_id accordingly. Signed-off-by: Axel Lin --- This is v2 of [PATCH] pwm: pxa: Use driver_data field to store pwm_nr. I change the subject line to meet the change in v2

[PATCH 1/2] regulator: lp8788: Remove lp8788_dldo_id and lp8788_aldo_id arrays

2013-04-01 Thread Axel Lin
The id for DLDOx matches the entries in enum lp8788_ldo_id and it's easy to calculate the id for ALDOx. Thus remove lp8788_dldo_id and lp8788_aldo_id arrays. Signed-off-by: Axel Lin --- drivers/regulator/lp8788-ldo.c | 32 ++-- 1 file changed, 2 insertions(+

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