[PATCH] gpio: em: Fix build errors

2012-10-31 Thread Axel Lin
make: *** [drivers] Error 2 Signed-off-by: Axel Lin axel@ingics.com --- drivers/gpio/gpio-em.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpio/gpio-em.c b/drivers/gpio/gpio-em.c index 88bdfe3..b007063 100644 --- a/drivers/gpio/gpio-em.c +++ b/drivers

[PATCH] regulator: Fix trivial typo for TPS51632 Kconfig help text

2012-11-01 Thread Axel Lin
Signed-off-by: Axel Lin axel@ingics.com --- drivers/regulator/Kconfig |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig index 7b920c7..cbc685d 100644 --- a/drivers/regulator/Kconfig +++ b/drivers/regulator/Kconfig

regulator: tps51632: Seems current code doesn't properly support dvfs_step_20mV case

2012-11-01 Thread Axel Lin
Hi Laxman, While reading the tps51632 driver, I found there is a dvfs_step_20mV setting in platform data. But seems current code doesn't properly handle the case when dvfs_step_20mV is true. I guess if pdata-dvfs_step_20mV is true, we need: tps-desc.uV_step = TPS51632_VOLATGE_STEP_20mV; Fix

[PATCH] irqchip: irq-bcm2835: Add terminating entry for of_device_id table

2012-11-01 Thread Axel Lin
The of_device_id table is supposed to be zero-terminated. Signed-off-by: Axel Lin axel@ingics.com --- drivers/irqchip/irq-bcm2835.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-bcm2835.c b/drivers/irqchip/irq-bcm2835.c index dc670cc..16c78f1

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

2012-11-02 Thread Axel Lin
The of_device_id table is supposed to be zero-terminated. Signed-off-by: Axel Lin axel@ingics.com --- drivers/pinctrl/pinctrl-exynos.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/pinctrl/pinctrl-exynos.c b/drivers/pinctrl/pinctrl-exynos.c index 73a0aa2..b023254 100644

[PATCH] memory: emif: Add ifdef CONFIG_DEBUG_FS guard for emif_debugfs_[init|exit]

2012-09-24 Thread Axel Lin
Add ifdef CONFIG_DEBUG_FS guard for emif_debugfs_[init|exit], and adds stub functions for the case CONFIG_DEBUG_FS is not set. When CONFIG_DEBUG_FS is enabled, debugfs_create_dir and debugfs_create_file return NULL on failure, fix it. Signed-off-by: Axel Lin axel@ingics.com --- drivers

[PATCH] extcon: adc-jack: Fix checking return value of request_any_context_irq

2012-09-27 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. Also ensure adc_jack_probe() return 0 on success. Signed-off-by: Axel Lin axel@ingics.com --- drivers/extcon/extcon-adc-jack.c |5 ++--- 1 file changed, 2

[PATCH] extcon: adc-jack: Add missing MODULE_LICENSE

2012-09-27 Thread Axel Lin
This driver can be built as a module, add MODULE_LICENSE for it. For completeness, also adds MODULE_AUTHOR and MODULE_DESCRIPTION. Signed-off-by: Axel Lin axel@ingics.com --- drivers/extcon/extcon-adc-jack.c |5 + 1 file changed, 5 insertions(+) diff --git a/drivers/extcon/extcon

[PATCH] mfd: Remove incorrect Kconfig help text for MFD_TPS6586X, MFD_SMSC and MFD_DA9055

2012-10-07 Thread Axel Lin
For MFD_TPS6586X, MFD_SMSC and MFD_DA9055, these drivers can only be built as built-in, thus remove incorrect help text in Kconfig entries. Signed-off-by: Axel Lin axel@ingics.com --- drivers/mfd/Kconfig |9 - 1 file changed, 9 deletions(-) diff --git a/drivers/mfd/Kconfig b

[PATCH] ARM: OMAP: Fix dependency for OMAP_DEBUG_LEDS

2012-10-07 Thread Axel Lin
-leds.c:113: more undefined references to `led_classdev_register' follow make: *** [vmlinux] Error 1 Signed-off-by: Axel Lin axel@ingics.com --- Hi Bryan, I think this issue is introduced by commit dafbead ARM: mach-omap1: retire custom LED code. Regards, Axel arch/arm/plat-omap/Kconfig |2

[PATCH v2] ARM: OMAP: Fix dependency for OMAP_DEBUG_LEDS

2012-10-07 Thread Axel Lin
-in.o:arch/arm/plat-omap/debug-leds.c:113: more undefined references to `led_classdev_register' follow make: *** [vmlinux] Error 1 Signed-off-by: Axel Lin axel@ingics.com --- arch/arm/plat-omap/Kconfig |1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm

[PATCH] pinctrl: nomadik: Add terminating entry for platform_device_id table

2012-11-04 Thread Axel Lin
The platform_device_id table is supposed to be zero-terminated. Signed-off-by: Axel Lin axel@ingics.com --- drivers/pinctrl/pinctrl-nomadik.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/pinctrl/pinctrl-nomadik.c b/drivers/pinctrl/pinctrl-nomadik.c index f2fd99b..22f6937

[PATCH] tty: serial: max310x: Add terminating entry for spi_device_id table

2012-11-04 Thread Axel Lin
The spi_device_id table is supposed to be zero-terminated. Signed-off-by: Axel Lin axel@ingics.com --- drivers/tty/serial/max310x.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/tty/serial/max310x.c b/drivers/tty/serial/max310x.c index 2bc28a5..1ab1d2c 100644 --- a/drivers

[PATCH] crypto: picoxcell: Add terminating entry for platform_device_id table

2012-11-04 Thread Axel Lin
The platform_device_id table is supposed to be zero-terminated. Signed-off-by: Axel Lin axel@ingics.com --- drivers/crypto/picoxcell_crypto.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/crypto/picoxcell_crypto.c b/drivers/crypto/picoxcell_crypto.c index 410a03c..f4d3d8f

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

2012-11-05 Thread Axel Lin
Signed-off-by: Axel Lin axel@ingics.com --- drivers/pinctrl/pinctrl-at91.c | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c index 65f066c..b9e2cbd 100644 --- a/drivers/pinctrl/pinctrl

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

2012-11-05 Thread Axel Lin
Staticize u300_pin_config_get() and u300_pin_config_set() functions. Signed-off-by: Axel Lin axel@ingics.com --- drivers/pinctrl/pinctrl-u300.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/pinctrl/pinctrl-u300.c b/drivers/pinctrl/pinctrl-u300.c

[PATCH] pinctrl: sirf: Staticize non-exported symbol

2012-11-05 Thread Axel Lin
Staticize sirfsoc_gpio_irq_map() function. Signed-off-by: Axel Lin axel@ingics.com --- drivers/pinctrl/pinctrl-sirf.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pinctrl/pinctrl-sirf.c b/drivers/pinctrl/pinctrl-sirf.c index 9ecacf3..e3b2c53 100644

[PATCH] pinctrl: samsung: Add ifdef CONFIG_OF_GPIO guard for gc-of_node

2012-11-05 Thread Axel Lin
unused variable 'prop' to silence the build warning. Signed-off-by: Axel Lin axel@ingics.com --- drivers/pinctrl/pinctrl-samsung.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/pinctrl/pinctrl-samsung.c b/drivers/pinctrl/pinctrl-samsung.c index fc34cac..8ea9735

[PATCH v2] pinctrl: samsung: Add ifdef CONFIG_OF_GPIO guard for gc-of_node

2012-11-05 Thread Axel Lin
-samsung.c: In function 'samsung_gpiolib_register': drivers/pinctrl/pinctrl-samsung.c:797:5: error: 'struct gpio_chip' has no member named 'of_node' make[2]: *** [drivers/pinctrl/pinctrl-samsung.o] Error 1 make[1]: *** [drivers/pinctrl] Error 2 make: *** [drivers] Error 2 Signed-off-by: Axel Lin axel

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

2012-11-05 Thread Axel Lin
-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 axel@ingics.com --- drivers/clk/spear

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

2012-11-05 Thread Axel Lin
-off-by: Axel Lin axel@ingics.com --- 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 !SPARC) So I make PINCTRL_SAMSUNG depend on OF GPIOLIB. Regards, Axel

[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 axel@ingics.com --- 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

[PATCH] pinctrl: Staticize pinconf_ops

2012-11-06 Thread Axel Lin
They are not referenced outside respective driver. Signed-off-by: Axel Lin axel@ingics.com Cc: Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com Cc: Simon Arlott si...@fire.lp0.eu Cc: John Crispin blo...@openwrt.org Cc: Dong Aisheng dong.aish...@linaro.org Cc: Shawn Guo shawn

[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 axel@ingics.com

[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 axel@ingics.com --- 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

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 in the body

[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 axel@ingics.com --- drivers/pinctrl/pinctrl-lantiq.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers

[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 axel@ingics.com --- drivers/gpio/gpio-mvebu.c

[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 axel@ingics.com --- drivers/gpio/gpio-tegra.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio

[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 axel@ingics.com --- 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

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

2012-10-10 Thread Axel Lin
Signed-off-by: Axel Lin axel@ingics.com --- 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

[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 axel@ingics.com --- drivers/power/generic-adc-battery.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers

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

2012-10-11 Thread Axel Lin
Signed-off-by: Axel Lin axel@ingics.com --- 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

[PATCH] hwmon: (ina2xx) Use module_i2c_driver macro

2012-10-11 Thread Axel Lin
Signed-off-by: Axel Lin axel@ingics.com --- 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

mfd: rc5t583-irq.c build warning: array subscript is above array bounds

2012-10-25 Thread Axel Lin
hi Laxman, I got below compile warning when build this driver. CC drivers/mfd/rc5t583-irq.o drivers/mfd/rc5t583-irq.c: In function 'rc5t583_irq_sync_unlock': drivers/mfd/rc5t583-irq.c:227: warning: array subscript is above array bounds drivers/mfd/rc5t583-irq.c: In function

[PATCH RFT] leds: blinkm: Avoid calling INIT_WORK in blinkm_led_common_set()

2012-10-26 Thread Axel Lin
blinkm_led in struct blinkm_work, and embedded struct blinkm_work in blinkm_data. With this change, we don't need to allocate and free memory for bl_work in blinkm_led_common_set() and led_work(). Signed-off-by: Axel Lin axel@ingics.com --- Hi Jan-Simon, I don't have this hardware, can you help

[PATCH] iio: hid-sensor: Use __devexit annotation for remove()

2012-10-27 Thread Axel Lin
Use __devexit rather than __devinit annotation for remove(). Also adds __devexit_p around remove callback. Signed-off-by: Axel Lin axel@ingics.com --- drivers/iio/accel/hid-sensor-accel-3d.c |4 ++-- drivers/iio/gyro/hid-sensor-gyro-3d.c |4 ++-- drivers/iio/light/hid

[PATCH] iio: hid-sensor: Return proper error if kmemdup fails

2012-10-27 Thread Axel Lin
Return -ENOMEM instead of 0 if kmemdup fails. Signed-off-by: Axel Lin axel@ingics.com --- drivers/iio/accel/hid-sensor-accel-3d.c |6 +++--- drivers/iio/gyro/hid-sensor-gyro-3d.c |6 +++--- drivers/iio/light/hid-sensor-als.c|5 ++--- drivers/iio

[PATCH RFT] leds: blinkm: Don't init a workqueue per brightness_set call

2012-10-28 Thread Axel Lin
brightness_set call. Signed-off-by: Axel Lin axel@ingics.com --- This patch is v2 of [PATCH RFT] leds: blinkm: Avoid calling INIT_WORK in blinkm_led_common_set() I think the new subject line is better for the reason I sent the patch. v2: Now we have a workqueue per blinkm led. I think the code can

[PATCH] hwmon: da9055: Fix chan_mux[DA9055_ADC_ADCIN3] setting

2012-10-29 Thread Axel Lin
Set chan_mux[DA9055_ADC_ADCIN3] = DA9055_ADC_MUX_ADCIN3. Signed-off-by: Axel Lin axel@ingics.com --- Hi, This looks like a typo, but I don't have a hardware to test it. Axel drivers/hwmon/da9055-hwmon.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon

[PATCH] backlight: lm3639_bl: Fix up world writable sysfs file

2012-10-29 Thread Axel Lin
We don't need the sysfs file to be world writable or group writable. This file is write-only, change it to S_IWUSR (0200). Signed-off-by: Axel Lin axel@ingics.com --- drivers/video/backlight/lm3639_bl.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video

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

2012-11-08 Thread Axel Lin
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 axel@ingics.com --- drivers/mfd/rtsx_pcr.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mfd/rtsx_pcr.c b/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 axel@ingics.com --- drivers/misc/apds9802als.c |2 +- 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 axel@ingics.com --- 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

[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 axel@ingics.com --- drivers/pinctrl/pinmux.c | 28 +--- 1 file changed, 21

[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 axel@ingics.com --- Hi, I don't have this hardware. I'd appreciate if someone can review and test this patch. Thanks, Axel drivers

[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 axel@ingics.com --- drivers/pinctrl/mvebu/pinctrl-dove.c | 13 +++-- 1 file changed, 7

[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 axel@ingics.com --- drivers/pinctrl/Kconfig |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl

[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 axel@ingics.com --- drivers/pinctrl/Kconfig |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl

[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 axel@ingics.com --- 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

[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 axel@ingics.com --- 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

[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 axel@ingics.com --- Hi, I don't have this hardware. I'd appreciate if someone can review and test this patch. This resend also CC

[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 axel@ingics.com --- drivers/pinctrl/mvebu/pinctrl-dove.c | 13 +++-- 1 file changed, 7

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

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

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

2012-11-11 Thread Axel Lin
Then we can remove select PINMUX PINCONF from PINCTRL_IMX{23,28}. This simplifies the dependency. Signed-off-by: Axel Lin axel@ingics.com Acked-by: Shawn Guo shawn@linaro.org --- drivers/pinctrl/Kconfig |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers

[PATCH] ARM: select PINCTRL for ARCH_MMP

2012-11-11 Thread Axel Lin
This makes PINCTRL related config options visible. Otherwise there is no way to build pinctrl drivers for MMP2, PXA168 and PXA910. Signed-off-by: Axel Lin axel@ingics.com --- arch/arm/Kconfig |1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index

[PATCH] pinctrl: Drop selecting PINCONF for MMP2, PXA168 and PXA910

2012-11-11 Thread Axel Lin
These drivers do not need to select PINCONF. Signed-off-by: Axel Lin axel@ingics.com --- drivers/pinctrl/Kconfig |3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig index 6d5a50b..1d61d89 100644 --- a/drivers/pinctrl/Kconfig +++ b

[PATCH 1/2] pinctrl: pxa3xx: Use devm_request_and_ioremap

2012-11-11 Thread Axel Lin
Use managed resources API to simplify the code. Also ensure we do request mem_region before ioremap. Signed-off-by: Axel Lin axel@ingics.com --- drivers/pinctrl/pinctrl-pxa3xx.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/pinctrl/pinctrl-pxa3xx.c

[PATCH 2/2] pinctrl: pxa3xx: Remove phy_base and phy_size from struct pxa3xx_pinmux_info

2012-11-11 Thread Axel Lin
They are not used, remove them. Signed-off-by: Axel Lin axel@ingics.com --- drivers/pinctrl/pinctrl-pxa3xx.c |2 -- drivers/pinctrl/pinctrl-pxa3xx.h |2 -- 2 files changed, 4 deletions(-) diff --git a/drivers/pinctrl/pinctrl-pxa3xx.c b/drivers/pinctrl/pinctrl-pxa3xx.c index 43e3dd0

[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 axel@ingics.com --- drivers/pinctrl/pinctrl-imx.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/pinctrl

[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 axel@ingics.com --- 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

[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 axel

[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 axel@ingics.com --- 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

[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 axel@ingics.com --- drivers/pinctrl/spear/pinctrl

[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 axel@ingics.com --- 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

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

2012-10-16 Thread Axel Lin
Signed-off-by: Axel Lin axel@ingics.com --- 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

[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 axel@gmail.com --- drivers/regulator/s2mps11.c | 27 --- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/drivers

[PATCH RFC] regulator: mc13xxx: Populate selector from mc13xxx_fixed_regulator_set_voltage

2012-07-13 Thread Axel Lin
This was missing until now and the underlying _regulator_do_set_voltage is using this value when calling list_voltage. Signed-off-by: Axel Lin axel@gmail.com --- Not very sure if we should implement set_voltage callback for fixed voltage. ( Other drivers do not implement set_voltage callback

[PATCH RFT 1/2] regulator: twl: Fix checking voltage range in twl6030smps_set_voltage()

2012-07-13 Thread Axel Lin
the selected voltage still in bounds. Signed-off-by: Axel Lin axel@gmail.com --- drivers/regulator/twl-regulator.c | 36 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/drivers/regulator/twl-regulator.c b/drivers/regulator/twl

[PATCH RFT 2/2] regulator: twl: Convert twlsmps_ops to get_voltage_sel and map_voltage

2012-07-13 Thread Axel Lin
Signed-off-by: Axel Lin axel@gmail.com --- drivers/regulator/twl-regulator.c | 24 +--- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/drivers/regulator/twl-regulator.c b/drivers/regulator/twl-regulator.c index 03d0bea..8dae1e3 100644 --- a/drivers

[PATCH] regulator: lp872x: Simplify implementation of lp872x_find_regulator_init_data()

2012-07-15 Thread Axel Lin
Pass regulator id rahter than the index to lp872x_find_regulator_init_data(), then the code can be simpler. We can also get max_regulators by lp-num_regulators. Signed-off-by: Axel Lin axel@gmail.com --- drivers/regulator/lp872x.c | 28 +++- 1 file changed, 7

Re: [PATCH RFT 1/2] regulator: twl: Fix the formula to calculate vsel and voltage for twl6030ldo

2012-07-16 Thread Axel Lin
On Monday 09 July 2012 04:31 PM, Axel Lin wrote: 於 一,2012-07-09 於 11:22 +0800,Axel Lin 提到: In twl6030ldo_set_voltage, current code use below formula to calculate vsel: vsel = (min_uV/1000 - 1000)/100 + 1; This is worng because when min_uV is 100 uV, vsel is 1. It should

[PATCH RFT] regulator: twl: Fix list_voltate for twl6030ldo_ops

2012-07-16 Thread Axel Lin
This patch implements the list_voltage callback based on above table. Signed-off-by: Axel Lin axel@gmail.com --- drivers/regulator/twl-regulator.c | 31 --- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/drivers/regulator/twl-regulator.c b/drivers

[PATCH] regulator: anatop: Fix wrong mask used in anatop_get_voltage_sel

2012-07-16 Thread Axel Lin
The mask used in anatop_get_voltage_sel does not match the mask used in anatop_set_voltage_sel. We need to do left shift anatop_reg-vol_bit_shift bits for the correct mask. Signed-off-by: Axel Lin axel@gmail.com --- drivers/regulator/anatop-regulator.c |5 +++-- 1 file changed, 3

[PATCH RFT] regulator: palmas: Fix calcuating selector in palmas_map_voltage_smps

2012-07-16 Thread Axel Lin
into account with the multiplier set in VSEL register when calculating selector in palmas_map_voltage_smps() Signed-off-by: Axel Lin axel@gmail.com --- drivers/regulator/palmas-regulator.c | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/drivers/regulator

[PATCH RFT] regulator: s2mps11: Fix ramp_delay settings for s2mps11_buck_ops

2012-07-17 Thread Axel Lin
The ramp_delay settings were missing while converting to regulator_set_voltage_time_sel(). Fix it. There is no ramp_delay setting for s2mps11_ldo_ops, thus remove setting set_voltage_sel callback for s2mps11_ldo_ops. Signed-off-by: Axel Lin axel@gmail.com --- drivers/regulator/s2mps11.c

[PATCH] regulator: palmas: Fix calculating selector in palmas_map_voltage_ldo

2012-07-17 Thread Axel Lin
min_uV. For example, if the requested min_uV is 945000, current code chooses selector = 1 which is lower than requested min_uV. DIV_ROUND_UP to avoid this case. Signed-off-by: Axel Lin axel@gmail.com --- drivers/regulator/palmas-regulator.c |9 ++--- 1 file changed, 6

[PATCH RFT 1/2] regulator: palmas: Fix regmap offsets for PALMAS_REG_SMPS10 vsel_reg

2012-07-17 Thread Axel Lin
Signed-off-by: Axel Lin axel@gmail.com --- drivers/regulator/palmas-regulator.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/regulator/palmas-regulator.c b/drivers/regulator/palmas-regulator.c index 0fcf355..9e3e7f3 100644 --- a/drivers/regulator/palmas

[PATCH RFT 2/2] regulator: palmas: Convert palmas_ops_ldo to [get|set]_voltage_sel_regmap

2012-07-17 Thread Axel Lin
Also remove palmas_ldo_write() function because it is not used after this conversion. Signed-off-by: Axel Lin axel@gmail.com --- drivers/regulator/palmas-regulator.c | 55 -- 1 file changed, 5 insertions(+), 50 deletions(-) diff --git a/drivers/regulator

Re: [PATCH RFT 2/2] regulator: palmas: Convert palmas_ops_ldo to [get|set]_voltage_sel_regmap

2012-07-17 Thread Axel Lin
於 三,2012-07-18 於 11:49 +0800,Axel Lin 提到: Also remove palmas_ldo_write() function because it is not used after this conversion. Oh. Just found another issue in current code. Current code in palmas_ldo_init() calls palmas_smps_[read|write] is wrong. It should call palmas_ldo_[read|write] instead

[RFT][PATCH 1/5] regulator: palmas: Fix calculating selector in palmas_map_voltage_ldo

2012-07-17 Thread Axel Lin
min_uV. For example, if the requested min_uV is 945000, current code chooses selector = 1 which is lower than requested min_uV. DIV_ROUND_UP to avoid this case. Signed-off-by: Axel Lin axel@gmail.com --- drivers/regulator/palmas-regulator.c |9 ++--- 1 file changed, 6

[RFT][PATCH 2/5] regulator: palmas: Fix regmap offsets for PALMAS_REG_SMPS10 vsel_reg

2012-07-17 Thread Axel Lin
Signed-off-by: Axel Lin axel@gmail.com --- drivers/regulator/palmas-regulator.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/regulator/palmas-regulator.c b/drivers/regulator/palmas-regulator.c index 0fcf355..9e3e7f3 100644 --- a/drivers/regulator/palmas

[RFT][PATCH 3/5] regulator: palmas: Call palmas_ldo_[read|write] in palmas_ldo_init

2012-07-17 Thread Axel Lin
Current code uses wrong calls palmas_smps_[read|write] in palmas_ldo_init(), should be palmas_ldo_[read|write] instead. Signed-off-by: Axel Lin axel@gmail.com --- drivers/regulator/palmas-regulator.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/regulator

[RFT][PATCH 4/5] regulator: palmas: Fix palmas_probe error handling

2012-07-17 Thread Axel Lin
registered in this for loop iteration. Signed-off-by: Axel Lin axel@gmail.com --- drivers/regulator/palmas-regulator.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/regulator/palmas-regulator.c b/drivers/regulator/palmas-regulator.c index de68347..46c7e88

[RFT][PATCH v2 5/5] regulator: palmas: Convert palmas_ops_ldo to [get|set]_voltage_sel_regmap

2012-07-17 Thread Axel Lin
Signed-off-by: Axel Lin axel@gmail.com --- drivers/regulator/palmas-regulator.c | 45 -- 1 file changed, 5 insertions(+), 40 deletions(-) diff --git a/drivers/regulator/palmas-regulator.c b/drivers/regulator/palmas-regulator.c index 46c7e88..2ba7502 100644

[PATCH 1/2] regulator: mc13783: Make mc13783_powermisc_rmw() lock protected

2012-07-18 Thread Axel Lin
Then we can remove lock/unlock around the caller. Signed-off-by: Axel Lin axel@gmail.com --- drivers/regulator/mc13783-regulator.c | 22 -- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/drivers/regulator/mc13783-regulator.c b/drivers/regulator/mc13783

[PATCH 2/2] regulator: mc13892: Make mc13892_powermisc_rmw() lock protected

2012-07-18 Thread Axel Lin
Then we can remove lock/unlock around the caller. Signed-off-by: Axel Lin axel@gmail.com --- drivers/regulator/mc13892-regulator.c | 22 -- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/drivers/regulator/mc13892-regulator.c b/drivers/regulator/mc13892

[PATCH RFT 1/2] regulator: mc13892: Simplify implementation of mc13892_sw_regulator_set_voltage_sel()

2012-07-19 Thread Axel Lin
MC13892_SWITCHERS0_SWxHI bit untouched We already know the selector, so we don't need to calculate the selector again. Signed-off-by: Axel Lin axel@gmail.com --- drivers/regulator/mc13892-regulator.c | 42 - 1 file changed, 15 insertions(+), 27 deletions

[PATCH RFT 2/2] regulator: mc13892: Convert mc13892_sw_regulator_ops to get_voltage_sel

2012-07-19 Thread Axel Lin
Signed-off-by: Axel Lin axel@gmail.com --- drivers/regulator/mc13892-regulator.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/regulator/mc13892-regulator.c b/drivers/regulator/mc13892-regulator.c index 60195b3..662b1d5 100644 --- a/drivers

[PATCH] regulator: mc13xxx: Remove extern function declaration for mc13xxx_sw_regulator

2012-07-19 Thread Axel Lin
This function does not exist, remove the extern function declaration. Signed-off-by: Axel Lin axel@gmail.com --- drivers/regulator/mc13xxx.h |1 - 1 file changed, 1 deletion(-) diff --git a/drivers/regulator/mc13xxx.h b/drivers/regulator/mc13xxx.h index 8343a25..eaff551 100644

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

2013-04-15 Thread Axel Lin
2013/4/15 Bengt Jönsson bengt.g.jons...@stericsson.com: 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. In set_mode

[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 axel@ingics.com --- Hi Bengt, I don't have the datasheet. Can you confirm if this fix is correct? BTW, can you also review a couple patches

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 the

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

2013-04-15 Thread Axel Lin
2013/4/15 Bengt Jönsson bengt.g.jons...@stericsson.com: 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 I think, with patch applied

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

2013-04-16 Thread Axel Lin
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 axel@ingics.com --- drivers/regulator/ab8500.c | 69 1 file changed, 51

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 bengt.g.jons...@stericsson.com: 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 REGULATOR_MODE_IDLE but the regulator actually

[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 axel@ingics.com --- drivers/regulator/ab8500-ext.c | 26 ++ 1 file changed, 18 insertions

[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 axel@ingics.com --- drivers/regulator/ab8500-ext.c | 64 +++- 1 file changed, 23 insertions(+), 41 deletions(-) diff --git a/drivers/regulator/ab8500

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

2013-04-16 Thread Axel Lin
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 axel@ingics.com --- v3: Just coding style change (compare to v2), to make the code smaller. Axel drivers/regulator/ab8500.c

  1   2   3   4   5   6   7   8   9   10   >