[PATCH] regulator: bd718x7: Use regulator_map_voltage_ascend for buck5 and buck7

2018-11-09 Thread Axel Lin
The voltages in bd718xx_3rd_nodvs_buck_volts are in ascendant order, so use regulator_map_voltage_ascend. Signed-off-by: Axel Lin --- drivers/regulator/bd718x7-regulator.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/regulator/bd718x7-regulator.c b/drivers/regulator/bd718x7

[PATCH] regulator: stpmic1: Remove explicitly enable_val and disable_val settings

2018-11-02 Thread Axel Lin
When enable_val is the same as enable_mask and disable_val is 0, the regulator core will use enable_mask as enable_val by default. So don't need to explicitly set enable_val and disable_val. Signed-off-by: Axel Lin --- drivers/regulator/stpmic1_regulator.c | 17 + 1 file changed

[PATCH] regulator: stpmic1: Return REGULATOR_MODE_INVALID for invalid mode

2018-10-09 Thread Axel Lin
-EINVAL is not a valid return value for .of_map_mode, return REGULATOR_MODE_INVALID instead. Signed-off-by: Axel Lin --- drivers/regulator/stpmic1_regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/stpmic1_regulator.c b/drivers/regulator

[PATCH v4] regulator: bd718x7: Remove struct bd718xx_pmic

2018-10-04 Thread Axel Lin
All the fields in struct bd718xx_pmic are not really necessary. Remove struct bd718xx_pmic to simplify the code. Signed-off-by: Axel Lin Reviewed-by: Matti Vaittinen --- v4: Drop the pointer to struct bd718xx_pmic inside the struct bd718xx v3: Remove the references to struct bd718xx_pmic from

[PATCH v3] regulator: bd718x7: Remove struct bd718xx_pmic

2018-10-04 Thread Axel Lin
All the fields in struct bd718xx_pmic are not really necessary. Remove struct bd718xx_pmic to simplify the code. Signed-off-by: Axel Lin Reviewed-by: Matti Vaittinen --- v3: Remove the references to struct bd718xx_pmic from include/linux/mfd/rohm-bd718x7.h drivers/regulator/bd718x7

[PATCH v2] regulator: bd718x7: Remove struct bd718xx_pmic

2018-10-03 Thread Axel Lin
All the fields in struct bd718xx_pmic are not really necessary. Remove struct bd718xx_pmic to simplify the code. Signed-off-by: Axel Lin --- v2: Sorry, just update the subject line. drivers/regulator/bd718x7-regulator.c | 59 +-- 1 file changed, 20 insertions(+), 39

[PATCH] regulator: bd718x7: struct bd718xx_pmic

2018-10-03 Thread Axel Lin
All the fields in struct bd718xx_pmic are not really necessary. Remove struct bd718xx_pmic to simplify the code. Signed-off-by: Axel Lin --- drivers/regulator/bd718x7-regulator.c | 59 +-- 1 file changed, 20 insertions(+), 39 deletions(-) diff --git a/drivers/regulator

[PATCH] spi: at91-usart: Remove duplicated checking for spi->bits_per_word

2018-10-02 Thread Axel Lin
This checking is already done in __spi_validate_bits_per_word(). Signed-off-by: Axel Lin --- drivers/spi/spi-at91-usart.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/spi/spi-at91-usart.c b/drivers/spi/spi-at91-usart.c index a924657642fa..519853f14934

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

2018-08-27 Thread Axel Lin
Add missing .owner field in regulator_desc, which is used for refcounting. Signed-off-by: Axel Lin --- drivers/regulator/isl9305.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/regulator/isl9305.c b/drivers/regulator/isl9305.c index 257c1943e753..9c2607e912cf 100644

[PATCH] regulator: bd71837: Remove duplicate assignment for n_voltages of LDO2

2018-08-24 Thread Axel Lin
Set it once is enough. Also move n_voltages close to volt_table for better readability. Signed-off-by: Axel Lin --- drivers/regulator/bd71837-regulator.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/regulator/bd71837-regulator.c b/drivers/regulator/bd71837

[PATCH 1/2] regulator: bd71837: Staticize ldo_2_volts

2018-06-27 Thread Axel Lin
Signed-off-by: Axel Lin --- drivers/regulator/bd71837-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/bd71837-regulator.c b/drivers/regulator/bd71837-regulator.c index 6eae4d0432a2..403b45de1262 100644 --- a/drivers/regulator/bd71837-regulator.c

[PATCH 2/2] regulator: bd71837: Simplify bd71837_set_voltage_sel_restricted implementation

2018-06-27 Thread Axel Lin
Signed-off-by: Axel Lin --- drivers/regulator/bd71837-regulator.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/regulator/bd71837-regulator.c b/drivers/regulator/bd71837-regulator.c index 403b45de1262..f57f42ed7160 100644 --- a/drivers/regulator

[PATCH v2] regulator: sc2731: Fix defines for SC2731_WR_UNLOCK and SC2731_PWR_WR_PROT_VALUE

2018-01-01 Thread Axel Lin
The defines for SC2731_WR_UNLOCK and SC2731_PWR_WR_PROT_VALUE makes regmap_write() call looks strange because it takes reg parameter fist then val. Base on Erick's suggestion to define SC2731_PWR_WR_PROT and SC2731_WR_UNLOCK_VALUE instead. Signed-off-by: Axel Lin <axel@ingics.

[PATCH] regulator: sc2731: Fix defines for SC2731_WR_UNLOCK and SC2731_PWR_WR_PROT_VALUE

2017-12-28 Thread Axel Lin
The define for SC2731_WR_UNLOCK and SC2731_PWR_WR_PROT_VALUE are swapped, so the code calling regmap_write() looks strange. Fix it. regmap_write takes reg parameter first then val. Signed-off-by: Axel Lin <axel@ingics.com> --- Hi Erick, I don't have the datasheet. Can you check this?

[PATCH RFT] regulator: qcom_spmi: Use regmap helpers for enable/disable/is_enabled callback

2017-11-29 Thread Axel Lin
Setup .enable_reg/.enable_mask/.enable_val fields, then we can use the regmap helpers for enable/disable/is_enabled callback implementation. Signed-off-by: Axel Lin <axel@ingics.com> --- Hi Stephen, I don't have this h/w. Appreciate if you can review and test this patch. drivers/reg

Re: [PATCH] regulator: tps65218: Add NULL test for devm_kzalloc call

2017-11-16 Thread Axel Lin
2017-11-16 19:23 GMT+08:00 Keerthy <j-keer...@ti.com>: > > > On Monday 13 November 2017 06:22 PM, Axel Lin wrote: >> Signed-off-by: Axel Lin <axel@ingics.com> > > One line commit message would be better than blank commit message. It's just too trivial and checkpatch does not complain.

[PATCH] regulator: tps65218: Remove unused enum tps65218_regulators

2017-11-13 Thread Axel Lin
The enum tps65218_regulators is no longer being used after commit 2dc4940360d4 ("regulator: tps65218: Remove all the compatibles"). Signed-off-by: Axel Lin <axel@ingics.com> --- drivers/regulator/tps65218-regulator.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/d

[PATCH] regulator: tps65218: Add NULL test for devm_kzalloc call

2017-11-13 Thread Axel Lin
Signed-off-by: Axel Lin <axel@ingics.com> --- drivers/regulator/tps65218-regulator.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/regulator/tps65218-regulator.c b/drivers/regulator/tps65218-regulator.c index bc489958fed7..b3f89ebfb1a0 100644 --- a/drivers/regulator/tp

[PATCH] regulator: axp20x: Simplify axp20x_is_polyphase_slave implementation

2017-10-15 Thread Axel Lin
The code to handle AXP803_ID and AXP813_ID cases are exactly the same. Make the switch-case fall through to avoid duplicate code. Signed-off-by: Axel Lin <axel@ingics.com> --- drivers/regulator/axp20x-regulator.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff

[PATCH] mfd: lp87565: Convert to use devm_mfd_add_devices

2017-07-30 Thread Axel Lin
This fixes missing mfd_remove_devices() call when unload the module. Signed-off-by: Axel Lin <axel@ingics.com> --- drivers/mfd/lp87565.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/mfd/lp87565.c b/drivers/mfd/lp87565.c index 340ad0c..32d2a07

[PATCH] regulator: bd9571mwv: Statize local symbols

2017-05-28 Thread Axel Lin
These functions are only used by this driver, make them static. Signed-off-by: Axel Lin <axel@ingics.com> --- drivers/regulator/bd9571mwv-regulator.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/regulator/bd9571mwv-regulator.c b/drivers/reg

Re: [PATCH RESEND] regulator: rn5t618: Fix out of bounds array access

2017-04-15 Thread Axel Lin
2017-04-16 9:12 GMT+08:00 Axel Lin <axel@ingics.com>: > 2017-04-16 0:53 GMT+08:00 Stefan Agner <ste...@agner.ch>: >> On 2017-04-15 07:52, Axel Lin wrote: >>> The commit "regulator: rn5t618: Add RN5T567 PMIC support" added >>> RN5T618_DCDC4

Re: [PATCH RESEND] regulator: rn5t618: Fix out of bounds array access

2017-04-15 Thread Axel Lin
2017-04-16 0:53 GMT+08:00 Stefan Agner <ste...@agner.ch>: > On 2017-04-15 07:52, Axel Lin wrote: >> The commit "regulator: rn5t618: Add RN5T567 PMIC support" added >> RN5T618_DCDC4 to the enum, then RN5T618_REG_NUM is also changed. >> So for rn5t618, the

[PATCH RESEND] regulator: rn5t618: Fix out of bounds array access

2017-04-15 Thread Axel Lin
n5t618, so we had better remove RN5T618_REG_NUM and get the correct num_regulators during probe instead. Fixes: ed6d362d8dbc ("regulator: rn5t618: Add RN5T567 PMIC support") Signed-off-by: Axel Lin <axel@ingics.com> --- RESEND: Correct subject line (remove double Fix)

[PATCH] regulator: rn5t618: Fix Fix out of bounds array access

2017-04-15 Thread Axel Lin
n5t618, so we had better remove RN5T618_REG_NUM and get the correct num_regulators during probe instead. Fixes: ed6d362d8dbc ("regulator: rn5t618: Add RN5T567 PMIC support") Signed-off-by: Axel Lin <axel@ingics.com> --- drivers/regulator/rn5t618-regulator.c | 8 i

[PATCH] regulator: vctrl: Fix out of bounds array access for vctrl->vtable

2017-04-13 Thread Axel Lin
Current code only allocates rdesc->n_voltages entries for vctrl->vtable. Thus use rdesc->n_voltages instead of n_voltages in the for loop. While at it, also switch to use devm_kcalloc instead of devm_kmalloc_array + __GFP_ZERO flag and fix the argument order. Signed-off-by: Axel

[PATCH] regulator: tps65132: Fix off-by-one for .max_register setting

2017-04-13 Thread Axel Lin
TPS65132_REG_CONTROL(0xFF) is the latest valid register. Signed-off-by: Axel Lin <axel@ingics.com> --- drivers/regulator/tps65132-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/tps65132-regulator.c b/drivers/regulator/tps65132-regul

[PATCH 1/2] regulator: twl: Remove unused fields from struct twlreg_info

2016-11-23 Thread Axel Lin
The min_mV, max_mV and flags fields are not used, so remove them. Signed-off-by: Axel Lin <axel@ingics.com> --- drivers/regulator/twl-regulator.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/regulator/twl-regulator.c b/drivers/regulator/twl-regulator.c index d

[PATCH 2/2] regulator: twl6030: Remove unused fields from struct twlreg_info

2016-11-23 Thread Axel Lin
The table_len, *table, remap and max_mV fields are not used, so remove them. Signed-off-by: Axel Lin <axel@ingics.com> --- drivers/regulator/twl6030-regulator.c | 46 +-- 1 file changed, 17 insertions(+), 29 deletions(-) diff --git a/drivers/regulator/t

[PATCH] regulator: tps6507x: Drop pointless static qualifier for *reg_data variable

2016-10-21 Thread Axel Lin
There is no need to use static for this local variable. Signed-off-by: Axel Lin <axel@ingics.com> --- drivers/regulator/tps6507x-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/tps6507x-regulator.c b/drivers/regulator/tps6507x-regul

[PATCH] regulator: rk808: Use rdev_get_id() to access id of regulator

2016-10-20 Thread Axel Lin
RK808_ID_DCDC1 is 0, no need to do subtract RK808_ID_DCDC1. Signed-off-by: Axel Lin <axel@ingics.com> --- drivers/regulator/rk808-regulator.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/regulator/rk808-regulator.c b/drivers/regulator

Re: [PATCH RFT] platform/x86: intel_pmc_ipc: Convert to use platform_device_register_full

2016-09-28 Thread Axel Lin
2016-09-29 7:36 GMT+08:00 Darren Hart : > +LKML > > Axel, please always include LKML on any patch. I thought +LKML is optional if you already have a dedicated platform-driver-x86 maillist.

Re: [PATCH] phy: meson-usb2: Fix build dependency

2016-09-20 Thread Axel Lin
2016-09-21 12:06 GMT+08:00 Kishon Vijay Abraham I <kis...@ti.com>: > > > On Monday 19 September 2016 10:14 PM, Kevin Hilman wrote: >> Martin Blumenstingl <martin.blumensti...@googlemail.com> writes: >> >>> Hi Axel, >>> >>> On Fri, S

[PATCH] phy: sun4i-usb: Fix build dependency

2016-09-15 Thread Axel Lin
of_usb_get_dr_mode_by_phy will not be compiled if !USB_COMMON, fix below build error. ERROR: "of_usb_get_dr_mode_by_phy" [drivers/phy/phy-sun4i-usb.ko] undefined! scripts/Makefile.modpost:91: recipe for target '__modpost' failed make[1]: *** [__modpost] Error 1 Signed-off-by: Axel

[PATCH] phy: meson-usb2: Fix build dependency

2016-09-15 Thread Axel Lin
Signed-off-by: Axel Lin <axel@ingics.com> --- drivers/phy/Kconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig index 6ad87ec..cc27c12 100644 --- a/drivers/phy/Kconfig +++ b/drivers/phy/Kconfig @@ -458,6 +458,8 @@ config PHY_MESO

[PATCH] mfd: lp873x: Remove unused mutex lock from struct lp873x

2016-09-05 Thread Axel Lin
The mutex is not used, so remove it. Signed-off-by: Axel Lin <axel@ingics.com> --- drivers/mfd/lp873x.c | 2 -- include/linux/mfd/lp873x.h | 1 - 2 files changed, 3 deletions(-) diff --git a/drivers/mfd/lp873x.c b/drivers/mfd/lp873x.c index 9af064c..873c608 100644 --- a/drive

Re: [RESEND AGAIN][PATCH 1/2] phy: bcm-ns2-pcie: Get rid of struct ns2_pci_phy

2016-08-30 Thread Axel Lin
2016-08-30 22:05 GMT+08:00 Kishon Vijay Abraham I <kis...@ti.com>: > > > On Tuesday 30 August 2016 07:23 PM, Axel Lin wrote: >> By setting phy_set_drvdata(phy, mdiodev), struct ns2_pci_phy can be >> removed. >> >> Signed-off-by: Axel Lin <axel@ingics

[RESEND AGAIN][PATCH 1/2] phy: bcm-ns2-pcie: Get rid of struct ns2_pci_phy

2016-08-30 Thread Axel Lin
By setting phy_set_drvdata(phy, mdiodev), struct ns2_pci_phy can be removed. Signed-off-by: Axel Lin <axel@ingics.com> Reviewed-and-tested-by: Jon Mason <jon.ma...@broadcom.com> --- This was sent on http://www.spinics.net/lists/netdev/msg383513.html Resent on https://lkml.org/lk

[RESEND AGAIN][PATCH 2/2] phy: bcm-ns2-pcie: Set missing .owner field in ns2_pci_phy_ops

2016-08-30 Thread Axel Lin
Add missing .owner field in ns2_pci_phy_ops, which is used for refcounting. While at it, also makes ns2_pci_phy_ops const as it's never get modified. Signed-off-by: Axel Lin <axel@ingics.com> Reviewed-and-tested-by: Jon Mason <jon.ma...@broadcom.com> --- This was

[RESEND][PATCH 1/2] phy: bcm-ns2-pcie: Get rid of struct ns2_pci_phy

2016-08-12 Thread Axel Lin
By setting phy_set_drvdata(phy, mdiodev), struct ns2_pci_phy can be removed. Signed-off-by: Axel Lin <axel@ingics.com> --- I don't have this h/w. Appreciate if someone can test this patch serial. This was sent on http://www.spinics.net/lists/netdev/msg383513.html drivers/phy/phy-b

[RESEND][PATCH 2/2] phy: bcm-ns2-pcie: Set missing .owner field in ns2_pci_phy_ops

2016-08-12 Thread Axel Lin
Add missing .owner field in ns2_pci_phy_ops, which is used for refcounting. While at it, also makes ns2_pci_phy_ops const as it's never get modified. Signed-off-by: Axel Lin <axel@ingics.com> --- This was sent on http://www.spinics.net/lists/netdev/msg383514.html drivers/phy/phy-b

[PATCH RESEND] phy: exynos5-usbdrd: Remove "static" from local variable

2016-08-12 Thread Axel Lin
The 'reg' local variable does not need to be static. Signed-off-by: Axel Lin <axel@ingics.com> --- This patch was sent on http://www.spinics.net/lists/linux-samsung-soc/msg51405.html drivers/phy/phy-exynos5-usbdrd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[PATCH RESEND] phy: brcm-sata: Return proper error if brcm_sata_phy_init fails

2016-08-10 Thread Axel Lin
Return proper error instead of 0 if brcm_sata_phy_init fails. Signed-off-by: Axel Lin <axel@ingics.com> --- It was sent on https://lkml.org/lkml/2016/5/23/12 . drivers/phy/phy-brcm-sata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/phy/phy-brcm-sa

[PATCH] mfd: altera-a10sr: Make altr_a10sr_regmap_config static const

2016-08-05 Thread Axel Lin
It's only used in this driver and never get modified, make it static const. Signed-off-by: Axel Lin <axel@ingics.com> --- drivers/mfd/altera-a10sr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mfd/altera-a10sr.c b/drivers/mfd/altera-a10sr.c index c

[RESEND][PATCH 2/2] regulator: mt6323: Constify struct regulator_ops

2016-07-19 Thread Axel Lin
Signed-off-by: Axel Lin <axel@ingics.com> --- drivers/regulator/mt6323-regulator.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/regulator/mt6323-regulator.c b/drivers/regulator/mt6323-regulator.c index f7831f3..b7b9670 100644 --- a/drivers/reg

[RESEND][PATCH 1/2] regulator: mt6323: Fix module description

2016-07-19 Thread Axel Lin
Signed-off-by: Axel Lin <axel@ingics.com> --- drivers/regulator/mt6323-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/mt6323-regulator.c b/drivers/regulator/mt6323-regulator.c index 927cc23..f7831f3 100644 --- a/drivers/regulator/

[PATCH 2/2] regulator: mt6323: Constify struct regulator_ops

2016-07-19 Thread Axel Lin
Signed-off-by: Axel Lin <axel@ingics.com> ---  drivers/regulator/mt6323-regulator.c | 6 +++---  1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/regulator/mt6323-regulator.c b/drivers/regulator/mt6323-regulator.c index f7831f3..b7b9670 100644 --- a/drivers/reg

[PATCH 1/2] regulator: mt6323: Fix module description

2016-07-19 Thread Axel Lin
Signed-off-by: Axel Lin <axel@ingics.com> ---  drivers/regulator/mt6323-regulator.c | 2 +-  1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/mt6323-regulator.c b/drivers/regulator/mt6323-regulator.c index 927cc23..f7831f3 100644 --- a/drivers/regulator/

[PATCH] regulator: lp873x: Drop _nlr parameter from LP873X_REGULATOR()

2016-06-21 Thread Axel Lin
No need to pass _nlr to LP873X_REGULATOR(), use ARRAY_SIZE to calculate it. Signed-off-by: Axel Lin <axel@ingics.com> --- drivers/regulator/lp873x-regulator.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/regulator/lp873x-regulator.c b/d

[PATCH RFT] regulator: qcom_smd: Remove list_voltage callback for rpm_smps_ldo_ops_fixed

2016-06-14 Thread Axel Lin
esc->fixed_uV without .list_voltage implementation. Fixes: 3bfbb4d1a480 ("regulator: qcom_smd: add list_voltage callback") Signed-off-by: Axel Lin <axel@ingics.com> --- drivers/regulator/qcom_smd-regulator.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/regulator/q

[PATCH] mfd: max77620: Constify resources tables

2016-06-05 Thread Axel Lin
These tables are never modified, so declare them as const. Signed-off-by: Axel Lin <axel@ingics.com> --- drivers/mfd/max77620.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/mfd/max77620.c b/drivers/mfd/max77620.c index 199d261..e831422

[PATCH] pinctrl: tegra: Fix build dependency

2016-06-04 Thread Axel Lin
Signed-off-by: Axel Lin <axel@ingics.com> --- drivers/pinctrl/Makefile | 2 +- drivers/pinctrl/tegra/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pinctrl/Makefile b/drivers/pinctrl/Makefile index 2ed0b3f..25ec450 100644 --- a/drivers/pinctr

[PATCH RFT] regulator: tps51632: Fix setting ramp delay

2016-05-31 Thread Axel Lin
register to 6mV/us. Fix the logic to set slew register. Signed-off-by: Axel Lin <axel@ingics.com> --- drivers/regulator/tps51632-regulator.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/regulator/tps51632-regulator.c b/drivers/regulator/tp

[RFT][PATCH v2] regulator: max8973: Fix setting ramp delay

2016-05-30 Thread Axel Lin
Current code for .set_ramp_delay() rounds down the value written to register, while the implementation of .set_voltage_time_sel() works on original constraints (not rounded down). Fix the logic in .set_ramp_delay and also remove unused ret_val variable. Signed-off-by: Axel Lin <a

Re: [PATCH RFT] regulator: max8972: Fix setting ramp delay

2016-05-30 Thread Axel Lin
2016-05-30 16:48 GMT+08:00 Krzysztof Kozlowski <k.kozlow...@samsung.com>: > On 05/29/2016 01:16 PM, Axel Lin wrote: >> Current code can set ramp delay to a wrong setting that the return value >> from .set_voltage_time_sel is not enough for proper delay. > > I don't under

[RFT][PATCH RESEND] regulator: max8973: Fix setting ramp delay

2016-05-29 Thread Axel Lin
Current code can set ramp delay to a wrong setting that the return value from .set_voltage_time_sel is not enough for proper delay. Fix the logic in .set_ramp_delay and also remove unused ret_val variable. Signed-off-by: Axel Lin <axel@ingics.com> --- RESEND: Fix typo in subject line

[PATCH RFT] regulator: max8972: Fix setting ramp delay

2016-05-29 Thread Axel Lin
Current code can set ramp delay to a wrong setting that the return value from .set_voltage_time_sel is not enough for proper delay. Fix the logic in .set_ramp_delay and also remove unused ret_val variable. Signed-off-by: Axel Lin <axel@ingics.com> --- drivers/regulator/max8973-regul

[PATCH] regulator: palmas: Remove *rdev[PALMAS_NUM_REGS] from struct palmas_pmic

2016-05-29 Thread Axel Lin
Current code uses devm_regulator_register(), so *rdev[PALMAS_NUM_REGS] is no longer required. Signed-off-by: Axel Lin <axel@ingics.com> --- drivers/regulator/palmas-regulator.c | 12 include/linux/mfd/palmas.h | 1 - 2 files changed, 13 deletions(-) diff

[PATCH] regulator: pv880x0: Clean up unnecessary header inclusion

2016-05-23 Thread Axel Lin
Signed-off-by: Axel Lin <axel@ingics.com> --- drivers/regulator/pv88060-regulator.c | 3 --- drivers/regulator/pv88080-regulator.c | 3 --- drivers/regulator/pv88090-regulator.c | 3 --- 3 files changed, 9 deletions(-) diff --git a/drivers/regulator/pv88060-regulator.c b/drivers/reg

Re: [PATCH] phy: brcm-sata: Return proper error if brcm_sata_phy_init fails

2016-05-22 Thread Axel Lin
2016-05-23 13:28 GMT+08:00 Kishon Vijay Abraham I <kis...@ti.com>: > Hi, > > On Monday 23 May 2016 10:51 AM, Axel Lin wrote: >> Signed-off-by: Axel Lin <axel@ingics.com> > > however obvious the patch maybe, it's nice to add a little commit log. I think the s

[PATCH] phy: brcm-sata: Return proper error if brcm_sata_phy_init fails

2016-05-22 Thread Axel Lin
Signed-off-by: Axel Lin <axel@ingics.com> --- drivers/phy/phy-brcm-sata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/phy/phy-brcm-sata.c b/drivers/phy/phy-brcm-sata.c index 6c4c5cb..5d7fad4b 100644 --- a/drivers/phy/phy-brcm-sata.c +++ b/drivers/phy/ph

Re: [PATCH] mailbox: xgene-slimpro: Fix wrong test for devm_kzalloc

2016-04-07 Thread Axel Lin
2016-03-21 20:12 GMT+08:00 Axel Lin <axel@ingics.com>: > devm_kzalloc() returns NULL on failure. Hi, I'm wondering if this trivial fix is lost. Should I resend it?

[PATCH] mailbox: xgene-slimpro: Fix wrong test for devm_kzalloc

2016-03-21 Thread Axel Lin
devm_kzalloc() returns NULL on failure. Signed-off-by: Axel Lin <axel@ingics.com> --- drivers/mailbox/mailbox-xgene-slimpro.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mailbox/mailbox-xgene-slimpro.c b/drivers/mailbox/mailbox-xgene-slimpro.c

[tip:irq/urgent] irqchip/tegra: Switch to use irq_domain_free_irqs_common

2016-03-20 Thread tip-bot for Axel Lin
Commit-ID: 46f920d8a970cf102e18f25814a4ff4729ad8537 Gitweb: http://git.kernel.org/tip/46f920d8a970cf102e18f25814a4ff4729ad8537 Author: Axel Lin <axel@ingics.com> AuthorDate: Sun, 20 Mar 2016 20:44:05 +0800 Committer: Thomas Gleixner <t...@linutronix.de> CommitDate: Sun,

[PATCH] irqchip: tegra: Switch to use irq_domain_free_irqs_common

2016-03-20 Thread Axel Lin
Current code calls irq_domain_alloc_irqs_parent() in .alloc, so it should call irq_domain_free_irqs_parent() accordingly in .free. Fix it by switching to use irq_domain_free_irqs_common() instead of open-coded. Signed-off-by: Axel Lin <axel@ingics.com> --- drivers/irqchip/irq-tegra.

[PATCH 2/2] gpio: xgene-sb: Use irq_domain_free_irqs_common instead of open coded

2016-03-19 Thread Axel Lin
Current code calls irq_domain_alloc_irqs_parent() in .alloc, so it should call irq_domain_free_irqs_parent() accordingly in .free. Fix it by switching to use irq_domain_free_irqs_common() instead. Signed-off-by: Axel Lin <axel@ingics.com> --- drivers/gpio/gpio-xgene-sb.

[PATCH 1/2] irqdomain: Export irq_domain_free_irqs_common

2016-03-18 Thread Axel Lin
Export irq_domain_free_irqs_common so it can be used by modules. Signed-off-by: Axel Lin <axel@ingics.com> --- kernel/irq/irqdomain.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c index 3a519a0..245a485 100644 --- a/kernel/irq/irqdo

Re: [patch 2/2] ASoC: max9867: silence and array overflow warning

2016-02-25 Thread Axel Lin
2016-02-25 15:50 GMT+08:00 Dan Carpenter <dan.carpen...@oracle.com>: > Smatch complains that we might reach the end of this loop without > finding what we're looking for leading to a buffer overflow. > > Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> Rev

[PATCH 3/3] regulator: max77620: Remove duplicate module alias

2016-02-24 Thread Axel Lin
The same alias is already in .id_table. Signed-off-by: Axel Lin <axel@ingics.com> --- drivers/regulator/max77620-regulator.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/regulator/max77620-regulator.c b/drivers/regulator/max77620-regulator.c index 0eb5d18..259e7e1

[PATCH 2/3] regulator: max77620: Eliminate duplicate code

2016-02-24 Thread Axel Lin
Signed-off-by: Axel Lin <axel@ingics.com> --- drivers/regulator/max77620-regulator.c | 20 +++- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/drivers/regulator/max77620-regulator.c b/drivers/regulator/max77620-regulator.c index 761eb96..0eb5d18

[PATCH 1/3] regulator: max77620: Remove unused fields

2016-02-24 Thread Axel Lin
These fields are never used and not required at all, remove them. Signed-off-by: Axel Lin <axel@ingics.com> --- drivers/regulator/max77620-regulator.c | 14 -- 1 file changed, 14 deletions(-) diff --git a/drivers/regulator/max77620-regulator.c b/drivers/regulator/ma

Re: [PATCH 2/2] ASoC: max9867: fix type of variable containing error codes

2016-02-22 Thread Axel Lin
2016-02-23 14:45 GMT+08:00 Andrzej Hajda <a.ha...@samsung.com>: > value variable can contain error values and is compared with zero. > Its type must be signed. Reviewed-by: Axel Lin <axel@ingics.com>

[PATCH] regulator: mt6323: Fix trivial typo in module description

2016-02-18 Thread Axel Lin
Signed-off-by: Axel Lin <axel@ingics.com> --- drivers/regulator/mt6323-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/mt6323-regulator.c b/drivers/regulator/mt6323-regulator.c index 28ebbda..3b685e5 100644 --- a/drivers/regulator/

[PATCH] irqchip/ts4800: Make ts4800_ic_ops static const

2016-02-14 Thread Axel Lin
ts4800_ic_ops is only referenced in this driver, so make it static. In additional, it's never get modified thus also make it const. Signed-off-by: Axel Lin <axel@ingics.com> --- drivers/irqchip/irq-ts4800.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i

[PATCH] regulator: ad5398: Fix return value of ad5398_write_reg

2016-02-11 Thread Axel Lin
value of regulator_set_current_limit() is 0. Fix it by making ad5398_write_reg() return 0 on success. Signed-off-by: Axel Lin <axel@ingics.com> --- drivers/regulator/ad5398.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/regulator/ad5398.c b/drivers/reg

[PATCH 2/2] regulator: qcom_saw: Fix uninitialized variable build warning

2016-02-10 Thread Axel Lin
/qcom_saw-regulator.c:140:7: note: 'found' was declared here Signed-off-by: Axel Lin <axel@ingics.com> --- drivers/regulator/qcom_saw-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/qcom_saw-regulator.c b/drivers/regulator/qcom_saw-regulator.c

[PATCH 1/2] regulator: qcom_saw: Fix testing wrong value

2016-02-10 Thread Axel Lin
Signed-off-by: Axel Lin <axel@ingics.com> --- drivers/regulator/qcom_saw-regulator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/regulator/qcom_saw-regulator.c b/drivers/regulator/qcom_saw-regulator.c index c800f16..c00f0df 100644 --- a/drivers/reg

[PATCH] nvmem: imx-ocotp: Fix return value of imx_ocotp_read

2016-02-02 Thread Axel Lin
imx_ocotp_read() should return 0 on success. Signed-off-by: Axel Lin <axel@ingics.com> --- drivers/nvmem/imx-ocotp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nvmem/imx-ocotp.c b/drivers/nvmem/imx-ocotp.c index b7971d4..d7796eb 100644 --- a/drivers/nvm

[PATCH] mfd: Allow i2c modular drivers to build with I2C=m

2016-01-20 Thread Axel Lin
These drivers can be built as module, so make them depend on I2C rather than I2C=y. Signed-off-by: Axel Lin <axel@ingics.com> --- drivers/mfd/Kconfig | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig index 9

[PATCH] regulator: pv88090: Fix irq leak

2015-12-10 Thread Axel Lin
Use devm_request_threaded_irq to ensure the irq is freed when unload the module. Signed-off-by: Axel Lin <axel@ingics.com> --- drivers/regulator/pv88090-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/pv88090-regulator.c b/drivers/reg

[PATCH] regulator: lm363x: Remove struct lm363x_regulator which is not necessary

2015-11-28 Thread Axel Lin
Signed-off-by: Axel Lin <axel@ingics.com> --- drivers/regulator/lm363x-regulator.c | 20 +--- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/drivers/regulator/lm363x-regulator.c b/drivers/regulator/lm363x-regulator.c index e1b683e..3858735 100644 --- a/d

[PATCH] regulator: lm363x: Staticise ldo_cont_enable_time

2015-11-28 Thread Axel Lin
Signed-off-by: Axel Lin <axel@ingics.com> --- drivers/regulator/lm363x-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/lm363x-regulator.c b/drivers/regulator/lm363x-regulator.c index 3858735..f53e633 100644 --- a/drivers/regulator/

[PATCH] regulator: pv88060: Fix irq leak

2015-11-24 Thread Axel Lin
Use devm_request_threaded_irq to ensure the irq is freed when unload the module. Signed-off-by: Axel Lin <axel@ingics.com> --- drivers/regulator/pv88060-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/pv88060-regulator.c b/drivers/reg

[PATCH RESEND] regulator: tps6105x: Convert to use regmap helper functions

2015-11-18 Thread Axel Lin
Since commit 7e5071199355 ("mfd: tps6105x: Use i2c regmap to access registers"), we can use regmap helper functions instead of open coded. Signed-off-by: Axel Lin <axel@ingics.com> Tested-by: Denis Grigoryev <grigor...@fastwel.ru> --- drivers/regulator/tps

[PATCH] mfd: da9062-core: Rename get_device_type to da9062_get_device_type

2015-10-09 Thread Axel Lin
Rename get_device_type() to da9062_get_device_type(). This function is only used in this file so make it static. Signed-off-by: Axel Lin <axel@ingics.com> --- drivers/mfd/da9062-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mfd/da9062-core.c b/d

[PATCH RFT] regulator: tps6105x: Convert to use regmap helper functions

2015-10-06 Thread Axel Lin
Since commit 7e5071199355 ("mfd: tps6105x: Use i2c regmap to access registers"), we can use regmap helper functions instead of open coded. Signed-off-by: Axel Lin <axel@ingics.com> --- Hi Grigoryev, I don't have this h/w, can you help test this patch? Thanks. This patch d

[PATCH] mfd: Make TPS6105X select REGMAP_I2C

2015-10-06 Thread Axel Lin
This is required since commit 7e5071199355 ("mfd: tps6105x: Use i2c regmap to access registers"). Signed-off-by: Axel Lin <axel@ingics.com> --- drivers/mfd/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig index 87e84e7

[tip:irq/core] irqchip/i8259: Convert to use irq_set_chained_handler_and_data

2015-10-01 Thread tip-bot for Axel Lin
Commit-ID: a51e80d002b63bbdaff3229f3ebf4fbb53c75c33 Gitweb: http://git.kernel.org/tip/a51e80d002b63bbdaff3229f3ebf4fbb53c75c33 Author: Axel Lin <axel@ingics.com> AuthorDate: Thu, 1 Oct 2015 22:26:44 +0800 Committer: Thomas Gleixner <t...@linutronix.de> CommitDate: Thu, 1

[PATCH] irqchip/i8259: Convert to use irq_set_chained_handler_and_data

2015-10-01 Thread Axel Lin
Chained irq handlers usually set up handler data as well. We now have a function to set both under irq_desc->lock. Replace the two calls with one. Signed-off-by: Axel Lin <axel@ingics.com> --- drivers/irqchip/irq-i8259.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) d

[PATCH RESEND] phy: sun4i-usb: Use devm_gpiod_get_optional for optional GPIOs

2015-09-24 Thread Axel Lin
Both data->id_det_gpio and data->vbus_det_gpio are optional, so use devm_gpiod_get_optional for them. Signed-off-by: Axel Lin <axel@ingics.com> Reviewed-by: Hans de Goede <hdego...@redhat.com> --- This patch was sent on https://lkml.org/lkml/2015/8/21/177 drivers/phy/ph

[PATCH] bus: omap-ocp2scp: Fix module alias

2015-09-24 Thread Axel Lin
Remove extra space between platform prefix and driver name in MODULE_ALIAS. Signed-off-by: Axel Lin <axel@ingics.com> --- This patch was sent on https://lkml.org/lkml/2015/5/19/1150 Re-sent on https://lkml.org/lkml/2015/8/14/141 No response so far, so CC Andrew. drivers/bus/omap-ocp

[PATCH] nvmem: core: Fix memory leak in nvmem_cell_write

2015-09-19 Thread Axel Lin
A tmp buffer is allocated if cell->bit_offset || cell->nbits. So the tmp buffer needs to be freed at the same condition to avoid leak. Signed-off-by: Axel Lin <axel@ingics.com> --- drivers/nvmem/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nv

[PATCH] nvmem: core: Handle shift bits in-place if cell->nbits is non-zero

2015-09-18 Thread Axel Lin
It's pointless to test (cell->bit_offset || cell->bit_offset). nvmem_shift_read_buffer_in_place() should be called when (cell->bit_offset || cell->nbits). Signed-off-by: Axel Lin <axel@ingics.com> --- drivers/nvmem/core.c | 2 +- 1 file changed, 1 insertion(+), 1 delet

[PATCH] reset: ath79: Fix missing spin_lock_init

2015-09-01 Thread Axel Lin
Signed-off-by: Axel Lin <axel@ingics.com> --- drivers/reset/reset-ath79.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/reset/reset-ath79.c b/drivers/reset/reset-ath79.c index d2d2904..9aaf646 100644 --- a/drivers/reset/reset-ath79.c +++ b/drivers/reset/reset-ath79.c @@

[PATCH v2] reset: Add (devm_)reset_control_get stub functions

2015-08-31 Thread Axel Lin
So the drivers can be compiled with CONFIG_RESET_CONTROLLER disabled. Signed-off-by: Axel Lin <axel@ingics.com> --- v2: Add __must_check and WARN_ON(1); And make it return ERR_PTR(-EINVAL). include/linux/reset.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/i

[PATCH] reset: Add (devm_)reset_control_get stub functions

2015-08-31 Thread Axel Lin
So the drivers can be compiled with CONFIG_RESET_CONTROLLER disabled. Signed-off-by: Axel Lin <axel@ingics.com> --- include/linux/reset.h | 12 1 file changed, 12 insertions(+) diff --git a/include/linux/reset.h b/include/linux/reset.h index da5602b..cd42c1b

[PATCH RFT] phy: sun4i-usb: Use devm_gpiod_get_optional for optional GPIOs

2015-08-21 Thread Axel Lin
Both data-id_det_gpio and data-vbus_det_gpio are optional, so use devm_gpiod_get_optional for them. Signed-off-by: Axel Lin axel@ingics.com --- drivers/phy/phy-sun4i-usb.c | 22 +- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/drivers/phy/phy-sun4i-usb.c

Re: [PATCH v3] pinctrl: mediatek: Fix multiple registration issue.

2015-08-20 Thread Axel Lin
hongzhou.y...@mediatek.com --- Use dynamic allocation to fix multiple registration issue. The code looks good to me but the commit log needs fix. You don't use devm_kzalloc now. Just embedded struct pinctrl_desc pctl_desc to struct mtk_pinctrl. Reviewed-by: Axel Lin axel@ingics.com

Re: [PATCH v2] pinctrl: mediatek: Fix multiple registration issue.

2015-08-19 Thread Axel Lin
2015-08-20 11:38 GMT+08:00 Hongzhou Yang hongzhou.y...@mediatek.com: Since our common driver need support main chip and PMU at the same time, that means it will register two pinctrl device, and the pinctrl_desc structure should be used two times. But pinctrl_desc use global static

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

  1   2   3   4   5   6   7   8   9   10   >