[PATCH] pinctrl: imx: Fix the logic checking if not able to find pin reg map

2012-11-12 Thread Axel Lin
Current code sets "pin_reg = &info->pin_regs[i];" in each loop iteration, so in the case of no-match, pin_reg is not NULL. Signed-off-by: Axel Lin --- drivers/pinctrl/pinctrl-imx.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/pinctr

[PATCH] pinctrl: spear: Fix the logic of setting reg in pmx_init_gpio_pingroup_addr

2012-11-12 Thread Axel Lin
Current code does not work if count > 1, fix it. Signed-off-by: Axel Lin --- drivers/pinctrl/spear/pinctrl-spear.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/pinctrl/spear/pinctrl-spear.c b/drivers/pinctrl/spear/pinctrl-spear.c index f9483ae..1077

[PATCH] pinctrl: spear: Make get_gpio_pingroup return NULL when no gpio_pingroup found

2012-11-13 Thread Axel Lin
Currently get_gpio_pingroup() may return NULL or ERR_PTR(-EINVAL) when no gpio_pingroup found. The caller in gpio_request_endisable() only checks if the return value is NULL. Return ERR_PTR(-EINVAL) for get_gpio_pingroup() causes problem and seems not necessary. Signed-off-by: Axel Lin

[PATCH] pinctrl: coh901: Return proper error if irq_domain_add_linear() fails

2012-11-13 Thread Axel Lin
Return -ENOMEM instead of 0 if irq_domain_add_linear fails. Signed-off-by: Axel Lin --- drivers/pinctrl/pinctrl-coh901.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/pinctrl/pinctrl-coh901.c b/drivers/pinctrl/pinctrl-coh901.c index 5c7daf9..1144dcd 100644

[PATCH] pinctrl: plgpio: Call clk_disable_unprepare only if clk_prepare_enable is called

2012-11-14 Thread Axel Lin
This driver allows clk_get() failure, and still work without it. This patch adds !IS_ERR(plgpio->clk) checking in plgpio_request() error path so we only call clk_disable_unprepare() if clk_prepare_enable() is called. Signed-off-by: Axel Lin --- drivers/pinctrl/spear/pinctrl-plgpio.c |

[PATCH 1/4] pinctrl: dove: Prevent NULL dereference if of_match_device returns NULL

2012-11-14 Thread Axel Lin
of_match_device() may return NULL. Signed-off-by: Axel Lin --- drivers/pinctrl/mvebu/pinctrl-dove.c |8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/pinctrl/mvebu/pinctrl-dove.c b/drivers/pinctrl/mvebu/pinctrl-dove.c index ffe74b2..a8b9b42 100644 --- a

[PATCH 2/4] pinctrl: kirkwood: Prevent NULL dereference if of_match_device returns NULL

2012-11-14 Thread Axel Lin
of_match_device() may return NULL. Signed-off-by: Axel Lin --- drivers/pinctrl/mvebu/pinctrl-kirkwood.c |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/pinctrl/mvebu/pinctrl-kirkwood.c b/drivers/pinctrl/mvebu/pinctrl-kirkwood.c index 9a74ef6..fe885ca

[PATCH 3/4] pinctrl: at91: Prevent NULL dereference if of_match_device returns NULL

2012-11-14 Thread Axel Lin
of_match_device() may return NULL. Signed-off-by: Axel Lin --- drivers/pinctrl/pinctrl-at91.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c index 8490a55..32006c8 100644 --- a/drivers

[PATCH 4/4] pinctrl: nomadik: Prevent NULL dereference if of_match_device returns NULL

2012-11-14 Thread Axel Lin
of_match_device() may return NULL. Signed-off-by: Axel Lin --- drivers/pinctrl/pinctrl-nomadik.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/pinctrl/pinctrl-nomadik.c b/drivers/pinctrl/pinctrl-nomadik.c index 238060e..40bd1b3 100644 --- a/drivers

[PATCH RESEND 3/4] pinctrl: at91: Prevent NULL dereference if of_match_device returns NULL

2012-11-14 Thread Axel Lin
of_match_device() may return NULL. Signed-off-by: Axel Lin --- This resend CC Jean-Christophe. drivers/pinctrl/pinctrl-at91.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c index 8490a55

[PATCH] clk: spear: Add stub functions for spear3[0|1|2]0_clk_init()

2012-11-05 Thread Axel Lin
pear320_clk_init' [-Werror=implicit-function-declaration] cc1: some warnings being treated as errors make[3]: *** [drivers/clk/spear/spear3xx_clock.o] Error 1 make[2]: *** [drivers/clk/spear] Error 2 make[1]: *** [drivers/clk] Error 2 make: *** [drivers] Error 2 Signed-off-by: Axel Lin --- d

[PATCH] pinctrl: PINCTRL_SAMSUNG and PINCTRL_EXYNOS4 need to depend on OF && GPIOLIB

2012-11-05 Thread Axel Lin
NG, thus also make PINCTRL_EXYNOS4 depend on OF && GPIOLIB. Signed-off-by: Axel Lin --- Hi Thomas, If I simply add "select OF_GPIO" for PINCTRL_SAMSUNG, I got below build warning: warning: (PINCTRL_SAMSUNG) selects OF_GPIO which has unmet direct dependencies (GPIOLIB && OF &am

[PATCH] pinctrl: samsung: Remove a redundant settting for ctrldesc->npins

2012-11-06 Thread Axel Lin
Set it once is enough. Signed-off-by: Axel Lin --- drivers/pinctrl/pinctrl-samsung.c |1 - 1 file changed, 1 deletion(-) diff --git a/drivers/pinctrl/pinctrl-samsung.c b/drivers/pinctrl/pinctrl-samsung.c index fc34cac..1307283 100644 --- a/drivers/pinctrl/pinctrl-samsung.c +++ b/drivers

[PATCH] pinctrl: Staticize pinconf_ops

2012-11-06 Thread Axel Lin
They are not referenced outside respective driver. Signed-off-by: Axel Lin Cc: Jean-Christophe PLAGNIOL-VILLARD Cc: Simon Arlott Cc: John Crispin Cc: Dong Aisheng Cc: Shawn Guo Cc: Stephen Warren --- drivers/pinctrl/pinctrl-at91.c|2 +- drivers/pinctrl/pinctrl-bcm2835.c |2

[PATCH 1/2] pinctrl: lantiq: Remove ltq_pmx_disable() function

2012-11-07 Thread Axel Lin
Current code adds empty ltq_pmx_disable() because pinmux_check_ops() requires this callback to be defined. This is not required since commit 02b50ce4cb1 "pinctrl: make pinmux disable function optional". Thus remove ltq_pmx_disable() function. Signed-off-by: Axel Lin --- drive

[PATCH 2/2] pinctrl: lantiq: Staticize ltq_pinctrl_dt_free_map

2012-11-07 Thread Axel Lin
It is not referenced outside of this file. Signed-off-by: Axel Lin --- drivers/pinctrl/pinctrl-lantiq.c |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/pinctrl/pinctrl-lantiq.c b/drivers/pinctrl/pinctrl-lantiq.c index d670ad6..4eb6854 100644 --- a/drivers

Re: [PATCH 2/2] pinctrl: lantiq: Staticize ltq_pinctrl_dt_free_map

2012-11-07 Thread Axel Lin
於 三,2012-11-07 於 23:58 +0800,Axel Lin 提到: > It is not referenced outside of this file. Oh. Both ltq_pinctrl_dt_free_map and ltq_pinctrl_dt_node_to_map are only used in this file. I'll resend this patch. Axel -- To unsubscribe from this list: send the line "unsubscribe linux-kernel

[PATCH 2/2] pinctrl: lantiq: Staticize non-exported symbols

2012-11-07 Thread Axel Lin
Both ltq_pinctrl_dt_node_to_map() and ltq_pinctrl_dt_free_map() are not referenced outside of this file. Make them static. Signed-off-by: Axel Lin --- drivers/pinctrl/pinctrl-lantiq.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/pinctrl/pinctrl

[PATCH] gpio: mvebu: Set free callback for gpio_chip

2012-11-07 Thread Axel Lin
We call pinctrl_request_gpio() in request callback, thus we need to call pinctrl_free_gpio() in free callback. Both mvebu_gpio_request() and mvebu_gpio_free() are not referenced outside of this file, make them static. Signed-off-by: Axel Lin --- drivers/gpio/gpio-mvebu.c |5 +++-- 1 file

[PATCH 1/2] gpio: tegra: Staticize non-exported symbols

2012-11-07 Thread Axel Lin
Both tegra_gpio_request() and tegra_gpio_free() are not referenced outside of this file, make them static. Signed-off-by: Axel Lin --- drivers/gpio/gpio-tegra.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c index

[PATCH 2/2] gpio: tegra: Drop exporting static functions

2012-11-07 Thread Axel Lin
Both tegra_gpio_enable() and tegra_gpio_disable() are static functions, it does not make sense to export them. Signed-off-by: Axel Lin --- drivers/gpio/gpio-tegra.c |2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c index d5c01f0

[PATCH] mfd: rtsx_pcr: Include linux/slab.h to fix build error

2012-11-08 Thread Axel Lin
out a cast [enabled by default] cc1: some warnings being treated as errors make[2]: *** [drivers/mfd/rtsx_pcr.o] Error 1 make[1]: *** [drivers/mfd] Error 2 make: *** [drivers] Error 2 Signed-off-by: Axel Lin --- drivers/mfd/rtsx_pcr.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mfd

[PATCH] misc: apds9802als: Fix checking timeout in als_wait_for_data_ready()

2012-11-08 Thread Axel Lin
In the case of timeout waiting for data ready, the retry variable is -1. This also fixes a bug: current code returns -ETIMEDOUT if latest retry success ( which means retry is 0 when exiting the while loop ). Signed-off-by: Axel Lin --- drivers/misc/apds9802als.c |2 +- 1 file changed, 1

[PATCH] pwm: spear: Staticize spear_pwm_config()

2012-11-09 Thread Axel Lin
spear_pwm_config() is not referenced outside of this file, make it static. 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/pwm/pwm-spear.c index 6a8fd9b..83b21d9 100644 --- a/drivers

[PATCH] pinctrl: pinmux: Release all taken pins in pinmux_enable_setting error paths

2012-11-10 Thread Axel Lin
Currently pinmux_enable_setting does not release all taken pins if ops->enable() returns error. This patch ensures all taken pins are released in any error paths. Signed-off-by: Axel Lin --- drivers/pinctrl/pinmux.c | 28 +--- 1 file changed, 21 insertions(+)

[PATCH RFT 1/2] pinctrl: dove: Fix dove_audio1_ctrl_set when BIT(0|1|2|3) of config is clear

2012-11-10 Thread Axel Lin
Current implementation in dove_audio1_ctrl_set() does not clear corresponding register bit if BIT(0|1|2|3) of config is clear. Fix it. Signed-off-by: Axel Lin --- Hi, I don't have this hardware. I'd appreciate if someone can review and test this patch. Thanks, Axel drivers/pin

[PATCH RFT 2/2] pinctrl: dove: Checking valid config in dove_audio1_ctrl_set

2012-11-10 Thread Axel Lin
Move the code checking valid config to dove_audio1_ctrl_set(), this ensures we always set valid config. And then dove_audio1_ctrl_get() always returns correct config. Signed-off-by: Axel Lin --- drivers/pinctrl/mvebu/pinctrl-dove.c | 13 +++-- 1 file changed, 7 insertions(+), 6

[PATCH 1/2] pinctrl: tegra: Make PINCTRL_TEGRA select PINMUX && PINCONF

2012-11-10 Thread Axel Lin
Then we can remove "select PINMUX && PINCONF" from PINCTRL_TEGRA{20,30}. This simplifies the dependency. Signed-off-by: Axel Lin --- drivers/pinctrl/Kconfig |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/pinctrl/Kconfig b/drivers/pin

[PATCH 2/2] pinctrl: mxs: Make PINCTRL_MXS select PINMUX && PINCONF

2012-11-10 Thread Axel Lin
Then we can remove "select PINMUX && PINCONF" from PINCTRL_IMX{23,28}. This simplifies the dependency. Signed-off-by: Axel Lin --- drivers/pinctrl/Kconfig |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kco

[PATCH] pinctrl: spear: Staticize non-exported symbols

2012-11-10 Thread Axel Lin
They are not referenced outside of this file, make them static. Signed-off-by: Axel Lin --- drivers/pinctrl/spear/pinctrl-spear.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/pinctrl/spear/pinctrl-spear.c b/drivers/pinctrl/spear/pinctrl-spear.c

[PATCH] pinctrl: tegra: Staticize non-exported symbols

2012-11-10 Thread Axel Lin
They are not referenced outside of this file, make them static. Signed-off-by: Axel Lin --- drivers/pinctrl/pinctrl-tegra.c | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/drivers/pinctrl/pinctrl-tegra.c b/drivers/pinctrl/pinctrl-tegra.c index

[PATCH RFT 1/2] pinctrl: dove: Fix dove_audio1_ctrl_set when BIT(0|1|2|3) of config is clear

2012-11-11 Thread Axel Lin
Current implementation in dove_audio1_ctrl_set() does not clear corresponding register bit if BIT(0|1|2|3) of config is clear. Fix it. Signed-off-by: Axel Lin --- Hi, I don't have this hardware. I'd appreciate if someone can review and test this patch. This resend also CC Sebastian H

[PATCH RFT 2/2] pinctrl: dove: Checking valid config in dove_audio1_ctrl_set

2012-11-11 Thread Axel Lin
Move the code checking valid config to dove_audio1_ctrl_set(), this ensures we always set valid config. And then dove_audio1_ctrl_get() always returns correct config. Signed-off-by: Axel Lin --- drivers/pinctrl/mvebu/pinctrl-dove.c | 13 +++-- 1 file changed, 7 insertions(+), 6

[PATCH] regulator: lp8755: Fix mask for pchip->mphase

2012-12-25 Thread Axel Lin
, the mask for pchip->mphase should be 0x17. Otherwise, we cannot differentiate MPHASE_CONF0 and MPHASE_CONF8. Signed-off-by: Axel Lin --- Hi Daniel, I don't have the datasheet, can you check if this patch is correct? BTW, I'm Axel, not Alex. Regards, Axel drivers/regulator/lp8755.c

[PATCH v2] regulator: lp8755: Fix mask for pchip->mphase

2012-12-25 Thread Axel Lin
According to the datasheet, it has 9 multi-phase mode from 0 to 8 and it takes 4 bits in the register. The mask for pchip->mphase should be 0x0F. Signed-off-by: Axel Lin --- v2. the mask should be 0x0f rather than 0x17. drivers/regulator/lp8755.c |2 +- 1 file changed, 1 insertion(+)

[PATCH 1/2] regulator: max8997: Remove set_voltage_time_sel setting for max8997_ldo_ops

2012-12-26 Thread Axel Lin
max8997_set_voltage_ldobuck_time_sel() returns 0 for all LDOs. Thus remove set_voltage_time_sel setting for max8997_ldo_ops. max8997_set_voltage_ldobuck_time_sel() is only used for max8997_buck_ops now, rename it to max8997_set_voltage_buck_time_sel(). Signed-off-by: Axel Lin --- drivers

[PATCH 2/2] regulator: max8997: Convert max8997_safeout_ops to set_voltage_sel and list_voltage_table

2012-12-26 Thread Axel Lin
Signed-off-by: Axel Lin --- drivers/regulator/max8997.c | 76 ++- 1 file changed, 18 insertions(+), 58 deletions(-) diff --git a/drivers/regulator/max8997.c b/drivers/regulator/max8997.c index 57e8907..c30424a 100644 --- a/drivers/regulator/max8997.c

[PATCH RESEND] regulator: lp3972: Convert to get_voltage_sel

2012-12-27 Thread Axel Lin
regulator_list_voltage_table() returns -EINVAL if selector >= n_voltages. Thus we don't need to check if reg is greater than LP3972_BUCK_VOL_MAX_IDX in lp3972_[ldo|dcdc]_get_voltage_sel. LP3972_BUCK_VOL_MIN_IDX and LP3972_BUCK_VOL_MAX_IDX are not used, remove them. Signed-off-by:

[PATCH 1/3] regulator: max8997: Use uV in voltage_map_desc

2012-12-28 Thread Axel Lin
max8997_get_voltage_proper_val returns 800 mV for this case which is lower than the requested voltage. Use uV rather than mV in voltage_map_desc to prevent truncation by integer division. Signed-off-by: Axel Lin --- drivers/regulator/max8997.c | 36 +--- 1 file changed, 17 insertions

[PATCH 2/3] regulator: max8998: Use uV in voltage_map_desc

2012-12-28 Thread Axel Lin
Integer division may truncate. This happens when pdata->buckx_voltagex setting is not align with 1000 uV. Thus use uV in voltage_map_desc, this ensures the selected voltage won't less than pdata buckx_voltagex settings. Signed-off-by: Axel Lin --- drivers/regulator/max8998.

[PATCH 3/3] regulator: max8998: Return enough delay time for max8998_set_voltage_buck_time_sel

2012-12-28 Thread Axel Lin
with old_selector. Signed-off-by: Axel Lin --- drivers/regulator/max8998.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/drivers/regulator/max8998.c b/drivers/regulator/max8998.c index 06be8cc..26e5915 100644 --- a/drivers/regulator/max8998.c +++ b/drivers

[PATCH RFT] regulator: s5m8767: Convert to regulator_[get|set]_voltage_sel_regmap

2012-12-28 Thread Axel Lin
Signed-off-by: Axel Lin --- drivers/regulator/s5m8767.c | 50 +++ 1 file changed, 12 insertions(+), 38 deletions(-) diff --git a/drivers/regulator/s5m8767.c b/drivers/regulator/s5m8767.c index 33b65c9..eeadf58 100644 --- a/drivers/regulator/s5m8767.c

[PATCH] regulator: s5m8767: Remove max_vol parameter from s5m8767_convert_voltage_to_sel

2012-12-28 Thread Axel Lin
It looks pointless to pass max_vol to s5m8767_convert_voltage_to_sel(). Compare selected voltage to desc->max is enough to ensure selected voltage is in supported range. Signed-off-by: Axel Lin --- drivers/regulator/s5m8767.c | 33 ++--- 1 file changed,

[PATCH] regulator: core: Fix comment for regulator_register()

2013-01-03 Thread Axel Lin
regulator_register() does not return 0 on success, fix the comment. Signed-off-by: Axel Lin --- drivers/regulator/core.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 9afcdda3..861cda1 100644 --- a/drivers

[PATCH RFT] regulator: lp8788-ldo: Use ldo->en_pin to check if regulator is enabled by external pin

2013-01-04 Thread Axel Lin
rn_pin() and lp8788_ldo_is_enabled_by_extern_pin() functions are not used now, remove them. Signed-off-by: Axel Lin --- drivers/regulator/lp8788-ldo.c | 107 ++-- 1 file changed, 14 insertions(+), 93 deletions(-) diff --git a/drivers/regulator/lp8788-ldo.c b/d

[PATCH 1/4] regulator: core: Allow specify apply_[reg|bit] for regmap based voltage_sel operations

2012-12-17 Thread Axel Lin
Some DVM regulators needs to update apply_bit after setting vsel_reg to initiate voltage change on the output. This patch adds apply_reg and apply_bit to struct regulator_desc and update regulator_set_voltage_sel_regmap() to set apply_bit of apply_reg when apply_bit is set. Signed-off-by: Axel

[PATCH 3/4] regulator: da9052: Use apply_[reg|bit] with regmap based voltage_sel operations

2012-12-17 Thread Axel Lin
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..c6d8651 100644 --- a/drivers

[PATCH 2/4] regulator: 88pm8607: Use apply_[reg|bit] with regmap based voltage_sel operations

2012-12-17 Thread Axel Lin
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..9ebdf8c 100644 --- a/drivers/regulator/88pm8607.c

[PATCH] iio: dac: ad5446: Don't set error code to voltage_uv

2012-12-17 Thread Axel Lin
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/ad5446.c |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/iio/dac/ad5446.c b/drivers/iio/dac

[PATCH 4/4] regulator: tps6586x: Use apply_[reg|bit] with regmap based voltage_sel operations

2012-12-17 Thread Axel Lin
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..e68382d 100644 --- a/drivers

[PATCH v2] iio: dac: ad5446: Don't set error code to voltage_uv

2012-12-17 Thread Axel Lin
regulator_get_voltage() may return negative error code. Add error checking to avoid setting error code to voltage_uv. Signed-off-by: Axel Lin --- Sorry. Just found I made the same mistake again. Here is v2, should check if ret is negative value. drivers/iio/dac/ad5446.c |6 +- 1 file

[PATCH] clk: max77686: Fix return value checking for devm_kzalloc

2012-12-17 Thread Axel Lin
devm_kzalloc returns NULL on failure. Signed-off-by: Axel Lin --- drivers/clk/clk-max77686.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/clk/clk-max77686.c b/drivers/clk/clk-max77686.c index d098f72..8944214 100644 --- a/drivers/clk/clk-max77686.c +++ b

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

2012-12-17 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 --- drivers/clk/clk-max77686.c | 30 -- 1 file changed, 8 insertions(+), 22 deletions

[PATCH] rtc: tx4939: Kill get_tx4939rtc_plat_data() function

2012-12-19 Thread Axel Lin
Simply use dev_get_drvdata() instead. Signed-off-by: Axel Lin --- drivers/rtc/rtc-tx4939.c | 21 - 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/drivers/rtc/rtc-tx4939.c b/drivers/rtc/rtc-tx4939.c index a12bfac..b570d02 100644 --- a/drivers/rtc/rtc-tx4939

[PATCH] regulator: twl: Convert twl[6030|4030]fixed_ops to regulator_list_voltage_linear

2012-12-21 Thread Axel Lin
Signed-off-by: Axel Lin --- drivers/regulator/twl-regulator.c | 15 +++ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/drivers/regulator/twl-regulator.c b/drivers/regulator/twl-regulator.c index 493c8c6..87c55d0 100644 --- a/drivers/regulator/twl-regulator.c +++ b

[PATCH] dma: intel_mid: Remove return statements at the end of all void functions

2012-12-21 Thread Axel Lin
Signed-off-by: Axel Lin --- drivers/dma/intel_mid_dma.c |9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/dma/intel_mid_dma.c b/drivers/dma/intel_mid_dma.c index bc764af..1a83d1d 100644 --- a/drivers/dma/intel_mid_dma.c +++ b/drivers/dma/intel_mid_dma.c

[PATCH 1/2] [PATCH] regulator: 88pm8607: Update update_bit for BUCK2 in pm8607_set_voltage_sel

2012-12-23 Thread Axel Lin
BUCK2 has the update_bit setting, but current code does not set update_bit in pm8607_set_voltage_sel. Signed-off-by: Axel Lin --- hi Haojian, I prefer no behavior change during API conversion. So I send this fix first, next patch is on top of this patch. Regards, Axel drivers/regulator

[PATCH v2 2/2] regulator: 88pm8607: Use apply_[reg|bit] with regmap based voltage_sel operations

2012-12-23 Thread Axel Lin
Signed-off-by: Axel Lin --- drivers/regulator/88pm8607.c | 38 ++ 1 file changed, 6 insertions(+), 32 deletions(-) diff --git a/drivers/regulator/88pm8607.c b/drivers/regulator/88pm8607.c index 5c4879a..a957e8c 100644 --- a/drivers/regulator/88pm8607.c

[PATCH 1/2] mfd: max77686: Init max77686->dev before using it

2012-12-24 Thread Axel Lin
Current code uses max77686->dev in the dev_err call before setting it to &i2c->dev. Fix it. Signed-off-by: Axel Lin --- drivers/mfd/max77686.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/mfd/max77686.c b/drivers/mfd/max77686.c ind

[PATCH 2/2] mfd: max77693: Init max77693->dev before using it

2012-12-24 Thread Axel Lin
p init for muic fails. Signed-off-by: Axel Lin --- drivers/mfd/max77693.c | 34 ++ 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/drivers/mfd/max77693.c b/drivers/mfd/max77693.c index cc5155e..9e60fed 100644 --- a/drivers/mfd/max77693.c +++ b/d

[PATCH] regulator: lp8755: Fix lp8755_regulator_init unwind code

2012-12-24 Thread Axel Lin
. This patch also includes below cleanups: Show correct regulator id in dev_err. Remove __devexit_p. Signed-off-by: Axel Lin --- drivers/regulator/lp8755.c |9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/regulator/lp8755.c b/drivers/regulator/lp8755.c index dbc4d

[PATCH] mfd: pcf50633: Init pcf->dev before using it

2012-12-24 Thread Axel Lin
Current code uses pcf->dev in the dev_err call before setting it to &client->dev. Fix it. Signed-off-by: Axel Lin --- drivers/mfd/pcf50633-core.c |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/mfd/pcf50633-core.c b/drivers/mfd/pcf50633-core.c ind

[PATCH] pinctrl: nomadik: Staticize non-exported symbols

2012-11-15 Thread Axel Lin
They are not referenced outside of this file, make them static. Signed-off-by: Axel Lin --- drivers/pinctrl/pinctrl-nomadik.c | 26 -- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/drivers/pinctrl/pinctrl-nomadik.c b/drivers/pinctrl/pinctrl-nomadik.c

[PATCH RFT] regulator: da9055: Fix checking wrong value in da9055_gpio_init

2012-11-15 Thread Axel Lin
Check pdata->gpio_rsel && pdata->gpio_rsel[id] for the case GPI pin is muxed with regulator to select the regulator register set A/B for voltage ramping. Signed-off-by: Axel Lin --- Hi Ashish, I'm wondering if this is a typo or I misunderstand the code. Axel drivers/regulator

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

2012-11-16 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 --- This was sent on https://lkml.org/lkml/2012/10/11/77 Nobody picks up this patch, so resend it. I think this patch is for 3.7. Regards

Re: [PATCH RFT 1/2] pinctrl: dove: Fix dove_audio1_ctrl_set when BIT(0|1|2|3) of config is clear

2012-11-16 Thread Axel Lin
2012/11/12 Sebastian Hesselbarth : > On 11/11/2012 02:44 PM, Axel Lin wrote: >> >> Current implementation in dove_audio1_ctrl_set() does not clear >> corresponding >> register bit if BIT(0|1|2|3) of config is clear. Fix it. >> >> Signed-off-by: Axel Lin >

[PATCH RESEND] misc: apds9802als: Fix the logic checking timeout in als_wait_for_data_ready()

2012-11-16 Thread Axel Lin
In the case of timeout waiting for data ready, the retry variable is -1. This also fixes a bug: current code returns -ETIMEDOUT if latest retry success ( which means retry is 0 when exiting the while loop ). Signed-off-by: Axel Lin --- Resend to Greg's correct email address. drivers

Re: [PATCH RFT 1/2] pinctrl: dove: Fix dove_audio1_ctrl_set when BIT(0|1|2|3) of config is clear

2012-11-16 Thread Axel Lin
> pinctrl for Dove will not be enabled before DT clock support for Dove, > which will hopefully make it into 3.8. If you agree, I will test and push it > with the related patches for enabling pinctrl. Ok. Thanks. Axel -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in th

[PATCH RFT] mfd: rc5t583: Fix array subscript is above array bounds

2012-11-19 Thread Axel Lin
T_EN_REGS to fix this bug. Signed-off-by: Axel Lin --- Hi Laxman, I don't have this hardware, I'd appreciate if you can review and test this patch. Thank you, Axel drivers/mfd/rc5t583-irq.c |2 +- include/linux/mfd/rc5t583.h |3 ++- 2 files changed, 3 insertions(+), 2 del

[PATCH RFT] regulator: da9055: Fix return wrong selector in da9055_regulator_get_voltage_sel

2012-11-19 Thread Axel Lin
we pass wrong selector for list_voltage callback. Signed-off-by: Axel Lin --- drivers/regulator/da9055-regulator.c |7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/regulator/da9055-regulator.c b/drivers/regulator/da9055-regulator.c index 79c5665..dbcb4

[PATCH RFT] regulator: da9055: Properly handle voltage range that doesn't start with 0 offset

2012-11-19 Thread Axel Lin
selector before calling list_voltage callback. Signed-off-by: Axel Lin --- Hi Ashish, I don't have this hardware to test this patch. Can you help to review and test this patch? Thank you, Axel drivers/regulator/da9055-regulator.c | 80 +- 1 file c

[PATCH] regulator: as3711: Use a static of_regulator_match table for of_regulator_match

2013-04-16 Thread Axel Lin
The same table can be used for multiple instance of pdev, so we don't need to allocate memory for of_regulator_match table per pdev. Signed-off-by: Axel Lin --- drivers/regulator/as3711-regulator.c | 46 ++ 1 file changed, 19 insertions(+), 27 dele

regulator: tps80031: question about LDO2 TRACK_MODE_ENABLE of TPS80031 or TPS80032-ES1.0

2013-04-16 Thread Axel Lin
hi Laxman, Currently we have below code in tps80031_ldo_set_voltage_sel(): /* Check for valid setting for TPS80031 or TPS80032-ES1.0 */ if ((ri->rinfo->desc.id == TPS80031_REGULATOR_LDO2) && (ri->device_flags & TRACK_MODE_ENABLE)) { unsigned

[PATCH v2] regulator: as3711: Use a static of_regulator_match table for of_regulator_match

2013-04-17 Thread Axel Lin
a in the of_regulator_match table. Signed-off-by: Axel Lin --- drivers/regulator/as3711-regulator.c | 43 ++ 1 file changed, 18 insertions(+), 25 deletions(-) diff --git a/drivers/regulator/as3711-regulator.c b/drivers/regulator/as3711-regulator.c index 0539b3e.

[RFT][PATCH 1/2] regulator: tps80031: Fix LDO2 track mode for TPS80031 or TPS80032-ES1.0

2013-04-17 Thread Axel Lin
ES1.0 in list_voltage. So it returns -EINVAL for invalid selectors. 2. Implement tps80031_ldo_map_voltage, use regulator_map_voltage_iterate() to find the lowest voltage within specific range for TPS80031 or TPS80032-ES1.0. This is required when the voltage map is no longer linear. Signed

[RFT][PATCH 2/2] regulator: tps80031: Convert tps80031_dcdc_ops to [get|set]_voltage_sel_regmap

2013-04-17 Thread Axel Lin
Signed-off-by: Axel Lin --- drivers/regulator/tps80031-regulator.c | 39 +--- 1 file changed, 6 insertions(+), 33 deletions(-) diff --git a/drivers/regulator/tps80031-regulator.c b/drivers/regulator/tps80031-regulator.c index 6430789..6511d0b 100644 --- a/drivers

[PATCH 1/2] regulator: ab8500: Remove unused voltage_shift field from struct expand_register

2013-04-17 Thread Axel Lin
The voltage_shift field of struct expand_register is not used now, remove it. Signed-off-by: Axel Lin --- drivers/regulator/ab8500.c |2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/regulator/ab8500.c b/drivers/regulator/ab8500.c index 279793e..ece31a3 100644 --- a/drivers

[PATCH 2/2] regulator: ab8500: Get rid of voltage_shift field from struct ab8500_regulator_info

2013-04-17 Thread Axel Lin
The voltage_shift can be calculated from voltage_mask. Let's remove voltage_shift fied from struct ab8500_regulator_info, this change can prevent missing voltage_shift setting issue. Signed-off-by: Axel Lin --- drivers/regulator/ab8500.c | 33 - 1 file ch

[PATCH RFC] regulator: core: Add regulator_map_voltage_ascend() API

2013-04-17 Thread Axel Lin
-by: Axel Lin --- drivers/regulator/core.c | 28 include/linux/regulator/driver.h |2 ++ 2 files changed, 30 insertions(+) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 23df943..fde1d47 100644 --- a/drivers/regulator/core.c +++ b

[PATCH RFC v2] regulator: core: Add regulator_map_voltage_ascend() API

2013-04-17 Thread Axel Lin
-by: Axel Lin --- v2: Since the voltage list is in ascendant order, and we iterate the list from the smallest voltage. So it is safe to break out if the voltage is greater than max_uV. drivers/regulator/core.c | 31 +++ include/linux/regulator/driver.h |2

[PATCH] regulator: Remove unnecessary include of linux/delay.h from regulator drivers

2013-04-17 Thread Axel Lin
the unneeded include of linux/delay.h in regulator drivers. Signed-off-by: Axel Lin Cc: Daniel Jeong Cc: Sangbeom Kim Cc: Chiwoong Byun --- drivers/regulator/lp8755.c |1 - drivers/regulator/max77686.c |1 - drivers/regulator/s2mps11.c |1 - 3 files changed, 3 deletions

[PATCH RFT] regulator: palmas: Fix min_uV for LDO8 tracking mode

2013-04-18 Thread Axel Lin
When SMPS45 is set to off and LDO8 tracking is enabled, the output voltage can be set from 0.45 to 1.65 V. Thus set min_uV to be 45. Signed-off-by: Axel Lin --- Hi Laxman, My understanding is based on your comment in the code. /* * When SMPS45 is set to off and LDO8 tracking

[PATCH RFT] regulator: palmas: Remove wrong voltage setting for enabling LDO8 tracking mode

2013-04-18 Thread Axel Lin
el register, multiple the register value by 2 and then write back to the register. Signed-off-by: Axel Lin --- Hi Laxman, Current code looks strange (and wrong) to me. I don't see the point of reading vsel register, multiple the register value by 2 and then write back to the register. Can you d

[PATCH RFT] regulator: palmas: Don't update tstep register for SMPS3 and SMPS7

2013-04-18 Thread Axel Lin
SMPS3 and SMPS7 do not have tstep_addr setting, so current code actually writes 0 to PALMAS_SMPS12_CTRL(0x0) register when set_ramp_delay callback is called for SMPS3 and SMPS7. Signed-off-by: Axel Lin --- drivers/regulator/palmas-regulator.c |4 1 file changed, 4 insertions(+) diff

[PATCH RFT v2] regulator: palmas: Don't update tstep register for SMPS3 and SMPS7

2013-04-18 Thread Axel Lin
SMPS3 and SMPS7 do not have tstep_addr setting, so current code actually writes 0 to smps12_ctl (offset is 0) register when set_ramp_delay callback is called for SMPS3 and SMPS7. Signed-off-by: Axel Lin --- drivers/regulator/palmas-regulator.c |7 +++ 1 file changed, 7 insertions

[PATCH] regulator: palmas: Add missing ctrl_addr setting for SMPS10

2013-04-19 Thread Axel Lin
The ctrl_addr setting for SMPS10 is missed, thus palmas_smps_init() read/write wrong register for SMPS10 in current code. Fix it. Signed-off-by: Axel Lin --- drivers/regulator/palmas-regulator.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/regulator/palmas-regulator.c b

[PATCH] regulator: tps65910: Convert to use regulator_map_voltage_ascend

2013-04-19 Thread Axel Lin
regulator_map_voltage_ascend rather than use default regulator_map_voltage_iterate. For consistent, convert all regulators to regulator_map_voltage_ascend. Signed-off-by: Axel Lin --- drivers/regulator/tps65910-regulator.c |4 1 file changed, 4 insertions(+) diff --git a/drivers/regulator

[PATCH] regulator: tps6586x: Convert to use regulator_map_voltage_ascend

2013-04-19 Thread Axel Lin
All regulators have ascendant voltage list in this driver. Thus use regulator_map_voltage_ascend is more efficient than the default regulator_map_voltage_iterate. Signed-off-by: Axel Lin --- drivers/regulator/tps6586x-regulator.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers

[RFC/RFT][PATCH] regulator: palmas: Convert to use regulator_set_voltage_time_sel()

2013-04-20 Thread Axel Lin
->ramp_delay but a value from pmic->ramp_delay[id]. So palma_smps_set_voltage_smps_time_sel() may return a smaller delay than regulator_set_voltage_time_sel() depend on rdev->constraints->ramp_delay value. I think the delay in both version are *safe* for the operation. Signed-off-by

[PATCH 1/2] regulator: lp3971: Convert to use regulator_map_voltage_ascend

2013-04-20 Thread Axel Lin
All regulators have ascendant voltage list in this driver. Thus use regulator_map_voltage_ascend is more efficient than the default regulator_map_voltage_iterate. Signed-off-by: Axel Lin --- drivers/regulator/lp3971.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/regulator

[PATCH 2/2] regulator: lp3972: Convert to use regulator_map_voltage_ascend

2013-04-20 Thread Axel Lin
All regulators have ascendant voltage list in this driver. Thus use regulator_map_voltage_ascend is more efficient than the default regulator_map_voltage_iterate. Signed-off-by: Axel Lin --- drivers/regulator/lp3972.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/regulator

[PATCH RFT] regulator: palmas: Fix off-by-one for ramp_delay and register value mapping

2013-04-21 Thread Axel Lin
p_delay() ramp_delay = 5000 is mapping to reg value = 1. This patch fixes the off-by-one value range checking for ramp_delay in palmas_smps_set_ramp_delay(). Signed-off-by: Axel Lin --- Hi Laxman, I don't have the datasheet, so please check if this fix is correct. Thanks, Axel drivers/regu

[PATCH RESEND] regulator: palmas: Fix off-by-one for ramp_delay and register value mapping

2013-04-22 Thread Axel Lin
5mV/us (default) TSTEP[1:0]: 11 2.5mV/us Signed-off-by: Axel Lin --- This resend updates the commit log. drivers/regulator/palmas-regulator.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/regulator/palmas-regulator.c b/drivers/regulator/palmas-regulator.c

[PATCH] regulator: tps65023: Use [set|get]_voltage_sel_regmap instead of open coded

2013-04-22 Thread Axel Lin
Simply the [get|set]_voltage_sel implementation by using regulator_[set|get]_voltage_sel_regmap instead of open coded. Signed-off-by: Axel Lin --- drivers/regulator/tps65023-regulator.c | 31 +-- 1 file changed, 9 insertions(+), 22 deletions(-) diff --git a

[PATCH] regulator: tps62360: Fix off-by-one shift for ramp_ctrl

2013-04-22 Thread Axel Lin
111 0.25mV/us Thus to get correct ramp_ctrl value, we need to right-shift 5 bits. [1] http://www.ti.com/lit/ds/symlink/tps62360.pdf Signed-off-by: Axel Lin --- drivers/regulator/tps62360-regulator.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator

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

2013-04-22 Thread Axel Lin
bit. In lpc32xx_pwm_disable(), we should just clear PWM_ENABLE bit rather than write 0 to the register which will also 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

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

2013-04-22 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 |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/pwm/pwm-lpc32xx.c b/drivers/pwm/pwm-lpc32xx.c index

[PATCH] regulator: max8973: Don't override control1 variable when set ramp delay bits

2013-04-23 Thread Axel Lin
Current code overrides control1 variable when setting ramp delay bits. Fix it by just setting ramp_delay bits. Signed-off-by: Axel Lin --- drivers/regulator/max8973-regulator.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/regulator/max8973-regulator.c

[linux-next 20130619] make at91x40_defconfig build error

2013-06-20 Thread Axel Lin
Hi, Test on linux-next 20130619. I Got below build error by "make at91x40_defconfig; make" fs/built-in.o: In function `copy_strings': super.c:(.text+0x6398): undefined reference to `flush_kernel_dcache_page' super.c:(.text+0x6420): undefined reference to `flush_kernel_dcache_page' lib/built-in.o:

[PATCH] pinctrl: rockchip: Add missing irq_gc_unlock() call before return error

2013-06-22 Thread Axel Lin
Signed-off-by: Axel Lin --- drivers/pinctrl/pinctrl-rockchip.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/pinctrl/pinctrl-rockchip.c b/drivers/pinctrl/pinctrl-rockchip.c index 427564f..1eb5a2e 100644 --- a/drivers/pinctrl/pinctrl-rockchip.c +++ b/drivers/pinctrl/pinctrl

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