RE: [PATCH v4] mfd: da9063: Support SMBus and I2C mode

2021-03-09 Thread Adam Ward
Hi Lee, Tidy, but I've noticed the logic got inverted along the way: > On Tue 09 Mar 2021, Lee Jones wrote: > On Tue, 09 Mar 2021, Mark Jonas wrote: > This is my suggestion: > > /* If SMBus Mode is not available, enter Two-Wire Mode */ > if (!i2c_check_functionality(i2c->adapter, I2C

RE: [PATCH V4 01/10] regulator: Update DA9121 dt-bindings

2020-12-08 Thread Adam Ward
On Mon, Dec 07, 2020 at 17:58PM, Rob Herring wrote: > > +properties: > > + regulator-mode: > > +maxItems: 1 > > +description: Defined in > > include/dt-bindings/regulator/dlg,da9121- > regulator.h > > 'regulator-mode' is defined as a property of a > 'regul

RE: [PATCH] regulator: da9121: Potential Oops in da9121_assign_chip_model()

2020-12-08 Thread Adam Ward
Acked-by: Adam Ward > -Original Message- > From: Dan Carpenter > Sent: 07 December 2020 17:56 > To: Support Opensource ; Adam Ward > > Cc: Liam Girdwood ; Mark Brown > ; linux-kernel@vger.kernel.org; kernel- > janit...@vger.kernel.org > Subject: [PATCH] r

[PATCH 1/2] regulator: da9121: Remove uninitialised string variable

2020-12-07 Thread Adam Ward
Erroneously left in when switched to using of_parse_cb() Signed-off-by: Adam Ward --- drivers/regulator/da9121-regulator.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/regulator/da9121-regulator.c b/drivers/regulator/da9121-regulator.c index db1c2cc..ed68259

[PATCH 2/2] regulator: da9121: Fix index used for DT property

2020-12-07 Thread Adam Ward
Signed-off-by: Adam Ward --- drivers/regulator/da9121-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/da9121-regulator.c b/drivers/regulator/da9121-regulator.c index ed68259..9d5b02f 100644 --- a/drivers/regulator/da9121-regulator.c +++ b

[PATCH 0/2] regulator: da9121: bug fixes

2020-12-07 Thread Adam Ward
This patch fixes a couple of bugs in the DA9121 driver. One in an uninialised string I forgot to remove when changing to of_parse_cb() The other is an index for an optional DT property which overflows Adam Ward (2): regulator: da9121: Remove uninitialised string variable regulator: da9121

RE: [PATCH -next] regulator: da9121: Mark some symbols with static keyword

2020-12-03 Thread Adam Ward
Acked-by: Adam Ward > -Original Message- > From: Zou Wei > Sent: 03 December 2020 11:27 > To: Support Opensource ; > lgirdw...@gmail.com; broo...@kernel.org > Cc: linux-kernel@vger.kernel.org; Zou Wei > Subject: [PATCH -next] regulator: da9121: Mark some symbols

[PATCH V2 0/1] regulator: da9121: add IRQ free to release function

2020-12-02 Thread Adam Ward
This patch fixes the DA9121 driver to disable the IRQ before cancelling the work, to be sure the IRQ doesn't restart it before all IRQs are masked V2: - Fix to release IRQ if regmap error fails probe Adam Ward (1): regulator: da9121: Request IRQ directly and free in release function

[PATCH V2 1/1] regulator: da9121: Request IRQ directly and free in release function to avoid masking race

2020-12-02 Thread Adam Ward
Signed-off-by: Adam Ward --- drivers/regulator/da9121-regulator.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/regulator/da9121-regulator.c b/drivers/regulator/da9121-regulator.c index d9a8a4b..3ead6a1 100644 --- a/drivers/regulator/da9121-regulator.c

[PATCH 1/1] regulator: da9121: Request IRQ directly and free in release function to avoid masking race

2020-12-01 Thread Adam Ward
Signed-off-by: Adam Ward --- drivers/regulator/da9121-regulator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/regulator/da9121-regulator.c b/drivers/regulator/da9121-regulator.c index d9a8a4b..3e59f68 100644 --- a/drivers/regulator/da9121-regulator.c +++ b

[PATCH 0/1] regulator: da9121: add IRQ free to release function

2020-12-01 Thread Adam Ward
This patch fixes the DA9121 driver to disable the IRQ before cancelling the work, to be sure the IRQ doesn't restart it before all IRQs are masked Adam Ward (1): regulator: da9121: Request IRQ directly and free in release function to avoid masking race drivers/regulator/da9121-regula

[PATCH V4 10/10] regulator: da9121: add interrupt support

2020-12-01 Thread Adam Ward
Adds interrupt handler for variants, and notifications for events; over temperature/voltage/current. Because the IRQs are triggered by persisting status, they must be masked and the status polled until clear, before the IRQ can be enabled again. Signed-off-by: Adam Ward --- drivers/regulator

[PATCH V4 07/10] regulator: da9121: Update registration to support multiple buck variants

2020-12-01 Thread Adam Ward
Add function which iterates the regulator descriptors for the confirmed variant ID and registers each buck. Signed-off-by: Adam Ward --- drivers/regulator/da9121-regulator.c | 44 +--- 1 file changed, 31 insertions(+), 13 deletions(-) diff --git a/drivers

[PATCH V4 04/10] regulator: da9121: Add device variant regmaps

2020-12-01 Thread Adam Ward
Add ability to probe device and validate configuration, then apply a regmap configuration for a single or dual buck device accordingly. Signed-off-by: Adam Ward --- drivers/regulator/Kconfig| 14 +- drivers/regulator/da9121-regulator.c | 244

[PATCH V4 08/10] regulator: da9121: add current support

2020-12-01 Thread Adam Ward
This commit adds support for getting/setting current for all supported variants. Limits are adjusted per variant to match HW implementation. Signed-off-by: Adam Ward --- drivers/regulator/da9121-regulator.c | 113 +++ 1 file changed, 113 insertions(+) diff --git

[PATCH V4 09/10] regulator: da9121: add mode support

2020-12-01 Thread Adam Ward
Adds get/set for mode, and mapping from REGULATOR_MODE_* to select PFM/PWM/Auto operation. Signed-off-by: Adam Ward --- drivers/regulator/da9121-regulator.c | 74 1 file changed, 74 insertions(+) diff --git a/drivers/regulator/da9121-regulator.c b/drivers

[PATCH V4 03/10] regulator: da9121: Add device variants

2020-12-01 Thread Adam Ward
Add basic support for configuration to reference variants of this device, and track the selected variant within the driver. Signed-off-by: Adam Ward --- drivers/regulator/da9121-regulator.c | 46 +--- 1 file changed, 43 insertions(+), 3 deletions(-) diff --git a

[PATCH V4 06/10] regulator: da9121: Add support for device variants via devicetree

2020-12-01 Thread Adam Ward
Add devicetree configuration and device variant parameters. Use the latter to enable the check and use of parameters specific to dual buck variants. Signed-off-by: Adam Ward --- drivers/regulator/da9121-regulator.c | 119 +++ include/linux/regulator/da9121.h

[PATCH V4 05/10] regulator: da9121: Add device variant descriptors

2020-12-01 Thread Adam Ward
Descriptors for bucks in all variants, ready for of_regulator_match Signed-off-by: Adam Ward --- drivers/regulator/da9121-regulator.c | 110 +++ 1 file changed, 110 insertions(+) diff --git a/drivers/regulator/da9121-regulator.c b/drivers/regulator/da9121

[PATCH V4 00/10] regulator: da9121: extend support to variants, add features

2020-12-01 Thread Adam Ward
exit Adam Ward (10): regulator: Update DA9121 dt-bindings regulator: da9121: Add header file regulator: da9121: Add device variants regulator: da9121: Add device variant regmaps regulator: da9121: Add device variant descriptors regulator: da9121: Add support for device variants via

[PATCH V4 01/10] regulator: Update DA9121 dt-bindings

2020-12-01 Thread Adam Ward
or devices, including the DA9211 family. This breaks compatibility with the original submission by Vincent Whitchurch - but as this is still in for-next, the alignment could be made before upstreaming occurs. Signed-off-by: Adam Ward --- .../devicetree/bindings/regulator/dlg,da9121.y

[PATCH V4 02/10] regulator: da9121: Add header file

2020-12-01 Thread Adam Ward
Add header file for Dialog Semiconductor DA9121 regulator and related devices, mostly autogenerated from the chip design databases, and update driver to replace local defines with those from header. Signed-off-by: Adam Ward --- drivers/regulator/da9121-regulator.c | 15 +- drivers/regulator

[PATCH V3 04/10] regulator: da9121: Add device variant regmaps

2020-11-30 Thread Adam Ward
Add ability to probe device and validate configuration, then apply a regmap configuration for a single or dual buck device accordingly. Signed-off-by: Adam Ward --- drivers/regulator/Kconfig| 14 +- drivers/regulator/da9121-regulator.c | 244

[PATCH V3 09/10] regulator: da9121: add mode support

2020-11-30 Thread Adam Ward
Adds get/set for mode, and mapping from REGULATOR_MODE_* to select PFM/PWM/Auto operation. Signed-off-by: Adam Ward --- drivers/regulator/da9121-regulator.c | 74 1 file changed, 74 insertions(+) diff --git a/drivers/regulator/da9121-regulator.c b/drivers

[PATCH V3 05/10] regulator: da9121: Add device variant descriptors

2020-11-30 Thread Adam Ward
Descriptors for bucks in all variants, ready for of_regulator_match Signed-off-by: Adam Ward --- drivers/regulator/da9121-regulator.c | 110 +++ 1 file changed, 110 insertions(+) diff --git a/drivers/regulator/da9121-regulator.c b/drivers/regulator/da9121

[PATCH V3 08/10] regulator: da9121: add current support

2020-11-30 Thread Adam Ward
This commit adds support for getting/setting current for all supported variants. Limits are adjusted per variant to match HW implementation. Signed-off-by: Adam Ward --- drivers/regulator/da9121-regulator.c | 113 +++ 1 file changed, 113 insertions(+) diff --git

[PATCH V3 10/10] regulator: da9121: add interrupt support

2020-11-30 Thread Adam Ward
Adds interrupt handler for variants, and notifications for events; over temperature/voltage/current. Because the IRQs are triggered by persisting status, they must be masked and the status polled until clear, before the IRQ can be enabled again. Signed-off-by: Adam Ward --- drivers/regulator

[PATCH V3 07/10] regulator: da9121: Update registration to support multiple buck variants

2020-11-30 Thread Adam Ward
Add function which iterates the regulator descriptors for the confirmed variant ID and registers each buck. Signed-off-by: Adam Ward --- drivers/regulator/da9121-regulator.c | 44 +--- 1 file changed, 31 insertions(+), 13 deletions(-) diff --git a/drivers

[PATCH V3 06/10] regulator: da9121: Add support for device variants via devicetree

2020-11-30 Thread Adam Ward
Add devicetree configuration and device variant parameters. Use the latter to enable the check and use of parameters specific to dual buck variants. Signed-off-by: Adam Ward --- drivers/regulator/da9121-regulator.c | 119 +++ include/linux/regulator/da9121.h

[PATCH V3 03/10] regulator: da9121: Add device variants

2020-11-30 Thread Adam Ward
Add basic support for configuration to reference variants of this device, and track the selected variant within the driver. Signed-off-by: Adam Ward --- drivers/regulator/da9121-regulator.c | 46 +--- 1 file changed, 43 insertions(+), 3 deletions(-) diff --git a

[PATCH V3 02/10] regulator: da9121: Add header file

2020-11-30 Thread Adam Ward
Add header file for Dialog Semiconductor DA9121 regulator and related devices, mostly autogenerated from the chip design databases, and update driver to replace local defines with those from header. Signed-off-by: Adam Ward --- drivers/regulator/da9121-regulator.c | 15 +- drivers/regulator

[PATCH V3 01/10] regulator: Update DA9121 dt-bindings

2020-11-30 Thread Adam Ward
or devices, including the DA9211 family. This breaks compatibility with the original submission by Vincent Whitchurch - but as this is still in for-next, the alignment could be made before upstreaming occurs. Signed-off-by: Adam Ward --- .../devicetree/bindings/regulator/dlg,da9121.y

[PATCH V3 00/10] regulator: da9121: extend support to variants, add features

2020-11-30 Thread Adam Ward
compatible check - Tidied banner comment - Switched to using of_parse_cb() - Simplified buck checks accordingly - Simplified current/mode register/mask use - Simplified interrupt handling - Synchronise workqueue at driver exit Adam Ward (10): regulator: Update DA9121 dt-bindings regulator: da9121

[PATCH V2 7/9] regulator: da9121: add current support

2020-11-30 Thread Adam Ward
This commit adds support for getting/setting current for all supported variants. Limits are adjusted per variant to match HW implementation. Signed-off-by: Adam Ward --- drivers/regulator/da9121-regulator.c | 113 +++ 1 file changed, 113 insertions(+) diff --git

[PATCH V2 8/9] regulator: da9121: add mode support

2020-11-30 Thread Adam Ward
Adds get/set for mode, and mapping from REGULATOR_MODE_* to select PFM/PWM/Auto operation. Signed-off-by: Adam Ward --- drivers/regulator/da9121-regulator.c | 74 1 file changed, 74 insertions(+) diff --git a/drivers/regulator/da9121-regulator.c b/drivers

[PATCH V2 3/9] regulator: da9121: Add device variant regmaps

2020-11-30 Thread Adam Ward
Add ability to probe device and validate configuration, then apply a regmap configuration for a single or dual buck device accordingly. Signed-off-by: Adam Ward --- drivers/regulator/Kconfig| 14 +- drivers/regulator/da9121-regulator.c | 244

[PATCH V2 5/9] regulator: da9121: Add support for device variants via devicetree

2020-11-30 Thread Adam Ward
Add devicetree configuration and device variant parameters. Use the latter to enable the check and use of parameters specific to dual buck variants. Signed-off-by: Adam Ward --- drivers/regulator/da9121-regulator.c | 119 +++ include/linux/regulator/da9121.h

[PATCH V2 4/9] regulator: da9121: Add device variant descriptors

2020-11-30 Thread Adam Ward
Descriptors for bucks in all variants, ready for of_regulator_match Signed-off-by: Adam Ward --- drivers/regulator/da9121-regulator.c | 110 +++ 1 file changed, 110 insertions(+) diff --git a/drivers/regulator/da9121-regulator.c b/drivers/regulator/da9121

[PATCH V2 9/9] regulator: da9121: add interrupt support

2020-11-30 Thread Adam Ward
Adds interrupt handler for variants, and notifications for events; over temperature/voltage/current. Because the IRQs are triggered by persisting status, they must be masked and the status polled until clear, before the IRQ can be enabled again. Signed-off-by: Adam Ward --- drivers/regulator

[PATCH V2 1/9] regulator: da9121: Add header file

2020-11-30 Thread Adam Ward
Add header file for Dialog Semiconductor DA9121 regulator and related devices, mostly autogenerated from the chip design databases, and update driver to replace local defines with those from header. Signed-off-by: Adam Ward --- drivers/regulator/da9121-regulator.c | 15 +- drivers/regulator

[PATCH V2 0/9] regulator: da9121: extend support to variants, add features

2020-11-30 Thread Adam Ward
to using of_parse_cb() - Simplified buck checks accordingly - Simplified current/mode register/mask use - Simplified interrupt handling - Synchronise workqueue at driver exit Adam Ward (9): regulator: da9121: Add header file regulator: da9121: Add device variants regulator: da9121: Add

[PATCH V2 2/9] regulator: da9121: Add device variants

2020-11-30 Thread Adam Ward
Add basic support for configuration to reference variants of this device, and track the selected variant within the driver. Signed-off-by: Adam Ward --- drivers/regulator/da9121-regulator.c | 46 +--- 1 file changed, 43 insertions(+), 3 deletions(-) diff --git a

[PATCH V2 6/9] regulator: da9121: Update registration to support multiple buck variants

2020-11-30 Thread Adam Ward
Add function which iterates the regulator descriptors for the confirmed variant ID and registers each buck. Signed-off-by: Adam Ward --- drivers/regulator/da9121-regulator.c | 44 +--- 1 file changed, 31 insertions(+), 13 deletions(-) diff --git a/drivers

RE: [PATCH 1/9] regulator: Update DA9121 dt-bindings

2020-11-27 Thread Adam Ward
> On Fri, Nov 20, 2020 at 02:47:42PM +0100, Vincent Whitchurch wrote: > > On Fri, Nov 20, 2020 at 01:14:50PM +0100, Adam Ward wrote: > Actually, perhaps I'm missing something, but I don't quite see why this > move to a sub-node is needed. There is some flexibility in the

[PATCH 1/9] regulator: Update DA9121 dt-bindings

2020-11-20 Thread Adam Ward
Update bindings for the Dialog Semiconductor DA9121 voltage regulator to add device variants. Signed-off-by: Adam Ward --- .../devicetree/bindings/regulator/dlg,da9121.yaml | 177 +++-- MAINTAINERS| 2 + .../dt-bindings/regulator/dlg

[PATCH 9/9] regulator: da9121: add interrupt support

2020-11-20 Thread Adam Ward
Adds interrupt handler for variants, and notifications for events; over temperature/voltage/current. Also handling of persistent events and respective timing configuration. Signed-off-by: Adam Ward --- drivers/regulator/da9121-regulator.c | 548 +++ 1 file

[PATCH 4/9] regulator: da9121: Add device variant details and respective regmaps

2020-11-20 Thread Adam Ward
Add ability to probe device and validate configuration, then apply a regmap configuration for a single or dual buck device accordingly. Signed-off-by: Adam Ward --- drivers/regulator/Kconfig| 14 +- drivers/regulator/da9121-regulator.c | 382

[PATCH 6/9] regulator: da9121: Update registration to support multiple buck variants

2020-11-20 Thread Adam Ward
Checks DT matches tally with variant maximum and register accordingly. Signed-off-by: Adam Ward --- drivers/regulator/da9121-regulator.c | 81 +++- 1 file changed, 70 insertions(+), 11 deletions(-) diff --git a/drivers/regulator/da9121-regulator.c b/drivers

[PATCH 2/9] regulator: da9121: Add header file

2020-11-20 Thread Adam Ward
Add header file for Dialog Semiconductor DA9121 regulator and related devices, mostly autogenerated from the chip design databases, and update driver to replacee local defines with those from header. Signed-off-by: Adam Ward --- drivers/regulator/da9121-regulator.c | 15 +- drivers/regulator

[PATCH 7/9] regulator: da9121: add current support

2020-11-20 Thread Adam Ward
This commit adds support for getting/setting current for all supported variants. Limits are adjusted per variant to match HW implementation. Signed-off-by: Adam Ward --- drivers/regulator/da9121-regulator.c | 140 +++ 1 file changed, 140 insertions(+) diff --git

[PATCH 8/9] regulator: da9121: add mode support

2020-11-20 Thread Adam Ward
Adds get/set for mode, and mapping from REGULATOR_MODE_* to select PFM/PWM/Auto operation. Signed-off-by: Adam Ward --- drivers/regulator/da9121-regulator.c | 74 1 file changed, 74 insertions(+) diff --git a/drivers/regulator/da9121-regulator.c b/drivers

[PATCH 0/9] regulator: da9121: extend support to variants, add features

2020-11-20 Thread Adam Ward
fault/files/da9132-a_datasheet_1v0.pdf Adam Ward (9): regulator: Update DA9121 dt-bindings regulator: da9121: Add header file regulator: da9121: Add device variants regulator: da9121: Add device variant details and respective regmaps regulator: da9121: Add support for device variants via devi

[PATCH 3/9] regulator: da9121: Add device variants

2020-11-20 Thread Adam Ward
Add basic support for configuration to reference variants of this device, and track the selected variant within the driver. Signed-off-by: Adam Ward --- drivers/regulator/da9121-regulator.c | 46 +--- 1 file changed, 43 insertions(+), 3 deletions(-) diff --git a

[PATCH 5/9] regulator: da9121: Add support for device variants via devicetree

2020-11-20 Thread Adam Ward
Add devicetree configuration and device variant parameters. Use the latter to enable the check and use of parameters specific to dual buck variants. Signed-off-by: Adam Ward --- drivers/regulator/da9121-regulator.c | 157 ++- include/linux/regulator/da9121.h

[PATCH v1 1/2] mfd: da9052: Fix register access via SPI

2015-03-04 Thread Adam Ward
The range of registers used by this driver exceeds that available via SPI with no paging (127), so we have to override the values from the default config which is set-up for I2C access. Also change SPI settings to match device's recommended OTP values. Signed-off-by: Adam Ward Tested-by:

[PATCH v1 2/2] mfd: da9052: Register ability of device to cause a wake-up interrupt

2015-03-04 Thread Adam Ward
Signed-off-by: Adam Ward Tested-by: Adam Ward --- drivers/mfd/da9052-irq.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/mfd/da9052-irq.c b/drivers/mfd/da9052-irq.c index 57ae784..e65ca19 100644 --- a/drivers/mfd/da9052-irq.c +++ b/drivers/mfd/da9052-irq.c @@ -262,6 +262,8

[PATCH v1 2/3] rtc: da9052: Add constraints to set valid year

2015-03-04 Thread Adam Ward
Signed-off-by: Adam Ward Tested-by: Adam Ward --- drivers/rtc/rtc-da9052.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/rtc/rtc-da9052.c b/drivers/rtc/rtc-da9052.c index ead02fa..acc3e5a 100644 --- a/drivers/rtc/rtc-da9052.c +++ b/drivers/rtc/rtc-da9052.c @@ -206,6

[PATCH v1 3/3] rtc: da9052: Register ability of alarm to wake device from suspend

2015-03-04 Thread Adam Ward
Signed-off-by: Adam Ward Tested-by: Adam Ward --- drivers/rtc/rtc-da9052.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/rtc/rtc-da9052.c b/drivers/rtc/rtc-da9052.c index acc3e5a..1ba4371 100644 --- a/drivers/rtc/rtc-da9052.c +++ b/drivers/rtc/rtc-da9052.c @@ -309,6 +309,8

[PATCH v1 0/3] rtc: da9052: Corrections to access, validation and capability

2015-03-04 Thread Adam Ward
enables the wake-from-suspend capability. Best regards, Adam Adam Ward (3): rtc: da9052: Add extra reads with timeouts to avoid returning partially updated values rtc: da9052: Add constraints to set valid year rtc: da9052: Register ability of alarm to wake device from suspend drivers/rtc

[PATCH v1 1/3] rtc: da9052: Add extra reads with timeouts to avoid returning partially updated values

2015-03-04 Thread Adam Ward
The RTC is in a different clock domain so a quick read after write can retrieve a mangled value of the old/new values Signed-off-by: Adam Ward Tested-by: Adam Ward --- drivers/rtc/rtc-da9052.c | 87 1 file changed, 66 insertions(+), 21 deletions

[PATCH v1 0/2] mfd: da9052: Fix SPI access and IRQ config

2015-03-04 Thread Adam Ward
perform wake-from-suspend, which is established in a separate patch set for that subsystem, to follow. Best regards, Adam Adam Ward (2): mfd: da9052: Fix register access via SPI mfd: da9052: Register ability of device to cause a wake-up interrupt drivers/mfd/da9052-irq.c | 2 ++ drivers/mfd/da9052