[tip:irq/core] irqchip: mtk-sysirq: Make mtk_sysirq_of_init return error if ioremap fails

2015-05-22 Thread tip-bot for Axel Lin
Commit-ID: e1a96fb861b0781c8ef66a76d0fc6fb6f628f84c Gitweb: http://git.kernel.org/tip/e1a96fb861b0781c8ef66a76d0fc6fb6f628f84c Author: Axel Lin AuthorDate: Thu, 21 May 2015 22:57:34 +0800 Committer: Thomas Gleixner CommitDate: Fri, 22 May 2015 11:06:47 +0200 irqchip: mtk-sysirq: Make

[PATCH] irqchip: irq-mtk-sysirq: Make mtk_sysirq_of_init return error if ioremap fails

2015-05-21 Thread Axel Lin
PTR_ERR(NULL) returns 0 so current code returns 0 if ioremap fails, fix it. Signed-off-by: Axel Lin --- drivers/irqchip/irq-mtk-sysirq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-mtk-sysirq.c b/drivers/irqchip/irq-mtk-sysirq.c index 04de2d4..15c1303

[PATCH] bus: omap-ocp2scp: Fix modalias

2015-05-19 Thread Axel Lin
Remove extra space between platform prefix and driver name in MODULE_ALIAS. Signed-off-by: Axel Lin --- drivers/bus/omap-ocp2scp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/bus/omap-ocp2scp.c b/drivers/bus/omap-ocp2scp.c index 9f18569..bf500e0 100644 --- a

[tip:irq/core] genirq: devres: Fix testing return value of request_any_context_irq()

2015-05-13 Thread tip-bot for Axel Lin
Commit-ID: 63781394c540dd9e666a6b21d70b64dd52bce76e Gitweb: http://git.kernel.org/tip/63781394c540dd9e666a6b21d70b64dd52bce76e Author: Axel Lin AuthorDate: Mon, 11 May 2015 17:02:58 +0800 Committer: Thomas Gleixner CommitDate: Wed, 13 May 2015 10:47:37 +0200 genirq: devres: Fix

[PATCH v2] genirq: devres: Fix testing return value of request_any_context_irq()

2015-05-11 Thread Axel Lin
(). Fixes: 0668d3065128 ("genirq: Add devm_request_any_context_irq()") Signed-off-by: Axel Lin --- v2: Also fixup return value of devm_request_any_context_irq kernel/irq/devres.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/irq/devres.c b/kernel/ir

[PATCH] genirq: devres: Fix testing return value of request_any_context_irq()

2015-05-11 Thread Axel Lin
request_any_context_irq() returns a negative value on failure. It returns either IRQC_IS_HARDIRQ or IRQC_IS_NESTED on success. So fix testing return value of request_any_context_irq(). Fixes: 0668d3065128 ("genirq: Add devm_request_any_context_irq()") Signed-off-by: Axel Lin ---

[RFT][PATCH 2/2] regulator: max77843: Convert to use regulator_is_enabled_regmap

2015-04-30 Thread Axel Lin
Use regulator_is_enabled_regmap() to replace max77843_reg_is_enabled(). Signed-off-by: Axel Lin --- drivers/regulator/max77843.c | 18 ++ 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/drivers/regulator/max77843.c b/drivers/regulator/max77843.c index 3ae2a9b

[RFT][PATCH 1/2] regulator: max77843: Fix enable_mask for max77843 charger

2015-04-30 Thread Axel Lin
MAX77843_CHG_ENABLE is 0x05, so the enable_mask should be MAX77843_CHG_MASK | MAX77843_CHG_BUCK_MASK. Signed-off-by: Axel Lin --- Hi, I don't have this h/w, so please help to review and test this patch serial. Thanks, Axel drivers/regulator/max77843.c | 2 +- 1 file changed, 1 insertion(

Re: [PATCH 3.4 115/176] spi: dw: Fix detecting FIFO depth

2015-04-09 Thread Axel Lin
2015-04-09 16:46 GMT+08:00 : > From: Axel Lin > > 3.4.107-rc1 review patch. If anyone has any objections, please let me know. > > -- > > > commit d297933cc7fcfbaaf2d37570baac73287bf0357d upstream. > > Current code tries to find the highest valid fi

Re: [PATCH] phy: core: Fix error checking in (devm_)phy_optional_get

2015-04-07 Thread Axel Lin
2015-04-07 22:21 GMT+08:00 Kishon Vijay Abraham I : > Hi, > > On Tuesday 07 April 2015 05:13 PM, Axel Lin wrote: >> >> Don't pass valid pointer to PTR_ERR, use PTR_ERR(phy) only when >> IS_ERR(phy) is true. >> >> Signed-off-by: Axel Lin >> --- &g

[PATCH v2] phy: core: Fix error checking in (devm_)phy_optional_get

2015-04-07 Thread Axel Lin
Don't pass valid pointer to PTR_ERR, use PTR_ERR(phy) only when IS_ERR(phy) is true. Signed-off-by: Axel Lin --- drivers/phy/phy-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c index 3791838f..63bc12d 100644

[PATCH] phy: core: Fix error checking in (devm_)phy_optional_get

2015-04-07 Thread Axel Lin
Don't pass valid pointer to PTR_ERR, use PTR_ERR(phy) only when IS_ERR(phy) is true. Signed-off-by: Axel Lin --- drivers/phy/phy-core.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c index 3791838f..f112fff 1

[PATCH v2] phy: core: Check requested PHY status in _of_phy_get()

2015-04-06 Thread Axel Lin
This is a common checking in various drivers, so move the checking to _of_phy_get(). Signed-off-by: Axel Lin --- v2: Fixup the error patch. It needs to call module_put if Requested PHY is disabled. drivers/phy/phy-core.c | 12 ++-- drivers/phy/phy-miphy28lp.c | 5

[PATCH] phy: core: Check requested PHY status in _of_phy_get()

2015-04-06 Thread Axel Lin
This is a common checking in various drivers, so move the checking to _of_phy_get(). Signed-off-by: Axel Lin --- drivers/phy/phy-core.c | 6 ++ drivers/phy/phy-miphy28lp.c | 5 - drivers/phy/phy-miphy365x.c | 5 - drivers/phy/phy-rcar-gen2.c | 5 - 4 files changed, 6

[PATCH v2 2/2] phy: spear1340-miphy: Return proper error for spear1340_miphy_xlate

2015-03-31 Thread Axel Lin
The of_xlate callback should return ERR_PTR on error. Signed-off-by: Axel Lin --- v2: Return -ENODEV instead of -EINVAL so that phy_optional_get() doesn't fail. drivers/phy/phy-spear1340-miphy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/phy/phy-spea

[PATCH v2 1/2] phy: spear1310-miphy: Return proper error for spear1310_miphy_xlate

2015-03-31 Thread Axel Lin
The of_xlate callback should return ERR_PTR on error. Signed-off-by: Axel Lin --- v2: Return -ENODEV instead of -EINVAL so that phy_optional_get() doesn't fail. drivers/phy/phy-spear1310-miphy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/phy/phy-spea

[PATCH 2/2] phy: spear1340-miphy: Return proper error for spear1340_miphy_xlate

2015-03-25 Thread Axel Lin
The of_xlate callback should return ERR_PTR on error. Signed-off-by: Axel Lin --- drivers/phy/phy-spear1340-miphy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/phy/phy-spear1340-miphy.c b/drivers/phy/phy-spear1340-miphy.c index e42bc20..210979b 100644 --- a

[PATCH 1/2] phy: spear1310-miphy: Return proper error for spear1310_miphy_xlate

2015-03-25 Thread Axel Lin
The of_xlate callback should return ERR_PTR on error. Signed-off-by: Axel Lin --- drivers/phy/phy-spear1310-miphy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/phy/phy-spear1310-miphy.c b/drivers/phy/phy-spear1310-miphy.c index 9f47fae..4684b04 100644 --- a

[PATCH] phy: qcom-ufs: Don't return error if fail to get optional resource

2015-03-22 Thread Axel Lin
"dev_ref_clk_ctrl_mem" is optional resource, so don't return error if fail to get the resource. Since it's an optional resource, don't emit error if fail to get dev_ref_clk_ctrl_mem. Also remove redundant test for res, it's done by devm_ioremap_resource(). Signed-

[PATCH] phy: qcom-ufs: Fix build error due to missing export symbols

2015-03-22 Thread Axel Lin
vers/phy/phy-qcom-ufs-qmp-14nm.ko] undefined! ERROR: "ufs_qcom_phy_remove" [drivers/phy/phy-qcom-ufs-qmp-14nm.ko] undefined! ERROR: "get_ufs_qcom_phy" [drivers/phy/phy-qcom-ufs-qmp-14nm.ko] undefined! make[1]: *** [__modpost] Error 1 make: *** [modules] Error 2 Signed-off-by: A

[PATCH] regulator: stw481x: Remove unused fields from struct stw481x

2015-03-19 Thread Axel Lin
The mutex lock is not used at all, remove it. The *vmmc_regulator is not necessary, use a local variable in stw481x_vmmc_regulator_probe() instead. Signed-off-by: Axel Lin Reviewed-by: Linus Walleij Acked-by: Lee Jones --- Change the prefix from mfd to regulator. drivers/regulator/stw481x

[PATCH] regulator: Fix documentation for regmap in the config

2015-03-17 Thread Axel Lin
dev_get_regulator() does not exist, fix the typo. 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 d4ad5b5..045f709 100644 --- a/include

[PATCH RESEND] mfd: stw481x: Remove unused fields from struct stw481x

2015-03-17 Thread Axel Lin
The mutex lock is not used at all, remove it. The *vmmc_regulator is not necessary, use a local variable in stw481x_vmmc_regulator_probe() instead. Signed-off-by: Axel Lin Reviewed-by: Linus Walleij Acked-by: Lee Jones --- Hi Mark, Lee prefers this patch to be applied via regulator tree, so I

Re: [PATCH] mfd: stw481x: Remove unused fields from struct stw481x

2015-03-16 Thread Axel Lin
2015-02-16 19:51 GMT+08:00 Lee Jones : > On Fri, 13 Feb 2015, Axel Lin wrote: > >> The mutex lock is not used at all, remove it. >> The *vmmc_regulator is not necessary, use a local variable in >> stw481x_vmmc_regulator_probe() instead. >> >> Signed-off-by: Ax

Re: [PATCH] phy: qcom-ufs: Catch devm_phy_create failure in ufs_qcom_phy_generic_probe

2015-03-16 Thread Axel Lin
2015-03-03 9:05 GMT+08:00 Axel Lin : > Current code does NULL test against return value of > ufs_qcom_phy_generic_probe. > However, in the case of devm_phy_create() failure, ufs_qcom_phy_generic_probe > does not return NULL. Fix it. Hi Kishon, Seems this patch is missed. Should

[PATCH] phy: samsung_usb2: Fixup samsung_usb2_phy_power_on/off paths

2015-03-16 Thread Axel Lin
Ensure we have balanced clk_prepare_enable/clk_disable_unprepare calls if .power_on or .power_off callbacks return error. Signed-off-by: Axel Lin --- drivers/phy/phy-samsung-usb2.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/phy/phy-samsung-usb2.c b

[PATCH] phy: omap-usb2: Fix missing clk_prepare call when using old dt name

2015-03-10 Thread Axel Lin
Current code does not call clk_prepare(phy->optclk) when using the old usb_otg_ss_refclk960m name. Fix it. Signed-off-by: Axel Lin --- drivers/phy/phy-omap-usb2.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/phy/phy-omap-usb2.c b/drivers/phy/phy-omap-usb

[PATCH] phy: exynos-mipi-video: Fix unbalanced lock on non-regmap path

2015-03-10 Thread Axel Lin
Remove the second lock on non-regmap path. Fixes: 278270e39efa (phy: exynos-mipi-video: Use spin_lock to protct state->regmap rmw operations) Reported-by: Julia Lawall Signed-off-by: Axel Lin --- drivers/phy/phy-exynos-mipi-video.c | 1 - 1 file changed, 1 deletion(-) diff --git a/driv

[PATCH] phy: berlin-usb: Set drvdata for phy and use it

2015-03-10 Thread Axel Lin
At the context where we have pointer to struct phy, it's useful to call phy_get_drvdata() to get the address of priv. With this change, we can remove the to_phy_berlin_usb_priv() macro and remove *phy from struct phy_berlin_usb_priv. Signed-off-by: Axel Lin --- drivers/phy/phy-berlin-usb.c

[PATCH] phy: twl4030-usb: Remove redundant assignment for twl->linkstat

2015-03-09 Thread Axel Lin
It's pointless to set twl->linkstat twice. Signed-off-by: Axel Lin --- Resend with linux-usb in Cc. drivers/phy/phy-twl4030-usb.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/phy/phy-twl4030-usb.c b/drivers/phy/phy-twl4030-usb.c index 8e87f54..bc42d6a 100644 --- a/drivers

Re: [RFC][PATCH 2/2] phy: miphy365x: Convert to use phy.h instead of phy-miphy365x.h

2015-03-09 Thread Axel Lin
2015-03-09 19:44 GMT+08:00 Kishon Vijay Abraham I : > Hi, > > > On Thursday 05 March 2015 07:27 AM, Axel Lin wrote: >> >> The defines in phy-miphy365x.h are all covered in phy.h: >> >> MIPHY_TYPE_SATA == PHY_TYPE_STA >> MIPHY_TYPE_PCIE == PHY_TYPE_PCIE &g

[PATCH] phy: ti/omap: Fix modalias

2015-03-06 Thread Axel Lin
Remove extra space in MODULE_ALIAS. Signed-off-by: Axel Lin --- drivers/phy/phy-omap-control.c | 2 +- drivers/phy/phy-omap-usb2.c| 2 +- drivers/phy/phy-ti-pipe3.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/phy/phy-omap-control.c b/drivers/phy/phy

[PATCH] phy: core: Fixup return value of phy_exit when !pm_runtime_enabled

2015-03-05 Thread Axel Lin
When phy_pm_runtime_get_sync() returns -ENOTSUPP, phy_exit() also returns -ENOTSUPP if !phy->ops->exit. Fix it. Also move the code to override ret close to the code we got ret. I think it is less error prone this way. Signed-off-by: Axel Lin --- drivers/phy/phy-core.c | 7 +++

Re: [PATCH 1/3] phy: omap-control: Remove unneeded ifdef CONFIG_OF guard and of_match_ptr

2015-03-05 Thread Axel Lin
2015-03-05 18:48 GMT+08:00 Roger Quadros : > Hi Alex, It's Axel. > > Since we're anyways going to fail probe for !CONFIG_OF, why do you want to > add the unnecessary device table to the kernel? > > what are you benefiting from this change? If the driver works for both dt case and non-dt case, usi

[PATCH 3/3] phy: ti-pipe3: Remove unneeded ifdef CONFIG_OF guard and of_match_ptr

2015-03-05 Thread Axel Lin
if !CONFIG_OF, the probe fails. This is a dt-only driver, so the ifdef CONFIG_OF guard and of_match_ptr are not needed. Signed-off-by: Axel Lin --- drivers/phy/phy-ti-pipe3.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/phy/phy-ti-pipe3.c b/drivers/phy

[PATCH 2/3] phy: omap-usb2: Remove unneeded ifdef CONFIG_OF guard and of_match_ptr

2015-03-05 Thread Axel Lin
if !CONFIG_OF, the probe fails. This is a dt-only driver, so the ifdef CONFIG_OF guard and of_match_ptr are not needed. Signed-off-by: Axel Lin --- drivers/phy/phy-omap-usb2.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/phy/phy-omap-usb2.c b/drivers/phy/phy

[PATCH 1/3] phy: omap-control: Remove unneeded ifdef CONFIG_OF guard and of_match_ptr

2015-03-05 Thread Axel Lin
if !CONFIG_OF, the probe fails. This is a dt-only driver, so the ifdef CONFIG_OF guard and of_match_ptr are not needed. Signed-off-by: Axel Lin --- drivers/phy/phy-omap-control.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/phy/phy-omap-control.c b

[RFC][PATCH 2/2] phy: miphy365x: Convert to use phy.h instead of phy-miphy365x.h

2015-03-04 Thread Axel Lin
The defines in phy-miphy365x.h are all covered in phy.h: MIPHY_TYPE_SATA == PHY_TYPE_STA MIPHY_TYPE_PCIE == PHY_TYPE_PCIE MIPPHY_TYPE_USB == PHY_TYPE_USB2 So covert to use phy.h and then delete phy-miphy365x.h. Signed-off-by: Axel Lin --- Documentation/devicetree/bindings/ata/ahci-st.txt

[PATCH 1/2] phy: miphy365x: Convert to devm_kcalloc and fix wrong sizof

2015-03-04 Thread Axel Lin
Prefer devm_kcalloc over devm_kzalloc with multiply. In additional, use sizeof(phy) is incorrect, fix it. Signed-off-by: Axel Lin --- drivers/phy/phy-miphy365x.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/phy/phy-miphy365x.c b/drivers/phy/phy-miphy365x.c

[PATCH 2/2] phy: miphy28lp: Use PTR_ERR_OR_ZERO

2015-03-04 Thread Axel Lin
PTR_ERR_OR_ZERO simplifies the code. Signed-off-by: Axel Lin --- drivers/phy/phy-miphy28lp.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/phy/phy-miphy28lp.c b/drivers/phy/phy-miphy28lp.c index 9334352..c4cc11d 100644 --- a/drivers/phy/phy-miphy28lp.c +++ b

[PATCH 1/2] phy: miphy28lp: Convert to devm_kcalloc and fix wrong sizof

2015-03-04 Thread Axel Lin
Prefer devm_kcalloc over devm_kzalloc with multiply. In additional, use sizeof(phy) is incorrect, fix it. Signed-off-by: Axel Lin --- This patch is on top of below patch: [PATCH 1/2] phy: miphy28lp: Avoid calling of_get_child_count() multiple times drivers/phy/phy-miphy28lp.c | 5 ++--- 1 file

[PATCH] phy: berlin-sata: Use devm_kcalloc at appropriate place

2015-03-04 Thread Axel Lin
Prefer devm_kcalloc over devm_kzalloc with multiply. Signed-off-by: Axel Lin --- drivers/phy/phy-berlin-sata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/phy/phy-berlin-sata.c b/drivers/phy/phy-berlin-sata.c index 099eee8..6f3e06d 100644 --- a/drivers/phy/phy

[PATCH] phy: xgene: Use PTR_ERR_OR_ZERO

2015-03-04 Thread Axel Lin
Also remove unneeded goto and rc variable. Signed-off-by: Axel Lin --- drivers/phy/phy-xgene.c | 23 +-- 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/drivers/phy/phy-xgene.c b/drivers/phy/phy-xgene.c index 2263cd0..385362e 100644 --- a/drivers/phy/phy

[PATCH] phy: rockchip-usb: Fixup rockchip_usb_phy_power_on failure path

2015-03-03 Thread Axel Lin
If rockchip_usb_phy_power() fails, we need to call clk_disable_unprepare() before return. This is to ensure we have balanced clk_enable/disable calls. Also remove unneeded ret checking in rockchip_usb_phy_power_off. Signed-off-by: Axel Lin --- drivers/phy/phy-rockchip-usb.c | 6 +++--- 1 file

[PATCH] phy: ti-pipe3: Simplify ti_pipe3_dpll_wait_lock implementation

2015-03-03 Thread Axel Lin
Code simplification. No functional change. Signed-off-by: Axel Lin --- drivers/phy/phy-ti-pipe3.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/phy/phy-ti-pipe3.c b/drivers/phy/phy-ti-pipe3.c index 95c88f9..ed72b0d 100644 --- a/drivers/phy/phy-ti-pipe3.c

[PATCH] phy: samsung-usb2: Remove NULL terminating entry from phys array

2015-03-02 Thread Axel Lin
Current code uses num_phys settings to tell the number of entries in phys. Thus remove the NULL terminating entry from phys array which is not necessary. Signed-off-by: Axel Lin --- drivers/phy/phy-exynos4210-usb2.c | 1 - drivers/phy/phy-exynos4x12-usb2.c | 1 - drivers/phy/phy-exynos5250-usb2

[PATCH] phy: qcom-ufs: Catch devm_phy_create failure in ufs_qcom_phy_generic_probe

2015-03-02 Thread Axel Lin
Current code does NULL test against return value of ufs_qcom_phy_generic_probe. However, in the case of devm_phy_create() failure, ufs_qcom_phy_generic_probe does not return NULL. Fix it. Signed-off-by: Axel Lin --- drivers/phy/phy-qcom-ufs.c | 1 + 1 file changed, 1 insertion(+) diff --git a

[PATCH] phy: hix5hd2-sata: Check return value of platform_get_resource

2015-03-02 Thread Axel Lin
This prevent NULL pointer dereference if res is NULL. Signed-off-by: Axel Lin --- This patch replaces [PATCH] phy: hix5hd2-sata: Convert to use devm_ioremap_resource, as zhangfei pinted out that the memory region is shared with sata controller so devm_request_mem_region would fail. drivers/phy

[PATCH] phy: hix5hd2-sata: Convert to use devm_ioremap_resource

2015-03-01 Thread Axel Lin
devm_ioremap_resource() also has sanity check for the res argument which is missed in current code. Signed-off-by: Axel Lin --- drivers/phy/phy-hix5hd2-sata.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/phy/phy-hix5hd2-sata.c b/drivers/phy/phy-hix5hd2

[PATCH] phy: berlin-usb: Use PTR_ERR_OR_ZERO

2015-03-01 Thread Axel Lin
PTR_ERR_OR_ZERO simplifies the code. Signed-off-by: Axel Lin --- drivers/phy/phy-berlin-usb.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/phy/phy-berlin-usb.c b/drivers/phy/phy-berlin-usb.c index c8a8d53..9f7cc7e 100644 --- a/drivers/phy/phy-berlin-usb.c

[PATCH] phy: twl4030-usb: Remove redundant assignment for twl->linkstat

2015-03-01 Thread Axel Lin
It's pointless to set twl->linkstat twice. Signed-off-by: Axel Lin --- drivers/phy/phy-twl4030-usb.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/phy/phy-twl4030-usb.c b/drivers/phy/phy-twl4030-usb.c index 8e87f54..bc42d6a 100644 --- a/drivers/phy/phy-twl4030-usb.c +++ b

[PATCH] phy: exynos5-usbdrd: Fix off-by-one valid value checking for args->args[0]

2015-02-27 Thread Axel Lin
Current code uses args->args[0] as array subscript of phy_drd->phys[]. So the valid value range for args->args[0] is 0 ... EXYNOS5_DRDPHYS_NUM - 1. Signed-off-by: Axel Lin --- drivers/phy/phy-exynos5-usbdrd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/driver

[PATCH] phy: exynos-dp-video: Kill exynos_dp_video_phy_pwr_isol function

2015-02-26 Thread Axel Lin
If IS_ERR(state->regs) the .probe fails. So IS_ERR(state->regs) test in exynos_dp_video_phy_pwr_isol() is not necessary. exynos_dp_video_phy_pwr_isol() simply does a regmap_update_bits() call now, just call regmap_update_bits() instead and return proper return value. Signed-off-by: Ax

[PATCH RFT] phy: exynos-mipi-video: Use spin_lock to protct state->regmap rmw operations

2015-02-26 Thread Axel Lin
The state->regmap is initialized by devm_regmap_init_mmio(). So it's fine to use spin_lock rather than mutex to protct state->regmap rmw operations. Signed-off-by: Axel Lin --- Hi Sylwester, I don't have this hardware handy, so can you test if this patch works. This patch

[PATCH] phy: exynos-mipi-video: Fixup the test for state->regmap

2015-02-25 Thread Axel Lin
syscon_regmap_lookup_by_phandle() returns ERR_PTR on error. Thus don't use null test against state->regmap. Signed-off-by: Axel Lin --- drivers/phy/phy-exynos-mipi-video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/phy/phy-exynos-mipi-video.c b/drivers

[PATCH v2] phy: armada375-usb2: Set drvdata for phy and use it

2015-02-25 Thread Axel Lin
At the context we have pointer to struct phy, it's useful to call phy_get_drvdata() to get the address of cluster_phy. This has slightly better readability than calling dev_get_drvdata(phy->dev.parent). Signed-off-by: Axel Lin --- v2: update commit log drivers/phy/phy-armada375-us

[PATCH] phy: miphy28lp: Add missing .owner field in miphy28lp_ops

2015-02-25 Thread Axel Lin
Add missing .owner field in miphy28lp_ops, which is used for refcounting. Signed-off-by: Axel Lin --- drivers/phy/phy-miphy28lp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/phy/phy-miphy28lp.c b/drivers/phy/phy-miphy28lp.c index 9b2848e..44e2861 100644 --- a/drivers/phy/phy

[PATCH] phy: xgene: Remove duplicate code to set ctx->dev

2015-02-25 Thread Axel Lin
Set it once is enough and it's done after devm_kzalloc(). Signed-off-by: Axel Lin --- drivers/phy/phy-xgene.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/phy/phy-xgene.c b/drivers/phy/phy-xgene.c index 29214a3..2263cd0 100644 --- a/drivers/phy/phy-xgene.c +++ b/drivers/ph

[PATCH] phy: armada375-usb2: Set drvdata for phy and use it

2015-02-24 Thread Axel Lin
Signed-off-by: Axel Lin --- drivers/phy/phy-armada375-usb2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/phy/phy-armada375-usb2.c b/drivers/phy/phy-armada375-usb2.c index 7c99ca2..8ccc395 100644 --- a/drivers/phy/phy-armada375-usb2.c +++ b/drivers/phy/phy

Re: [PATCH 1/2] phy: miphy28lp: Avoid calling of_get_child_count() multiple times

2015-02-24 Thread Axel Lin
2015-02-24 21:47 GMT+08:00 Kishon Vijay Abraham I : > Hi, > > On Tuesday 24 February 2015 05:22 PM, Axel Lin wrote: >> >> Currently, of_get_child_count() is called in each iteration of the for >> loop in >> miphy28lp_xlate(). This patch stores the return value

[PATCH 2/2] phy: miphy365x: Avoid calling of_get_child_count() multiple times

2015-02-24 Thread Axel Lin
Currently, of_get_child_count() is called in each iteration of the for loop in miphy365x_xlate(). This patch stores the return value of of_get_child_count() in miphy_dev->nphys and call of_get_child_count() once in miphy365x_probe(). Signed-off-by: Axel Lin --- drivers/phy/phy-miphy365x.c |

[PATCH 1/2] phy: miphy28lp: Avoid calling of_get_child_count() multiple times

2015-02-24 Thread Axel Lin
Currently, of_get_child_count() is called in each iteration of the for loop in miphy28lp_xlate(). This patch stores the return value of of_get_child_count() in miphy_dev->nphys and call of_get_child_count() once in miphy28lp_probe(). Signed-off-by: Axel Lin --- drivers/phy/phy-miphy28lp.c |

[PATCH] mfd: stw481x: Remove unused fields from struct stw481x

2015-02-12 Thread Axel Lin
The mutex lock is not used at all, remove it. The *vmmc_regulator is not necessary, use a local variable in stw481x_vmmc_regulator_probe() instead. Signed-off-by: Axel Lin --- drivers/regulator/stw481x-vmmc.c | 8 include/linux/mfd/stw481x.h | 4 2 files changed, 4 insertions

[PATCH] regulator: lp872x: Remove **regulators from struct lp872x

2015-01-25 Thread Axel Lin
Current code is using devm_regulator_register(), so we don't need to store *rdev in struct lp872x for clean up. Also clean up lp872x_probe() a bit to remove unnecessary goto and num_regulators variable. Signed-off-by: Axel Lin --- drivers/regulator/lp872x.c | 24 +--- 1

[PATCH] regulator: Fix documentation for regmap in the config

2015-01-24 Thread Axel Lin
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 d4ad5b5..045f709 100644 --- a/include/linux/regulator/driver.h +++ b/include/linux/regulator

[PATCH] regulator: qcom_rpm: Don't update vreg->uV/mV if rpm_reg_write fails

2015-01-23 Thread Axel Lin
Ensure get_voltage return correct voltage if set_voltage fails. Signed-off-by: Axel Lin --- drivers/regulator/qcom_rpm-regulator.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/regulator/qcom_rpm-regulator.c b/drivers/regulator/qcom_rpm-regulator.c

[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 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 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 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] soc: versatile: Add terminating entry for realview_soc_of_match

2014-10-19 Thread Axel Lin
The of_device_id table is supposed to be zero-terminated. Signed-off-by: Axel Lin --- drivers/soc/versatile/soc-realview.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/soc/versatile/soc-realview.c b/drivers/soc/versatile/soc-realview.c index cea8ea3..1a07bf5 100644 --- a/drivers

[PATCH RESEND] regulator: Add stub for devm_regulator_get_exclusive

2014-10-09 Thread Axel Lin
Also makes regulator_get_exclusive and devm_regulator_get_exclusive stub functions return error pointer. Signed-off-by: Axel Lin --- Hi Mark, I hit below build error and then found this patch is still not yet upstream. So here is a resend. CC [M] drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.o

[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] regulator: qcom_rpm: Fix FORCE_MODE_IS_2_BITS macro

2014-09-24 Thread Axel Lin
Current code does not take the macro parameter, fix it. This is not a problem at this moment because the only user actually passes vreg to FORCE_MODE_IS_2_BITS(). Signed-off-by: Axel Lin --- drivers/regulator/qcom_rpm-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] regulator: qcom_rpm: Don't explicitly initialise the first field of config

2014-09-24 Thread Axel Lin
Doing so generates a warning as the first field is a pointer but we use 0 to initialize it. Signed-off-by: Axel Lin --- drivers/regulator/qcom_rpm-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/qcom_rpm-regulator.c b/drivers/regulator/qcom_rpm

[PATCH 2/2] regulator: fan53555: Fix null pointer dereference

2014-09-18 Thread Axel Lin
Set di->regulator before dereference it. Signed-off-by: Axel Lin --- drivers/regulator/fan53555.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/fan53555.c b/drivers/regulator/fan53555.c index 70b31bf..c82fb9e 100644 --- a/drivers/regulator/fan5355

[PATCH 1/2] regulator: fan53555: Fixup report wrong vendor message

2014-09-18 Thread Axel Lin
Signed-off-by: Axel Lin --- drivers/regulator/fan53555.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/regulator/fan53555.c b/drivers/regulator/fan53555.c index f2f5535..70b31bf 100644 --- a/drivers/regulator/fan53555.c +++ b/drivers/regulator/fan53555.c @@ -267,8

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

2014-09-17 Thread Axel Lin
Also makes regulator_get_exclusive and devm_regulator_get_exclusive stub functions return error pointer. Signed-off-by: Axel Lin --- Now drivers/gpu/drm/msm/hdmi/hdmi.c is using devm_regulator_get instead of devm_regulator_get_exclusive. commit 3e87599b68e7929a84a32ab65ad17b79a3f271f6 "dr

[PATCH 2/2] regulator: rk808: Fix missing of_node_put

2014-09-11 Thread Axel Lin
us add missing of_node_put(reg_np). Signed-off-by: Axel Lin --- drivers/regulator/rk808-regulator.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/regulator/rk808-regulator.c b/drivers/regulator/rk808-regulator.c index 9557428..07b0eb4 100644 --- a/drivers/regulator/rk808-reg

[PATCH 1/2] regulator: rk808: Remove unused variables

2014-09-11 Thread Axel Lin
Also remove non-informative comment. Signed-off-by: Axel Lin --- drivers/regulator/rk808-regulator.c | 26 -- 1 file changed, 26 deletions(-) diff --git a/drivers/regulator/rk808-regulator.c b/drivers/regulator/rk808-regulator.c index d91f2b6..9557428 100644 --- a

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 >>&

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

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

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: 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

[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 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: 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] 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: 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: 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

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

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:

[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

[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(-)

[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

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