[PATCH] regulator: pbias: Convert to use regulator_[enable|is_enabled]_regmap

2014-04-14 Thread Axel Lin
Since commit ca5d1b3524b4d "regulator: helpers: Modify helpers enabling multi-bit control", we can set enable_val setting for device that use multiple bits for control when using regmap enable/disable/bypass ops. Signed-off-by: Axel Lin Tested-by: Balaji T K --- drivers/regul

[PATCH] mfd: tps65218: Remove unused *rdev[] from struct tps65218

2014-04-15 Thread Axel Lin
The *rdev[] is not used since commit 413be59e2f333 "regulator: tps65218: Remove unnecessary regulator_unregister call". Signed-off-by: Axel Lin --- include/linux/mfd/tps65218.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/linux/mfd/tps65218.h b/include/linux/mfd/tps652

[PATCH] regulator: tps65217: Remove *rdev[] from struct tps65217

2014-04-15 Thread Axel Lin
Now this driver uses devm_regulator_register() so we don't need to save rdev pointer to tps->rdev[i] for cleanup. Signed-off-by: Axel Lin --- drivers/regulator/tps65217-regulator.c | 3 --- include/linux/mfd/tps65217.h | 1 - 2 files changed, 4 deletions(-) diff --git a

Re: [PATCH v2 1/2] regulator: pbias: Fix is_enabled callback implementation

2014-04-15 Thread Axel Lin
2014-04-15 5:16 GMT+08:00 Mark Brown : > On Sat, Mar 08, 2014 at 11:55:29AM +0800, Axel Lin wrote: >> The is_enabled implementation is wrong in some cases: >> e.g. for pbias_mmc_omap5: enable_mask is : BIT(27) | BIT(25) | BIT(26) >> However, pbias_regulator_enable() only

[PATCH 1/2] regulator: act8865: Remove error variable in act8865_pmic_probe

2014-06-30 Thread Axel Lin
Simply use ret variable instead. Also remove unneeded initialize for ret variable. Signed-off-by: Axel Lin --- drivers/regulator/act8865-regulator.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/regulator/act8865-regulator.c b/drivers/regulator/act8865

[PATCH 2/2] regulator: act8865: Explictly initialize of_node array

2014-06-30 Thread Axel Lin
Silence below build warning: CC [M] drivers/regulator/act8865-regulator.o drivers/regulator/act8865-regulator.c: In function ‘act8865_pmic_probe’: drivers/regulator/act8865-regulator.c:321: warning: ‘of_node’ may be used uninitialized in this function Signed-off-by: Axel Lin --- drivers

Re: [PATCH v2 1/4] regulator: act8865: set correct number of regulators in pdata

2014-07-05 Thread Axel Lin
2014-07-05 21:20 GMT+08:00 Beniamino Galvani : > act8865_pdata_from_dt() populates the array pdata->regulators with all > the regulators and then assigns the field init_data only for the ones > actually found in the DT. > > The patch changes the value assigned to pdata->num_regulators to match > th

Re: [PATCH v2 1/4] regulator: act8865: set correct number of regulators in pdata

2014-07-05 Thread Axel Lin
2014-07-05 23:08 GMT+08:00 Axel Lin : > 2014-07-05 21:20 GMT+08:00 Beniamino Galvani : >> act8865_pdata_from_dt() populates the array pdata->regulators with all >> the regulators and then assigns the field init_data only for the ones >> actually found in the DT. >>

Re: [PATCH v2 2/4] regulator: act8865: prepare support for other act88xx devices

2014-07-05 Thread Axel Lin
by: Wenyou Yang For this serial, Reviewed-by: Axel Lin patch 3/4 was not CCed to me, but I have checked the code on LKML mail list. Regards, Axel -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.o

[PATCH] regulator: s2mps11: Update module description and Kconfig to add S2MPU02 support

2014-07-23 Thread Axel Lin
This driver also supports S2MPU02 now, thus update module description and Kconfig accordingly. Signed-off-by: Axel Lin --- drivers/regulator/Kconfig | 4 ++-- drivers/regulator/s2mps11.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/regulator/Kconfig b/drivers

[PATCH 1/2] regulator: ab8500: Remove ab8500_regulator_of_probe()

2014-06-08 Thread Axel Lin
Now this is a DT-only driver because non-devicetree probe path is removed, so merge ab8500_regulator_of_probe() into ab8500_regulator_probe(). Signed-off-by: Axel Lin --- drivers/regulator/ab8500.c | 31 --- 1 file changed, 12 insertions(+), 19 deletions(-) diff

[PATCH 2/2] regulator: ab8500: Remove ab8500_regulator_debug_init/exit()

2014-06-08 Thread Axel Lin
CONFIG_REGULATOR_AB8500_DEBUG is always not defined. ab8500_regulator_debug_init() is not called at all now, ab8500_regulator_debug_exit() simply return 0, thus remove them. Signed-off-by: Axel Lin --- drivers/regulator/ab8500.c | 13 - include/linux/regulator/ab8500.h | 14

[PATCH 1/2] mfd: bcm590xx: Fix modalias prefix

2014-03-31 Thread Axel Lin
This is a i2c driver, so uses i2c prefix in modalias. Signed-off-by: Axel Lin --- drivers/mfd/bcm590xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mfd/bcm590xx.c b/drivers/mfd/bcm590xx.c index e9a33c7..40c0dd3 100644 --- a/drivers/mfd/bcm590xx.c +++ b/drivers

[PATCH 2/2] mfd: bcm590xx: Add missing remove function

2014-03-31 Thread Axel Lin
Add missing mfd_remove_devices() call in remove function. Signed-off-by: Axel Lin --- drivers/mfd/bcm590xx.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/mfd/bcm590xx.c b/drivers/mfd/bcm590xx.c index 40c0dd3..c986149 100644 --- a/drivers/mfd/bcm590xx.c +++ b/drivers/mfd

[PATCH 1/2] bus: omap_l3_noc: Use devm_* managed allocators

2014-03-31 Thread Axel Lin
This simplifies error and cleanup code paths. Also uses of_match_ptr() around of_match_table. Signed-off-by: Axel Lin --- drivers/bus/omap_l3_noc.c | 94 ++- 1 file changed, 19 insertions(+), 75 deletions(-) diff --git a/drivers/bus/omap_l3_noc.c b

[PATCH 2/2] bus: omap_l3_smx: Use devm_* managed allocators

2014-03-31 Thread Axel Lin
This simplifies error and cleanup code paths. Signed-off-by: Axel Lin --- drivers/bus/omap_l3_smx.c | 53 +++ 1 file changed, 12 insertions(+), 41 deletions(-) diff --git a/drivers/bus/omap_l3_smx.c b/drivers/bus/omap_l3_smx.c index acc2164..90840cf

Re: [PATCH 1/2] regulator: s2mpa01: Don't check enable_shift before setting enable ramp rate

2014-03-31 Thread Axel Lin
2014-03-21 16:15 GMT+08:00 Axel Lin : > Current code misses updating the register when enable_shift is 0. > e.g. S2MPA01_BUCK4_RAMP_EN_SHIFT is 0. Hi Sachin and Krzysztof, I think these 2 patches are bug fix. Any comment on this patch serial? Regards, Axel -- To unsubscribe from this list

[RESEND][PATCH] regulator: tps65218: Convert to use regulator_set_voltage_time_sel

2014-05-21 Thread Axel Lin
Use regulator_set_voltage_time_sel() instead of open-coded. Signed-off-by: Axel Lin --- Hi Keerthy, This patch was sent on: https://lkml.org/lkml/2014/2/18/190 I'd appreciate if you can review and test it. Thanks, Axel drivers/regulator/tps65218-regulator.c

[PATCH] regulator: core: Use map_voltage_linear_range by default for list_voltage_linear_range

2014-05-23 Thread Axel Lin
Use map_voltage_linear_range() if list_voltage_linear_range() is in use and nothing is set. Signed-off-by: Axel Lin --- drivers/regulator/core.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index b97ffd2..7399cbf 100644 --- a

[RFT][PATCH] regulator: pfuze100: Support enable/disable for fixed regulator

2014-05-26 Thread Axel Lin
Current code has .enable_reg and .enable_mask settings, but the implementation for corresponding callbacks are missing. Fix it. Signed-off-by: Axel Lin --- Hi Robin, Can you review and test this patch? Thanks, Axel drivers/regulator/pfuze100-regulator.c | 3 +++ 1 file changed, 3 insertions

[PATCH] regulator: ltc3589: Fix module dependency

2014-05-26 Thread Axel Lin
Make this driver depend on I2C and select REGMAP_I2C to fix build failure. Also allows this driver to be built as module. Reported-by: Stephen Rothwell Signed-off-by: Axel Lin --- drivers/regulator/Kconfig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/regulator

[PATCH] regulator: ltc3589: Remove ltc3589_list_voltage_fixed function

2014-05-26 Thread Axel Lin
ulator. Signed-off-by: Axel Lin --- drivers/regulator/ltc3589.c | 15 ++- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/drivers/regulator/ltc3589.c b/drivers/regulator/ltc3589.c index fef64ee..110a99e 100644 --- a/drivers/regulator/ltc3589.c +++ b/drivers/regulator/ltc

[PATCH] regulator: pfuze100: Remove *regulators[] from struct pfuze_chip

2014-05-26 Thread Axel Lin
This driver is using devm_regulator_register() so we don't need to save the pointer for cleanup. Signed-off-by: Axel Lin --- drivers/regulator/pfuze100-regulator.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/regulator/pfuze100-regulator.c b/dr

[PATCH] regulator: tps6586x: Remove unused to_tps6586x_dev() function

2014-05-27 Thread Axel Lin
Signed-off-by: Axel Lin --- drivers/regulator/tps6586x-regulator.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/regulator/tps6586x-regulator.c b/drivers/regulator/tps6586x-regulator.c index e045b7f..0a3bb3a 100644 --- a/drivers/regulator/tps6586x-regulator.c +++ b/drivers

Re: [PATCH 2/2] regulator: s2mpa01: Fix accidental enable of buck4 ramp delay

2014-05-05 Thread Axel Lin
2014-05-05 23:10 GMT+08:00 Krzysztof Kozlowski : > S2MPA01 supports enabling/disabling ramp delay only for buck[1234]. > Other bucks have ramp delay enabled always. > > However the bit shift for enabling buck4 ramp delay in register is equal > to 0. When ramp delay was set for these other bucks (bu

Re: [PATCH v2 1/3] regulator: s2mps11: Fix accidental enable of buck6 ramp delay

2014-05-05 Thread Axel Lin
t for the bucks unsupporting enable/disable > (buck[15789] and buck10), the ramp delay for buck6 was also enabled. > > Signed-off-by: Krzysztof Kozlowski > Fixes: b96244fad953 ("regulator: s2mps11: Don't check enable_shift before > setting enable ramp rate") For this serial,

[RFT][PATCH] regulator: tps6586x: Use regulator_list_voltage_linear for dvm/ldo4/sw2

2014-06-04 Thread Axel Lin
The voltage tables for dvm/ldo4/sw2 are actually linear mapping. Thus convert dvm/ldo4/sw2 to use regulator_list_voltage_linear. Signed-off-by: Axel Lin --- drivers/regulator/tps6586x-regulator.c | 129 + 1 file changed, 68 insertions(+), 61 deletions(-) diff

[PATCH] regulator: ltc3589: Use of_get_child_by_name

2014-06-04 Thread Axel Lin
of_find_node_by_name() walks the allnodes list, and can thus walk outside of the parent node. Use of_get_child_by_name() instead. Signed-off-by: Axel Lin --- drivers/regulator/ltc3589.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/ltc3589.c b/drivers

[PATCH RESEND] clk: s2mps11: Simplify s2mps11_clk_probe unwind paths

2014-06-15 Thread Axel Lin
The devm_clk_unregister() in .probe error case is not necessary as it will be automatically called when probe fails. Signed-off-by: Axel Lin Reviewed-by: Krzysztof Kozlowski --- This patch was sent on https://lkml.org/lkml/2014/5/18/96 with Krzysztof's review. drivers/clk/clk-s2mps11.c

[PATCH RESEND] clk: twl6040: Convert to use devm_clk_register

2014-06-15 Thread Axel Lin
Use devm_clk_register() to simplify the code by removing twl6040_clk_remove(). Signed-off-by: Axel Lin Acked-by: Peter Ujfalusi --- This patch was sent on https://lkml.org/lkml/2014/5/18/75 with Peter's Ack. drivers/clk/clk-twl6040.c | 12 +--- 1 file changed, 1 insertion(+

[PATCH] regulator: twl: Convert to use devm_kmemdup()

2014-06-15 Thread Axel Lin
Signed-off-by: Axel Lin --- drivers/regulator/twl-regulator.c | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/regulator/twl-regulator.c b/drivers/regulator/twl-regulator.c index fed28ab..0b4f866 100644 --- a/drivers/regulator/twl-regulator.c +++ b

[PATCH] regulator: max8952: Convert to devm_gpio_request_one()

2014-06-15 Thread Axel Lin
Signed-off-by: Axel Lin --- drivers/regulator/max8952.c | 34 ++ 1 file changed, 10 insertions(+), 24 deletions(-) diff --git a/drivers/regulator/max8952.c b/drivers/regulator/max8952.c index c2792f0..f7f9efc 100644 --- a/drivers/regulator/max8952.c +++ b/drivers

[PATCH] pinctrl: capri: Make capri_pinctrl_probe static

2014-02-04 Thread Axel Lin
Signed-off-by: Axel Lin --- drivers/pinctrl/pinctrl-capri.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/pinctrl-capri.c b/drivers/pinctrl/pinctrl-capri.c index 4669c53..b4aa8e3 100644 --- a/drivers/pinctrl/pinctrl-capri.c +++ b/drivers/pinctrl/pinctrl

[PATCH] regulator: pfuze100: Fix address of FABID

2013-12-08 Thread Axel Lin
According to the datasheet, the address of FABID is 0x4. Fix it. Signed-off-by: Axel Lin --- drivers/regulator/pfuze100-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/pfuze100-regulator.c b/drivers/regulator/pfuze100-regulator.c index 032df37

Re: [PATCH] devtmpfs: Calling delete_path() only when necessary

2013-12-09 Thread Axel Lin
2013/12/9 Greg Kroah-Hartman : > On Wed, Dec 04, 2013 at 02:44:14PM +0800, Axel Lin wrote: >> 2013/12/4 Rob Landley : >> > On 11/16/2013 02:15:23 AM, Axel Lin wrote: >> >> >> >> The deleted variable is always 1 in current code. >> >> Initial

Re: [PATCH] devtmpfs: Calling delete_path() only when necessary

2013-12-09 Thread Axel Lin
2013/12/9 Greg Kroah-Hartman : > On Mon, Dec 09, 2013 at 04:54:29PM +0800, Axel Lin wrote: >> 2013/12/9 Greg Kroah-Hartman : >> > On Wed, Dec 04, 2013 at 02:44:14PM +0800, Axel Lin wrote: >> >> 2013/12/4 Rob Landley : >> >> > On 11/16/2013 02:15:23 AM,

Re: [PATCH] devtmpfs: Calling delete_path() only when necessary

2013-12-09 Thread Axel Lin
2013/12/9 Axel Lin : > 2013/12/9 Greg Kroah-Hartman : >> On Mon, Dec 09, 2013 at 04:54:29PM +0800, Axel Lin wrote: >>> 2013/12/9 Greg Kroah-Hartman : >>> > On Wed, Dec 04, 2013 at 02:44:14PM +0800, Axel Lin wrote: >>> >> 2013/12/4 Rob Landley : >&

Re: ARM: nommu: DEBUG_LOCKS_WARN_ON(!depth)

2013-12-09 Thread Axel Lin
2013/11/25 Axel Lin : > I'm testing on a nommu platform (arm7tdmi SoC). > Using current Linus' tree + out-of-tree patches for this SoC. > I got below hang while executing ls (busybox) after boot. > > / # ls > [ 51.036191] [ cut here ] > [

[PATCH] regulator: as3722: Don't set min_uV/uV_step/linear_min_sel for linear_ranges

2013-12-19 Thread Axel Lin
These settings are not used when using linear_ranges and it makes the code looks confusing. Thus remove them. Signed-off-by: Axel Lin --- drivers/regulator/as3722-regulator.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/regulator/as3722-regulator.c b/drivers/regulator/as3722

BUG: bad unlock balance detected! (__sigqueue_alloc)

2013-12-19 Thread Axel Lin
Hi, I got below hangup with current Linus' tree. [ 166.378906] [ cut here ] [ 166.385742] WARNING: CPU: 0 PID: 0 at kernel/rcu/update.c:107 __rcu_read_unlock+0x70/0x84() [ 166.394531] CPU: 0 PID: 0 Comm: Not tainted 3.13.0-rc4-00291-g002c96b-dirty #2135 [ 166.404296]

[PATCH] ramfs: Fix memory leak on ramfs_fill_super error paths

2013-11-13 Thread Axel Lin
The memory leak was introduced by commit 318ceed0884 "tidy up after d_make_root() conversion". Signed-off-by: Axel Lin --- fs/ramfs/inode.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/fs/ramfs/inode.c b/fs/ramfs/inode.c index 39d1465..868a41e 10064

[PATCH] devtmpfs: Calling delete_path() only when necessary

2013-11-16 Thread Axel Lin
The deleted variable is always 1 in current code. Initialize deleted variable to be 0, so delete_path() will be called only when necessary. Signed-off-by: Axel Lin --- drivers/base/devtmpfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/base/devtmpfs.c b/drivers

[PATCH 1/2] regulator: as3711: Allow missing init_data for diagnostics

2014-02-05 Thread Axel Lin
The regulator core supports this to allow the configuration to be inspected at runtime even if no software management is enabled. Signed-off-by: Axel Lin --- drivers/regulator/as3711-regulator.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/regulator/as3711

[PATCH 2/2] regulator: rc5t583: Allow missing init_data for diagnostics

2014-02-05 Thread Axel Lin
The regulator core supports this to allow the configuration to be inspected at runtime even if no software management is enabled. Signed-off-by: Axel Lin --- drivers/regulator/rc5t583-regulator.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/regulator

Re: BUG: sleeping function called from invalid context at kernel/locking/mutex.c:616

2013-12-04 Thread Axel Lin
於 三,2013-12-04 於 13:32 -0800,Andrew Morton 提到: > On Wed, 04 Dec 2013 16:59:38 +0800 Axel Lin wrote: > > > > > > > Please add a lot more printk's so we can narrow it down further? I'd > > > use something like > > > > > > pri

regulator: question about commit d886a041646 pfuze100-regulator: Fix MODULE_ALIAS()

2013-12-31 Thread Axel Lin
Hi, I just found this commit after pull regulator updates. So why to use 'platform' prefix in MODULE_ALIAS for i2c driver? Does it really work? Regards, Axel -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majo

[PATCH] clocksource: mxs_timer: Get rid of mxs_clockevent_mode variable

2014-01-02 Thread Axel Lin
The current mode setting is stored in mode field of struct clock_event_device. So we can just remove the mxs_clockevent_mode variable. Signed-off-by: Axel Lin --- drivers/clocksource/mxs_timer.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/clocksource

[PATCH] regulator: act8865: Fix build error when !OF

2014-01-05 Thread Axel Lin
rivers/regulator] Error 2 make: *** [drivers] Error 2 Reported-by: Stephen Rothwell Signed-off-by: Axel Lin --- drivers/regulator/act8865-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/act8865-regulator.c b/drivers/regulator/act8865-regulator.c index

[PATCH] regulator: max14577: Add module alias to support module auto-loading

2013-12-22 Thread Axel Lin
Signed-off-by: Axel Lin --- drivers/regulator/max14577.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/regulator/max14577.c b/drivers/regulator/max14577.c index 516e8af..b1078ba3 100644 --- a/drivers/regulator/max14577.c +++ b/drivers/regulator/max14577.c @@ -270,3 +270,4

[PATCH] regulator: max77693: Add missing .owner field in regulator_desc

2013-12-24 Thread Axel Lin
Add missing .owner field in regulator_desc, which is used for refcounting. Signed-off-by: Axel Lin --- drivers/regulator/max77693.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/regulator/max77693.c b/drivers/regulator/max77693.c index feb20bf..5fb899f 100644 --- a/drivers

[PATCH] regulator: act8865: Rmove unneeded regulator_unregister() calls

2013-12-24 Thread Axel Lin
This is not required because current code use devm_regulator_register() to register regulators. Signed-off-by: Axel Lin --- drivers/regulator/act8865-regulator.c | 12 1 file changed, 12 deletions(-) diff --git a/drivers/regulator/act8865-regulator.c b/drivers/regulator/act8865

[PATCH v2] regulator: act8865: Remove unneeded regulator_unregister() calls

2013-12-24 Thread Axel Lin
This is not required because current code uses devm_regulator_register() to register regulators. Signed-off-by: Axel Lin --- v2: Fix typo in subject line s/Rmove/Remove/ drivers/regulator/act8865-regulator.c | 12 1 file changed, 12 deletions(-) diff --git a/drivers/regulator

[PATCH RFT] regulator: act8865: Remove set_suspend_[en|dis]able implementation

2013-12-24 Thread Axel Lin
There is no suspend enable/disable settings mentioned in datasheet, so just don't implement .set_suspend_[en|dis]able callbacks. Signed-off-by: Axel Lin --- drivers/regulator/act8865-regulator.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/regulator/act8865-regulator

[PATCH] regulator: tps65910: Simplify setting enable_mask for regulators

2013-12-27 Thread Axel Lin
BBCH_BBCHEN_MASK is equivalent to TPS65910_SUPPLY_STATE_ENABLED. So all regulators have the same enable_mask setting. Signed-off-by: Axel Lin --- drivers/regulator/tps65910-regulator.c | 16 +--- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/drivers/regulator

[PATCH v2] regulator: tps65910: Simplify setting enable_mask for regulators

2013-12-29 Thread Axel Lin
BBCH_BBCHEN_MASK is equivalent to TPS65910_SUPPLY_STATE_ENABLED. So all regulators have the same enable_mask setting. BBCH_BBCHEN_MASK and BBCH_BBCHEN_SHIFT are not used now, remove them. Signed-off-by: Axel Lin --- v2: (Base on Markus' comment) remove unused BBCH_BBCHEN_* in tps65

[PATCH] regulator: rk808: Fix memory leak

2014-08-28 Thread Axel Lin
The memory allocated in rk808_regulator_probe() needs to be freed when the module is unloaded. Thus pass &pdev->dev rather than &client->dev to devm_kzalloc. Signed-off-by: Axel Lin --- drivers/regulator/rk808-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [PATCH] regulator: mc13xxx: add missing of_node_get()

2014-09-09 Thread Axel Lin
2014-09-09 19:07 GMT+08:00 Guodong Xu : > mc13xxx_parse_regulators_dt() goes through dt tree to search for regulator > sub-nodes. For each matched node, later on it will be used and registered > into a regulator_dev. > > of_node_get() should be called to increase its refcount. I think it's done by

[PATCH] regulator: isl9305: REGULATOR_ISL9305 needs to select REGMAP_I2C

2014-09-09 Thread Axel Lin
Fix ERROR: "devm_regmap_init_i2c" [drivers/regulator/isl9305.ko] undefined! Signed-off-by: Axel Lin --- drivers/regulator/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig index 2b98a34..2419fe4 100644 --- a/drivers

Re: [PATCH] regulator: remove unnecessary of_node_get() to parent

2014-09-09 Thread Axel Lin
2014-09-10 11:50 GMT+08:00 Guodong Xu : > These of_node_get() were added to balance refcount decrements inside of > of_find_node_by_name(). > See: commit c92f5dd2c42f ("regulator: Add missing of_node_put()") > > However of_find_node_by_name() was then replaced by of_get_child_by_name(), > which doe

Re: [PATCH] regulator: remove unnecessary of_node_get() to parent

2014-09-09 Thread Axel Lin
2014-09-10 12:20 GMT+08:00 Axel Lin : > 2014-09-10 11:50 GMT+08:00 Guodong Xu : >> These of_node_get() were added to balance refcount decrements inside of >> of_find_node_by_name(). >> See: commit c92f5dd2c42f ("regulator: Add missing of_node_put()") >> >&

Re: [PATCH] regulator: remove unnecessary of_node_get() to parent

2014-09-10 Thread Axel Lin
2014-09-10 17:23 GMT+08:00 Guodong Xu : > > > On 09/10/2014 12:23 PM, Axel Lin wrote: >> 2014-09-10 12:20 GMT+08:00 Axel Lin : >>> 2014-09-10 11:50 GMT+08:00 Guodong Xu : >>>> These of_node_get() were added to balance refcount decrements inside of >>&

[PATCH] regulator: max77802: Remove unused fields from struct max77802_regulator_prv

2014-08-19 Thread Axel Lin
Both num_regulators and *rdev[MAX77802_REG_MAX] are not used, remove them. Signed-off-by: Axel Lin --- drivers/regulator/max77802.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/regulator/max77802.c b/drivers/regulator/max77802.c index 5f022f8..ad1caa9 100644 --- a/drivers

Re: [PATCH] regulator: core: Fix build error due to const qualifier for ops

2014-08-19 Thread Axel Lin
2014-08-18 22:10 GMT+08:00 Mark Brown : > On Mon, Aug 18, 2014 at 10:34:08AM +0800, Axel Lin wrote: >> Drop const qualifier for ops of struct regulator_desc. >> Allow regulator drivers to update ops before registering regulator. > > Applied, thanks. Hi Mark, I found this co

[PATCH] regulator: core: Add back the const qualifier for ops of struct regulator_desc

2014-08-20 Thread Axel Lin
ld error due to const qualifier for ops"). The build error was fixed by commit 39f5460d7f9c ("regulator: core: add const to regulator_ops and fix build error in mc13892"). Signed-off-by: Axel Lin --- include/linux/regulator/driver.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(

[PATCH] regulator: hi6421: Remove unused fields from struct hi6421_regulator_info

2014-08-20 Thread Axel Lin
The valid_modes_mask and *dev are not used in this driver, remove them. Current code uses devm_regulator_register, so we don't need *regulator in hi6421_regulator_info. Use a local variable instead. Also removes a few unnecessary inclusion of header files. Signed-off-by: Axel Lin --- dr

[PATCH] regulator: da9211: Set of_match_table and export device table

2014-09-04 Thread Axel Lin
Also move da9211_i2c_id and da9211_dt_ids close to the user for better readability. Signed-off-by: Axel Lin --- drivers/regulator/da9211-regulator.c | 29 +++-- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/drivers/regulator/da9211-regulator.c b

[PATCH] regulator: hi6421: Fix misleading comment

2014-09-04 Thread Axel Lin
Signed-off-by: Axel Lin --- drivers/regulator/hi6421-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/hi6421-regulator.c b/drivers/regulator/hi6421-regulator.c index e389920..a8c362c 100644 --- a/drivers/regulator/hi6421-regulator.c +++ b/drivers

[PATCH] regulator: max77802: Remove duplicate rdev_get_id() call

2014-09-04 Thread Axel Lin
Signed-off-by: Axel Lin --- drivers/regulator/max77802.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/regulator/max77802.c b/drivers/regulator/max77802.c index 967e109..d89792b 100644 --- a/drivers/regulator/max77802.c +++ b/drivers/regulator/max77802.c

[PATCH v2] regulator: hi6421: Fix misleading comment

2014-09-06 Thread Axel Lin
Signed-off-by: Axel Lin --- drivers/regulator/hi6421-regulator.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/regulator/hi6421-regulator.c b/drivers/regulator/hi6421-regulator.c index e389920..156d0d1 100644 --- a/drivers/regulator/hi6421-regulator.c +++ b

[PATCH] regulator: as3711: Remove unused fields from as3711_regulator_info and as3711_regulator

2014-09-07 Thread Axel Lin
ays 0, so remove it. _min_uV and _max_uV are not required, all required settings are set in REGULATOR_LINEAR_RANGE macro. Signed-off-by: Axel Lin --- drivers/regulator/as3711-regulator.c | 61 +--- 1 file changed, 28 insertions(+), 33 deletions(-) diff --git a/dr

[PATCH] regulator: as3711: Remove unused fields from as3711_regulator_info and as3711_regulator

2014-09-07 Thread Axel Lin
ays 0, so remove it. _min_uV and _max_uV are not required, all required settings are set in REGULATOR_LINEAR_RANGE macro. Signed-off-by: Axel Lin --- drivers/regulator/as3711-regulator.c | 61 +--- 1 file changed, 28 insertions(+), 33 deletions(-) diff --git a/dr

[PATCH] regulator: bcm590xx: Remove unused **info field from struct bcm590xx_reg

2014-09-07 Thread Axel Lin
Signed-off-by: Axel Lin --- drivers/regulator/bcm590xx-regulator.c | 8 1 file changed, 8 deletions(-) diff --git a/drivers/regulator/bcm590xx-regulator.c b/drivers/regulator/bcm590xx-regulator.c index 5d1fd6f..fe6ac69 100644 --- a/drivers/regulator/bcm590xx-regulator.c +++ b/drivers

Re: [PATCH v2] regulator: hi6421: Fix misleading comment

2014-09-07 Thread Axel Lin
2014-09-06 21:49 GMT+08:00 Mark Brown : > On Sat, Sep 06, 2014 at 08:59:36PM +0800, Axel Lin wrote: >> Signed-off-by: Axel Lin > > Applied, thanks. Please always send incremental patches. Thanks, and sorry that I have limited internet access while traveling. I did not realize th

[PATCH] regulator: rk808: Fix n_voltages for DCDC4

2014-09-01 Thread Axel Lin
The min_sel is 0, max_sel is 15, so n_voltages should be 16. Signed-off-by: Axel Lin --- drivers/regulator/rk808-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/rk808-regulator.c b/drivers/regulator/rk808-regulator.c index 0d11df1..0da8867

Re: [PATCH 1/2] gpu: ipu-v3: Select GENERIC_IRQ_CHIP to fix build error

2014-09-01 Thread Axel Lin
2014-08-03 10:36 GMT+08:00 Axel Lin : > This driver uses GENERIC_IRQ_CHIP, so it needs to select GENERIC_IRQ_CHIP to > avoid build error. > > Fixes below build errors: > ERROR: "irq_alloc_domain_generic_chips" [drivers/gpu/ipu-v3/imx-ipu-v3.ko] > undefined! > ERROR:

Re: [PATCH 1/2] gpu: ipu-v3: Select GENERIC_IRQ_CHIP to fix build error

2014-09-01 Thread Axel Lin
2014-09-02 10:11 GMT+08:00 Greg Kroah-Hartman : > On Tue, Sep 02, 2014 at 09:47:37AM +0800, Axel Lin wrote: >> 2014-08-03 10:36 GMT+08:00 Axel Lin : >> > This driver uses GENERIC_IRQ_CHIP, so it needs to select GENERIC_IRQ_CHIP >> > to >> > avoid build error

[PATCH] regulator: da9211: Fix missing config.of_node setting

2014-09-02 Thread Axel Lin
Signed-off-by: Axel Lin --- drivers/regulator/da9211-regulator.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/regulator/da9211-regulator.c b/drivers/regulator/da9211-regulator.c index 9722728..044c36c 100644 --- a/drivers/regulator/da9211-regulator.c +++ b/drivers/regulator

[PATCH] regulator: Add stub function for devm_regulator_get_exclusive

2014-08-08 Thread Axel Lin
function-declaration] Signed-off-by: Axel Lin --- include/linux/regulator/consumer.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h index f8a8733..150d2f0 100644 --- a/include/linux/regulator/consumer.h +++ b/inc

[PATCH v2] regulator: Add stub for devm_regulator_get_exclusive

2014-08-11 Thread Axel Lin
function-declaration] Also makes regulator_get_exclusive and devm_regulator_get_exclusive stub functions return error pointer. Signed-off-by: Axel Lin --- include/linux/regulator/consumer.h | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/linux/regulator/consume

[PATCH] regulator: tps65023: Remove duplicate test for I2C_FUNC_SMBUS_BYTE_DATA functionality

2014-08-11 Thread Axel Lin
remove the I2C_FUNC_SMBUS_BYTE_DATA functionality check in the driver code. Signed-off-by: Axel Lin --- drivers/regulator/tps65023-regulator.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/regulator/tps65023-regulator.c b/drivers/regulator/tps65023-regulator.c index 3ef67a8..7380af8 100644 --- a/drivers

[PATCH] mfd: da9052-i2c: Remove duplicate test for I2C_FUNC_SMBUS_BYTE_DATA functionality

2014-08-15 Thread Axel Lin
remove the I2C_FUNC_SMBUS_BYTE_DATA functionality check in the driver code. Signed-off-by: Axel Lin --- drivers/mfd/da9052-i2c.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/mfd/da9052-i2c.c b/drivers/mfd/da9052-i2c.c index 6da8ec8..ec39287 100644 --- a/drivers/mfd/da9052-i2c.c +++ b/drivers/mfd/da

[PATCH] mfd: da9052: Avoid setting read_flag_mask for da9052-i2c driver

2014-08-16 Thread Axel Lin
sing a local variable for regmap_config in da9052-spi driver, so the settings in spi driver won't impact the settings in i2c driver. Also makes da9052_regmap_config const to avoid similar issue. Signed-off-by: Axel Lin --- Hi Adam and Steve, Any chance to test this patch? Thanks, Axel dr

Re: [PATCH v2] regulator: Add stub for devm_regulator_get_exclusive

2014-08-16 Thread Axel Lin
2014-08-13 5:55 GMT+08:00 Mark Brown : > On Tue, Aug 12, 2014 at 09:37:09AM +0800, Axel Lin wrote: >> Fix below build error when !CONFIG_REGULATOR. >> >> CC drivers/gpu/drm/msm/hdmi/hdmi.o >> drivers/gpu/drm/msm/hdmi/hdmi.c: In function 'hdmi_init': >

[PATCH] regulator: da9211: Check return value of devm_kzalloc()

2014-08-17 Thread Axel Lin
Signed-off-by: Axel Lin --- drivers/regulator/da9211-regulator.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/regulator/da9211-regulator.c b/drivers/regulator/da9211-regulator.c index ccc2e36..a26f1d2 100644 --- a/drivers/regulator/da9211-regulator.c +++ b/drivers/regulator

[PATCH] regulator: core: Fix build error due to const qualifier for ops

2014-08-17 Thread Axel Lin
rivers/regulator] Error 2 make: *** [drivers] Error 2 Reported-by: Stephen Rothwell Signed-off-by: Axel Lin --- include/linux/regulator/driver.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h index efe058f..3abd

[PATCH 1/2] gpu: ipu-v3: Select GENERIC_IRQ_CHIP to fix build error

2014-08-02 Thread Axel Lin
ip" [drivers/gpu/ipu-v3/imx-ipu-v3.ko] undefined! make[1]: *** [__modpost] Error 1 make: *** [modules] Error 2 Signed-off-by: Axel Lin --- drivers/gpu/ipu-v3/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/ipu-v3/Kconfig b/drivers/gpu/ipu-v3/Kconfig index 2f228a2..0

[PATCH 2/2] gpu: ipu-v3: Return proper error on ipu_add_client_devices error path

2014-08-02 Thread Axel Lin
Signed-off-by: Axel Lin --- drivers/gpu/ipu-v3/ipu-common.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/ipu-v3/ipu-common.c b/drivers/gpu/ipu-v3/ipu-common.c index 04e7b2e..e340beb 100644 --- a/drivers/gpu/ipu-v3/ipu-common.c +++ b/drivers/gpu/ipu-v3/ipu

[PATCH] soc: ti: knav_qmss_queue: Use list_for_each_entry_safe to prevent use after free

2014-10-31 Thread Axel Lin
list_for_each_entry_safe() is necessary if list objects are deleted from the list while traversing it. Signed-off-by: Axel Lin --- drivers/soc/ti/knav_qmss_queue.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/soc/ti/knav_qmss_queue.c b/drivers/soc/ti

Re: [PATCH] soc: versatile: Add terminating entry for realview_soc_of_match

2014-10-28 Thread Axel Lin
>> >> Arnd are you merging this directly into ARM SoC? >> > > Applied to the fixes branch. Thanks. > > Please remember to add a...@kernel.org when you want us to pick up the > patches. scripts/get_maintainer.pl does not suggest a...@kernel.org for this patch. $ scripts/get_maintainer.pl 0001-soc-v

[PATCH] regulator: sky81452: Remove module version

2014-10-07 Thread Axel Lin
The module version is unlikely to be updated, use kernel version should be enough. Signed-off-by: Axel Lin --- Hi Gyungoh, Seems you have added MODULE_VERSION for the sky81452 serial patches. Do you really need that and will keep updating it? Otherwise, you may want to drop the MODULE_VERSION in

[PATCH 1/3] soc: ti: Use list_first_entry_or_null() at appropriate places

2014-10-26 Thread Axel Lin
Use list_first_entry_or_null() for first_region() and first_queue_range(). list_first_entry() expects the list is not empty, so first_region() and first_queue_range() never return NULL. Thus use list_first_entry_or_null() instead. Signed-off-by: Axel Lin --- drivers/soc/ti/knav_qmss.h | 8

[PATCH 2/3] soc: ti: knav_qmss_queue: Fix unbalanced locking in knav_pool_create()

2014-10-26 Thread Axel Lin
Don't call mutex_unlock() in the error patch if the mutex_lock() is not called. Signed-off-by: Axel Lin --- drivers/soc/ti/knav_qmss_queue.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/soc/ti/knav_qmss_queue.c b/drivers/soc/ti/knav_qmss_queue.c

[PATCH 3/3] soc: ti: knav_qmss_queue: Return proper error if devm_kzalloc fails

2014-10-26 Thread Axel Lin
Return -ENOMEM if devm_kzalloc fails. Signed-off-by: Axel Lin --- drivers/soc/ti/knav_qmss_queue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/ti/knav_qmss_queue.c b/drivers/soc/ti/knav_qmss_queue.c index d66aaf2..6f22d56 100644 --- a/drivers/soc/ti

[PATCH] regamp: debugfs: Fix misuse of IS_ENABLED

2015-08-05 Thread Axel Lin
1 IS_ENABLED(REGMAP_ALLOW_WRITE_DEBUGFS) returns 1. #define REGMAP_ALLOW_WRITE_DEBUGFS 2 IS_ENABLED(REGMAP_ALLOW_WRITE_DEBUGFS) returns 0. So fix the misuse of IS_ENABLED(REGMAP_ALLOW_WRITE_DEBUGFS) and switch to use #if defined(REGMAP_ALLOW_WRITE_DEBUGFS) instead. Signed-off-by: Axel Lin

[PATCH RESEND] regmap: debugfs: Fix misuse of IS_ENABLED

2015-08-05 Thread Axel Lin
1 IS_ENABLED(REGMAP_ALLOW_WRITE_DEBUGFS) returns 1. #define REGMAP_ALLOW_WRITE_DEBUGFS 2 IS_ENABLED(REGMAP_ALLOW_WRITE_DEBUGFS) returns 0. So fix the misuse of IS_ENABLED(REGMAP_ALLOW_WRITE_DEBUGFS) and switch to use #if defined(REGMAP_ALLOW_WRITE_DEBUGFS) instead. Signed-off-by: Axel Lin

[PATCH] regulator: qcom_spmi-regulator: Use DIV_ROUND_UP instead of open-coded

2015-07-09 Thread Axel Lin
Signed-off-by: Axel Lin --- drivers/regulator/qcom_spmi-regulator.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/regulator/qcom_spmi-regulator.c b/drivers/regulator/qcom_spmi-regulator.c index 850a30a..9ef0e2f 100644 --- a/drivers/regulator/qcom_spmi-regulator.c

[PATCH] regulator: mt6311: Trival clean up

2015-07-30 Thread Axel Lin
Make mt6311_buck_ops, mt6311_ldo_ops and mt6311_regulators const and remove unneeded error variable in mt6311_i2c_probe(). Signed-off-by: Axel Lin --- drivers/regulator/mt6311-regulator.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/regulator/mt6311

[PATCH RESEND] regulator: mt6311: Trivial clean up

2015-07-30 Thread Axel Lin
Make mt6311_buck_ops, mt6311_ldo_ops and mt6311_regulators const and remove unneeded error variable in mt6311_i2c_probe(). Signed-off-by: Axel Lin --- Sorry, just found a typo on subject line, so here is a resend. drivers/regulator/mt6311-regulator.c | 14 +++--- 1 file changed, 7

regulator: Question about the buck_volt_range and MT6311_MAX_UV setting

2015-07-30 Thread Axel Lin
Hi Henry, Seems something wrong in either buck_volt_range or MT6311_MAX_UV setting. .n_voltages = (MT6311_MAX_UV - MT6311_MIN_UV) / MT6311_STEP_UV + 1 (140 - 60) / 6250 + 1 = 129 So .n_voltages = 129. >From the buck_volt_range: The linear range has min_sel: 0, max_sel: 0x7f (0 ~ 127, so 1

[PATCH] regulator: qcom_smd: Set n_voltages for pm8941_lnldo

2015-08-18 Thread Axel Lin
Just setting fixed_uV is not enough, the regulator core will also check n_voltages setting. The fixed_uV only works when n_voltages is 1. Signed-off-by: Axel Lin --- drivers/regulator/qcom_smd-regulator.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/regulator/qcom_smd-regulator.c

<    5   6   7   8   9   10   11   12   13   14   >