[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 --- drivers/gpio/gpio-xgene-sb.c | 15 +-- 1 file changed, 1

[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

[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 --- 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/irqdomain.c +++ b/kernel/irq

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

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 : > 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 Reviewed-by: Axel Lin

[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 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 --- 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 100644 --- a/drivers/regulator

[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 2/3] regulator: max77620: Eliminate duplicate code

2016-02-24 Thread Axel Lin
Signed-off-by: Axel Lin --- 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 100644 --- a/drivers/regulator

[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

[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 --- drivers/regulator/max77620-regulator.c | 14 -- 1 file changed, 14 deletions(-) diff --git a/drivers/regulator/max77620-regulator.c b/drivers/regulator/max77620-regulator.c index fee8ad9

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>

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 : > value variable can contain error values and is compared with zero. > Its type must be signed. Reviewed-by: Axel Lin

[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] regulator: mt6323: Fix trivial typo in module description

2016-02-18 Thread Axel Lin
Signed-off-by: Axel Lin --- 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/mt6323-regulator.c +++ b/drivers

[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 --- drivers/irqchip/irq-ts4800.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-ts4800.c b/drivers

[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 --- drivers/regulator/ad5398.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/regulator/ad5398.c b/drivers/regulator/ad5398.c index ea50a88

[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 --- 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 index c00f0df..6751614

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

2016-02-10 Thread Axel Lin
Signed-off-by: Axel Lin --- 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/regulator/qcom_saw-regulator.c

[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 --- 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/nvmem/imx-ocotp.c +++ b

[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 --- drivers/mfd/Kconfig | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig index 9ca66de..6c4ebd9 100644

[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 --- drivers/regulator/pv88090-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/pv88090-regulator.c b/drivers/regulator/pv88090-regulator.c

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

2015-11-28 Thread Axel Lin
Signed-off-by: Axel Lin --- 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/lm363x-regulator.c +++ b/drivers

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

2015-11-28 Thread Axel Lin
Signed-off-by: Axel Lin --- 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/drivers/regulator/lm363x

[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 --- drivers/regulator/pv88060-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/pv88060-regulator.c b/drivers/regulator/pv88060-regulator.c

[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 Tested-by: Denis Grigoryev --- drivers/regulator/tps6105x-regulator.c | 95 +- 1 file c

[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 --- drivers/mfd/da9062-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mfd/da9062-core.c b/drivers/mfd/da9062-core.c

[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] 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 --- drivers/mfd/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig index 87e84e7..0063c92 100644 --- a/drivers/m

[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 --- Hi Grigoryev, I don't have this h/w, can you help test this patch? Thanks. This patch depends on commit 7e50711

[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 AuthorDate: Thu, 1 Oct 2015 22:26:44 +0800 Committer: Thomas Gleixner CommitDate: Thu, 1 Oct 2015 16:32:54 +0200 irqchip/i8259: Convert

[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 --- drivers/irqchip/irq-i8259.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/irqchip/

[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] 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 --- 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-ocp2scp.c | 2 +- 1 file changed

[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 Reviewed-by: Hans de Goede --- This patch was sent on https://lkml.org/lkml/2015/8/21/177 drivers/phy/phy-sun4i-usb.c | 22 +- 1 file chan

[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 --- drivers/nvmem/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nvmem/core.c b/drivers/nvmem/

[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 --- 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 --- 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 @@ -89,6 +89,7 @@ static int

[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 --- 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/include/linux/reset.h b/include

[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 --- 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 100644 --- a/include/linux/reset.h +++ b

[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 --- drivers/phy/phy-sun4i-usb.c | 22 +- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/drivers/phy/phy-sun4i-usb.c b/drivers/p

[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
ned-off-by: Hongzhou Yang > --- > 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 -- To unsubscribe fro

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 : > 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 definition, then > the latest

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

[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

[PATCH RESEND] bus: omap-ocp2scp: Fix modalias

2015-08-14 Thread Axel Lin
Remove extra space between platform prefix and driver name in MODULE_ALIAS. Signed-off-by: Axel Lin --- This patch was sent on https://lkml.org/lkml/2015/5/19/1150 No response so far, so here is a resend. drivers/bus/omap-ocp2scp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH RESEND] bus: omap-ocp2scp: Fix modalias

2015-08-14 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 No response so far, so here is a resend. drivers/bus/omap-ocp2scp.c | 2 +- 1 file changed, 1 insertion(+), 1

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

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

[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

[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 axel@ingics.com --- Sorry, just found a typo on subject line, so here is a resend. drivers/regulator/mt6311-regulator.c | 14 +++--- 1

[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 axel@ingics.com --- drivers/regulator/mt6311-regulator.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git

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

Re: [PATCH RESEND] phy: tusb1210: Use devm_gpiod_get_optional for optional GPIOs

2015-07-15 Thread Axel Lin
2015-07-15 16:29 GMT+08:00 Uwe Kleine-König : > Hello, > > On Wed, Jul 15, 2015 at 01:45:44PM +0530, Kishon Vijay Abraham I wrote: >> Hi, >> >> On Wednesday 15 July 2015 12:34 PM, Axel Lin wrote: >> > 2015-06-20 15:39 GMT+08:00 Axel Lin : >> >> A

[PATCH] phy: Constify struct phy_ops variables

2015-07-15 Thread Axel Lin
The phy_ops variables are never modified after initialized in these drivers, so make them const. Signed-off-by: Axel Lin --- Note, the change for drivers/phy/phy-tusb1210.c depends on my previous patch "[PATCH] phy: ulpi_phy: Add const qualifier to ops". drivers/phy/phy-armada375-usb

Re: [PATCH] phy: ulpi_phy: Add const qualifier to ops

2015-07-15 Thread Axel Lin
2015-06-05 8:27 GMT+08:00 Axel Lin : > The ops is never changed in ulpi_phy_create(), so make it const. Hi Kishon, Would you pick up this patch? Without this patch, passing a const struct phy_ops* to ulip_phy_create will have compiler warning. It should be fine to pass a const struct phy_

Re: [PATCH RESEND] phy: tusb1210: Use devm_gpiod_get_optional for optional GPIOs

2015-07-15 Thread Axel Lin
2015-06-20 15:39 GMT+08:00 Axel Lin : > Also simplify the code a bit by specify direction and initial value for > output in devm_gpiod_get_optional function. > > Signed-off-by: Axel Lin > Acked-by: Heikki Krogerus > Acked-by: Kishon Vijay Abraham I > --- > Hi > T

Re: [PATCH RESEND] phy: tusb1210: Use devm_gpiod_get_optional for optional GPIOs

2015-07-15 Thread Axel Lin
2015-07-15 16:29 GMT+08:00 Uwe Kleine-König u.kleine-koe...@pengutronix.de: Hello, On Wed, Jul 15, 2015 at 01:45:44PM +0530, Kishon Vijay Abraham I wrote: Hi, On Wednesday 15 July 2015 12:34 PM, Axel Lin wrote: 2015-06-20 15:39 GMT+08:00 Axel Lin axel@ingics.com: Also simplify

Re: [PATCH] phy: ulpi_phy: Add const qualifier to ops

2015-07-15 Thread Axel Lin
2015-06-05 8:27 GMT+08:00 Axel Lin axel@ingics.com: The ops is never changed in ulpi_phy_create(), so make it const. Hi Kishon, Would you pick up this patch? Without this patch, passing a const struct phy_ops* to ulip_phy_create will have compiler warning. It should be fine to pass a const

[PATCH] phy: Constify struct phy_ops variables

2015-07-15 Thread Axel Lin
The phy_ops variables are never modified after initialized in these drivers, so make them const. Signed-off-by: Axel Lin axel@ingics.com --- Note, the change for drivers/phy/phy-tusb1210.c depends on my previous patch [PATCH] phy: ulpi_phy: Add const qualifier to ops. drivers/phy/phy

Re: [PATCH RESEND] phy: tusb1210: Use devm_gpiod_get_optional for optional GPIOs

2015-07-15 Thread Axel Lin
2015-06-20 15:39 GMT+08:00 Axel Lin axel@ingics.com: Also simplify the code a bit by specify direction and initial value for output in devm_gpiod_get_optional function. Signed-off-by: Axel Lin axel@ingics.com Acked-by: Heikki Krogerus heikki.kroge...@linux.intel.com Acked-by: Kishon

[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: qcom_spmi-regulator: Use DIV_ROUND_UP instead of open-coded

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

[PATCH] regulator: ltc3589: Constify ltc3589_reg_defaults

2015-07-07 Thread Axel Lin
ltc3589_reg_defaults[] is not modified after initialized, so make it const. 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/regulator/ltc3589.c index 0ce8e4e..c31dfa8 100644

[PATCH] mfd: wm8994-regmap: Constify reg_default tables

2015-07-07 Thread Axel Lin
These reg_default tables are not modified after initialized, so make them const. Signed-off-by: Axel Lin --- drivers/mfd/wm8994-regmap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/mfd/wm8994-regmap.c b/drivers/mfd/wm8994-regmap.c index 300e9b6..c56b160

[PATCH] mfd: wm8994-regmap: Constify reg_default tables

2015-07-07 Thread Axel Lin
These reg_default tables are not modified after initialized, so make them const. Signed-off-by: Axel Lin axel@ingics.com --- drivers/mfd/wm8994-regmap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/mfd/wm8994-regmap.c b/drivers/mfd/wm8994-regmap.c index

[PATCH] regulator: ltc3589: Constify ltc3589_reg_defaults

2015-07-07 Thread Axel Lin
ltc3589_reg_defaults[] is not modified after initialized, so make it const. Signed-off-by: Axel Lin axel@ingics.com --- drivers/regulator/ltc3589.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/ltc3589.c b/drivers/regulator/ltc3589.c index 0ce8e4e

[PATCH] mfd: tps6586x: Fix up define for TPS6586X_MAX_REGISTER

2015-07-06 Thread Axel Lin
The latest valid register is TPS6586X_VERSIONCRC. Signed-off-by: Axel Lin --- drivers/mfd/tps6586x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mfd/tps6586x.c b/drivers/mfd/tps6586x.c index e0a2583..ae08b29 100644 --- a/drivers/mfd/tps6586x.c +++ b/drivers

[PATCH] mfd: tps6586x: Fix up define for TPS6586X_MAX_REGISTER

2015-07-06 Thread Axel Lin
The latest valid register is TPS6586X_VERSIONCRC. Signed-off-by: Axel Lin axel@ingics.com --- drivers/mfd/tps6586x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mfd/tps6586x.c b/drivers/mfd/tps6586x.c index e0a2583..ae08b29 100644 --- a/drivers/mfd

[PATCH] nvdimm: Fix return value of nvdimm_bus_init() if class_create() fails

2015-06-28 Thread Axel Lin
Return proper error if class_create() fails. Signed-off-by: Axel Lin --- drivers/nvdimm/bus.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/nvdimm/bus.c b/drivers/nvdimm/bus.c index ca80270..f6f6a91 100644 --- a/drivers/nvdimm/bus.c +++ b/drivers/nvdimm/bus.c

[PATCH] nvdimm: Fix return value of nvdimm_bus_init() if class_create() fails

2015-06-28 Thread Axel Lin
Return proper error if class_create() fails. Signed-off-by: Axel Lin axel@ingics.com --- drivers/nvdimm/bus.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/nvdimm/bus.c b/drivers/nvdimm/bus.c index ca80270..f6f6a91 100644 --- a/drivers/nvdimm/bus.c +++ b

spmi: Question about qpnpint_irq_set_type implement

2015-06-26 Thread Axel Lin
Hi, Current implementation in qpnpint_irq_set_type() will set (1 << irq) bit for type.polarity_high/type.polarity_low but never clear this bit. I'm wondering if it is intentional because the value write to QPNPINT_REG_SET_TYPE register depends on it's original value. Maybe it needs below changes,

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