[PATCH] i2c: at91: switched to resume/suspend callbacks.

2018-10-22 Thread Andrei.Stefanescu
In the previous version of the driver resume/suspend_noirq callbacks were used. Because of this, when resuming from suspend-to-ram, an I2C (belonging to a FLEXCOM) would resume before FLEXCOM. The first read on the I2C bus would then result in a timeout. This patch switches to resume/suspend

[PATCH 2/3] MAINTAINERS: add maintainer for MCP16502 PMIC driver

2018-11-13 Thread Andrei.Stefanescu
This patch adds a maintainer for the MCP16502 PMIC driver. Signed-off-by: Andrei Stefanescu --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index f485597..edfad02 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -9723,6 +9723,13 @@ M:

[PATCH 3/3] regulator: mcp16502: add regulator driver for MCP16502

2018-11-13 Thread Andrei.Stefanescu
This patch adds a regulator driver for the MCP16502 PMIC. This drivers supports basic operations through the regulator interface such as: - setting/reading voltage - setting/reading operating mode - reading current status - transitioning to/from suspend-to-ram and standby power states

[PATCH 0/3] add support for MCP16502 PMIC

2018-11-13 Thread Andrei.Stefanescu
MCP16502 is a Power Management IC from Microchip. It has 4 Buck outputs and 2 LDOs. The buck regulators can be used in two modes: normal(FPWM) and low-power(Auto PFM). This patch series adds support for the MCP16502 PMIC. Andrei Stefanescu (3): regulator: dt-bindings: add MCP16502 regulator

[PATCH 1/3] regulator: dt-bindings: add MCP16502 regulator bindings

2018-11-13 Thread Andrei.Stefanescu
This patch describes the compatible and the device tree bindings necessary for the MCP16502 PMIC. Signed-off-by: Andrei Stefanescu --- .../bindings/regulator/mcp16502-regulator.txt | 107 + 1 file changed, 107 insertions(+) create mode 100644

[PATCH 1/2] regulator: dt-bindings: add regulator-state-standby bindings

2018-11-13 Thread Andrei.Stefanescu
For state-mem and state-disk regulators can have various parameters applied such as enabled/disabled, current mode, voltage etc. This patch adds documentation on how to set these parameters in the device tree for the standby state. Signed-off-by: Andrei Stefanescu ---

[PATCH 0/2] set regulator constraints for standby state

2018-11-13 Thread Andrei.Stefanescu
This patch series adds support for setting the regulator constraints when entering standby Linux state. The new bindings are called regulator-state-standby and have the same syntax as regulator-state-mem/disk. Before this patch, if the regulator driver implemented set_suspend_voltage/mode the

[PATCH 2/2] regulator: of: add support for parsing regulator-state-standby

2018-11-13 Thread Andrei.Stefanescu
Set the according constraints for PM_SUSPEND_STANDBY case. Previously, only suspend to mem/disk were taken into consideration. Signed-off-by: Andrei Stefanescu --- drivers/regulator/of_regulator.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git

Re: [PATCH] i2c: at91: switched to resume/suspend callbacks.

2018-11-15 Thread Andrei.Stefanescu
Hello Wolfram, Could you please tell me if there are any changes that I should make to the patch? Thank you, Andrei Stefanescu On 07.11.2018 10:39, Ludovic Desroches wrote: > On Mon, Oct 22, 2018 at 12:17:47PM +0200, Andrei Stefanescu - M50506 wrote: >> In the previous version of the driver

[PATCH 3/3] gpio: add driver for sama5d2 PIOBU pins

2018-11-07 Thread Andrei.Stefanescu
PIOBU pins do not lose their voltage during Backup/Self-refresh. This patch adds a simple GPIO controller for them. This driver adds support for using the pins as GPIO offering the possibility to read/set the voltage. Signed-off-by: Andrei Stefanescu --- drivers/gpio/Kconfig | 10

[PATCH 1/3] dt-bindings: gpio: add sama5d2 PIOBU support

2018-11-07 Thread Andrei.Stefanescu
This patch describes the compatible and the device tree bindings necessary for the sama5d2 PIOBU GPIO controller driver. Signed-off-by: Andrei Stefanescu --- .../bindings/gpio/gpio-sama5d2-piobu.txt | 23 ++ 1 file changed, 23 insertions(+) create mode 100644

[PATCH 0/3] add sama5d2 PIOBU GPIO driver

2018-11-07 Thread Andrei.Stefanescu
On sama5d2 SoC the PIOBU pins do not lose their voltage during Backup/Self-refresh mode. This can be useful, for example, when the voltage must remain positive for a peripheral during Backup/Self-refresh mode (suspend-to ram is the Linux equivalent state). This patch series: - documents the

[PATCH 2/3] MAINTAINERS: add maintainer for sama5d2 PIOBU GPIO driver

2018-11-07 Thread Andrei.Stefanescu
This patch adds a maintainer for the sama5d2 GPIO controller driver. Signed-off-by: Andrei Stefanescu --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index f485597..88369f1 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -9760,6 +9760,13 @@ M:

[PATCH v3 0/3] add support for MCP16502 PMIC

2018-12-04 Thread Andrei.Stefanescu
MCP16502 is a Power Management IC from Microchip. It has 4 Buck outputs and 2 LDOs. The buck regulators can be used in two modes: normal(FPWM) and low-power(Auto PFM). This patch series adds support for the MCP16502 PMIC. v3: - use CONFIG_SUSPEND and CONFIG_PM to fix compile errors for some

[PATCH v3 1/3] regulator: dt-bindings: add MCP16502 regulator bindings

2018-12-04 Thread Andrei.Stefanescu
This patch describes the compatible and the device tree bindings necessary for the MCP16502 PMIC. Signed-off-by: Andrei Stefanescu --- .../bindings/regulator/mcp16502-regulator.txt | 143 + 1 file changed, 143 insertions(+) create mode 100644

[PATCH v3 3/3] regulator: mcp16502: add regulator driver for MCP16502

2018-12-04 Thread Andrei.Stefanescu
This patch adds a regulator driver for the MCP16502 PMIC. This drivers supports basic operations through the regulator interface such as: - setting/reading voltage - setting/reading operating mode - reading current status - transitioning to/from suspend-to-ram and standby power states

[PATCH v3 2/3] MAINTAINERS: add maintainer for MCP16502 PMIC driver

2018-12-04 Thread Andrei.Stefanescu
This patch adds a maintainer for the MCP16502 PMIC driver. Signed-off-by: Andrei Stefanescu --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index b755a89..6a74a65 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -9730,6 +9730,13 @@ M:

Re: [PATCH v2 1/2] dt-bindings: gpio: add SAMA5D2 PIOBU support

2018-12-04 Thread Andrei.Stefanescu
Hello Rob, Could you please tell me if there are any improvements to be made to the patch? Best regards, Andrei On 20.11.2018 10:08, Andrei Stefanescu - M50506 wrote: > This patch describes the compatible and the device tree > bindings necessary for the SAMA5D2 PIOBU GPIO. > > Signed-off-by:

Re: [PATCH v2 1/2] dt-bindings: gpio: add SAMA5D2 PIOBU support

2018-12-05 Thread Andrei.Stefanescu
Hello Rob, Thank you for your feedback. I will add a bit of context regarding the secumod. The "atmel,sama5d2-secumod" compatible string is not used for loading a driver. It is used by atmel securam driver (drivers/misc/sram.c) which has access to secumod's registers via:    

[RESEND PATCH] i2c: at91: switched to resume/suspend callbacks.

2018-12-07 Thread Andrei.Stefanescu
In the previous version of the driver resume/suspend_noirq callbacks were used. Because of this, when resuming from suspend-to-ram, an I2C (belonging to a FLEXCOM) would resume before FLEXCOM. The first read on the I2C bus would then result in a timeout. This patch switches to resume/suspend

[PATCH v3 0/2] add SAMA5D2 PIOBU GPIO driver

2018-12-06 Thread Andrei.Stefanescu
On SAMA5D2 SoC the PIOBU pins do not lose their voltage during Backup/Self-refresh mode. This can be useful, for example, when the voltage must remain positive for a peripheral during Backup/Self-refresh mode (suspend-to ram is the Linux equivalent state). v3: - change driver's compatible to

[PATCH v3 1/2] dt-bindings: arm: atmel: describe SECUMOD usage as a GPIO controller

2018-12-06 Thread Andrei.Stefanescu
This patch describes the Security Module's usage as a GPIO controller for its PIOBU pins. These pins have the special property of maintaining their voltage during suspend-to-mem. Signed-off-by: Andrei Stefanescu --- Documentation/devicetree/bindings/arm/atmel-sysregs.txt | 12 +++- 1

[PATCH v3 2/2] gpio: add driver for SAMA5D2 PIOBU pins

2018-12-06 Thread Andrei.Stefanescu
PIOBU pins do not lose their voltage during Backup/Self-refresh. This patch adds a simple GPIO controller for them and a maintainer for the driver. This driver adds support for using the pins as GPIO offering the possibility to read/set the voltage. Signed-off-by: Andrei Stefanescu ---

[PATCH v2 1/2] dt-bindings: gpio: add SAMA5D2 PIOBU support

2018-11-20 Thread Andrei.Stefanescu
This patch describes the compatible and the device tree bindings necessary for the SAMA5D2 PIOBU GPIO. Signed-off-by: Andrei Stefanescu --- .../bindings/gpio/gpio-sama5d2-piobu.txt | 31 ++ 1 file changed, 31 insertions(+) create mode 100644

[PATCH v2 0/2] add SAMA5D2 PIOBU GPIO driver

2018-11-20 Thread Andrei.Stefanescu
On SAMA5D2 SoC the PIOBU pins do not lose their voltage during Backup/Self-refresh mode. This can be useful, for example, when the voltage must remain positive for a peripheral during Backup/Self-refresh mode (suspend-to ram is the Linux equivalent state). v2: - make driver be a subnode of the

[PATCH v2 2/2] gpio: add driver for SAMA5D2 PIOBU pins

2018-11-20 Thread Andrei.Stefanescu
PIOBU pins do not lose their voltage during Backup/Self-refresh. This patch adds a simple GPIO controller for them and a maintainer for the driver. This driver adds support for using the pins as GPIO offering the possibility to read/set the voltage. Signed-off-by: Andrei Stefanescu ---

Re: [PATCH 3/3] regulator: mcp16502: add regulator driver for MCP16502

2018-11-21 Thread Andrei.Stefanescu
Hello Mark, Thank you for your review. While working on the next version I realized that the implementation should change a bit. The mcp16502 PMIC has separate registers for each of its operating modes (Performance, Active, Low-power, Hibernate). So, it is possible to setup the values for

[PATCH v2 1/3] regulator: dt-bindings: add MCP16502 regulator bindings

2018-11-27 Thread Andrei.Stefanescu
This patch describes the compatible and the device tree bindings necessary for the MCP16502 PMIC. Signed-off-by: Andrei Stefanescu --- .../bindings/regulator/mcp16502-regulator.txt | 143 + 1 file changed, 143 insertions(+) create mode 100644

[PATCH v2 2/3] MAINTAINERS: add maintainer for MCP16502 PMIC driver

2018-11-27 Thread Andrei.Stefanescu
This patch adds a maintainer for the MCP16502 PMIC driver. Signed-off-by: Andrei Stefanescu --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index b755a89..6a74a65 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -9730,6 +9730,13 @@ M:

[PATCH v2 3/3] regulator: mcp16502: add regulator driver for MCP16502

2018-11-27 Thread Andrei.Stefanescu
This patch adds a regulator driver for the MCP16502 PMIC. This drivers supports basic operations through the regulator interface such as: - setting/reading voltage - setting/reading operating mode - reading current status - transitioning to/from suspend-to-ram and standby power states

[PATCH v2 0/3] add support for MCP16502 PMIC

2018-11-27 Thread Andrei.Stefanescu
MCP16502 is a Power Management IC from Microchip. It has 4 Buck outputs and 2 LDOs. The buck regulators can be used in two modes: normal(FPWM) and low-power(Auto PFM). This patch series adds support for the MCP16502 PMIC. v2: - use lpm-gpios instead of lpm-gpio in devicetree bindings

[PATCH v2 1/2] dt-bindings: gpio: add SAMA5D2 PIOBU support

2018-11-20 Thread Andrei.Stefanescu
This patch describes the compatible and the device tree bindings necessary for the SAMA5D2 PIOBU GPIO. Signed-off-by: Andrei Stefanescu --- .../bindings/gpio/gpio-sama5d2-piobu.txt | 31 ++ 1 file changed, 31 insertions(+) create mode 100644

[PATCH v2 0/2] add SAMA5D2 PIOBU GPIO driver

2018-11-20 Thread Andrei.Stefanescu
On SAMA5D2 SoC the PIOBU pins do not lose their voltage during Backup/Self-refresh mode. This can be useful, for example, when the voltage must remain positive for a peripheral during Backup/Self-refresh mode (suspend-to ram is the Linux equivalent state). v2: - make driver be a subnode of the

[PATCH v2 2/2] gpio: add driver for SAMA5D2 PIOBU pins

2018-11-20 Thread Andrei.Stefanescu
PIOBU pins do not lose their voltage during Backup/Self-refresh. This patch adds a simple GPIO controller for them and a maintainer for the driver. This driver adds support for using the pins as GPIO offering the possibility to read/set the voltage. Signed-off-by: Andrei Stefanescu ---

Re: [PATCH 3/3] regulator: mcp16502: add regulator driver for MCP16502

2018-11-21 Thread Andrei.Stefanescu
Hello Mark, Thank you for your review. While working on the next version I realized that the implementation should change a bit. The mcp16502 PMIC has separate registers for each of its operating modes (Performance, Active, Low-power, Hibernate). So, it is possible to setup the values for

[PATCH v2 0/3] add support for MCP16502 PMIC

2018-11-27 Thread Andrei.Stefanescu
MCP16502 is a Power Management IC from Microchip. It has 4 Buck outputs and 2 LDOs. The buck regulators can be used in two modes: normal(FPWM) and low-power(Auto PFM). This patch series adds support for the MCP16502 PMIC. v2: - use lpm-gpios instead of lpm-gpio in devicetree bindings

[PATCH v2 1/3] regulator: dt-bindings: add MCP16502 regulator bindings

2018-11-27 Thread Andrei.Stefanescu
This patch describes the compatible and the device tree bindings necessary for the MCP16502 PMIC. Signed-off-by: Andrei Stefanescu --- .../bindings/regulator/mcp16502-regulator.txt | 143 + 1 file changed, 143 insertions(+) create mode 100644

[PATCH v2 2/3] MAINTAINERS: add maintainer for MCP16502 PMIC driver

2018-11-27 Thread Andrei.Stefanescu
This patch adds a maintainer for the MCP16502 PMIC driver. Signed-off-by: Andrei Stefanescu --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index b755a89..6a74a65 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -9730,6 +9730,13 @@ M:

[PATCH v2 3/3] regulator: mcp16502: add regulator driver for MCP16502

2018-11-27 Thread Andrei.Stefanescu
This patch adds a regulator driver for the MCP16502 PMIC. This drivers supports basic operations through the regulator interface such as: - setting/reading voltage - setting/reading operating mode - reading current status - transitioning to/from suspend-to-ram and standby power states

[PATCH] regulator: mcp16502: code cleanup

2018-12-17 Thread Andrei.Stefanescu
This patch does the following: - align parameter with parenthesis - fix compile error If CONFIG_SUSPEND is not set the dummy pm_ops callbacks are named mcp16502_suspend and mcp16502_resume instead of mcp16502_suspend_noirq and mcp16502_resume_noirq. Excerpt from compile log (kbuild test robot):

[PATCH 2/3] MAINTAINERS: add maintainer for MCP16502 PMIC driver

2018-11-13 Thread Andrei.Stefanescu
This patch adds a maintainer for the MCP16502 PMIC driver. Signed-off-by: Andrei Stefanescu --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index f485597..edfad02 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -9723,6 +9723,13 @@ M:

[PATCH 3/3] regulator: mcp16502: add regulator driver for MCP16502

2018-11-13 Thread Andrei.Stefanescu
This patch adds a regulator driver for the MCP16502 PMIC. This drivers supports basic operations through the regulator interface such as: - setting/reading voltage - setting/reading operating mode - reading current status - transitioning to/from suspend-to-ram and standby power states

[PATCH 0/3] add support for MCP16502 PMIC

2018-11-13 Thread Andrei.Stefanescu
MCP16502 is a Power Management IC from Microchip. It has 4 Buck outputs and 2 LDOs. The buck regulators can be used in two modes: normal(FPWM) and low-power(Auto PFM). This patch series adds support for the MCP16502 PMIC. Andrei Stefanescu (3): regulator: dt-bindings: add MCP16502 regulator

[PATCH 1/3] regulator: dt-bindings: add MCP16502 regulator bindings

2018-11-13 Thread Andrei.Stefanescu
This patch describes the compatible and the device tree bindings necessary for the MCP16502 PMIC. Signed-off-by: Andrei Stefanescu --- .../bindings/regulator/mcp16502-regulator.txt | 107 + 1 file changed, 107 insertions(+) create mode 100644

[PATCH 1/2] regulator: dt-bindings: add regulator-state-standby bindings

2018-11-13 Thread Andrei.Stefanescu
For state-mem and state-disk regulators can have various parameters applied such as enabled/disabled, current mode, voltage etc. This patch adds documentation on how to set these parameters in the device tree for the standby state. Signed-off-by: Andrei Stefanescu ---

[PATCH 0/2] set regulator constraints for standby state

2018-11-13 Thread Andrei.Stefanescu
This patch series adds support for setting the regulator constraints when entering standby Linux state. The new bindings are called regulator-state-standby and have the same syntax as regulator-state-mem/disk. Before this patch, if the regulator driver implemented set_suspend_voltage/mode the

[PATCH 2/2] regulator: of: add support for parsing regulator-state-standby

2018-11-13 Thread Andrei.Stefanescu
Set the according constraints for PM_SUSPEND_STANDBY case. Previously, only suspend to mem/disk were taken into consideration. Signed-off-by: Andrei Stefanescu --- drivers/regulator/of_regulator.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git

[PATCH v4 2/3] MAINTAINERS: add maintainer for MCP16502 PMIC driver

2018-12-11 Thread Andrei.Stefanescu
This patch adds a maintainer for the MCP16502 PMIC driver. Signed-off-by: Andrei Stefanescu --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index b755a89..6a74a65 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -9730,6 +9730,13 @@ M:

[PATCH v4 1/3] regulator: dt-bindings: add MCP16502 regulator bindings

2018-12-11 Thread Andrei.Stefanescu
This patch describes the compatible and the device tree bindings necessary for the MCP16502 PMIC. Signed-off-by: Andrei Stefanescu Reviewed-by: Rob Herring --- .../bindings/regulator/mcp16502-regulator.txt | 143 + 1 file changed, 143 insertions(+) create mode 100644

[PATCH v4 0/3] add support for MCP16502 PMIC

2018-12-11 Thread Andrei.Stefanescu
MCP16502 is a Power Management IC from Microchip. It has 4 Buck outputs and 2 LDOs. The buck regulators can be used in two modes: normal(FPWM) and low-power(Auto PFM). This patch series adds support for the MCP16502 PMIC. v4: - make entire intial comment a C++ comment v3: - use CONFIG_SUSPEND

[PATCH v4 3/3] regulator: mcp16502: add regulator driver for MCP16502

2018-12-11 Thread Andrei.Stefanescu
This patch adds a regulator driver for the MCP16502 PMIC. This drivers supports basic operations through the regulator interface such as: - setting/reading voltage - setting/reading operating mode - reading current status - transitioning to/from suspend-to-ram and standby power states

Re: [RESEND PATCH v3 3/3] regulator: mcp16502: add regulator driver for MCP16502

2018-12-12 Thread Andrei.Stefanescu
Hi Mark, Thank you for the review. > SPDX headers need to be C++ comments - please make the entire comment > block a C++ one so it looks more intentional. I sent a new patch (v4) with the modified comment. >> +#ifdef CONFIG_SUSPEND >> +static int mcp16502_suspend(struct device *dev) >> +{ >> +

[PATCH v4 2/2] gpio: add driver for SAMA5D2 PIOBU pins

2018-12-12 Thread Andrei.Stefanescu
PIOBU pins do not lose their voltage during Backup/Self-refresh. This patch adds a simple GPIO controller for them and a maintainer for the driver. This driver adds support for using the pins as GPIO offering the possibility to read/set the voltage. Signed-off-by: Andrei Stefanescu ---

[PATCH v4 0/2] add SAMA5D2 PIOBU GPIO driver

2018-12-12 Thread Andrei.Stefanescu
On SAMA5D2 SoC the PIOBU pins do not lose their voltage during Backup/Self-refresh mode. This can be useful, for example, when the voltage must remain positive for a peripheral during Backup/Self-refresh mode (suspend-to ram is the Linux equivalent state). v4: - readd Makefile and Kconfig changes

[PATCH v4 1/2] dt-bindings: arm: atmel: describe SECUMOD usage as a GPIO controller

2018-12-12 Thread Andrei.Stefanescu
This patch describes the Security Module's usage as a GPIO controller for its PIOBU pins. These pins have the special property of maintaining their voltage during suspend-to-mem. Signed-off-by: Andrei Stefanescu --- Documentation/devicetree/bindings/arm/atmel-sysregs.txt | 12 +++- 1

[PATCH v5 2/3] MAINTAINERS: add maintainer for MCP16502 PMIC driver

2018-12-12 Thread Andrei.Stefanescu
This patch adds a maintainer for the MCP16502 PMIC driver. Signed-off-by: Andrei Stefanescu --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index b755a89..6a74a65 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -9730,6 +9730,13 @@ M:

[PATCH v5 0/3] add support for MCP16502 PMIC

2018-12-12 Thread Andrei.Stefanescu
MCP16502 is a Power Management IC from Microchip. It has 4 Buck outputs and 2 LDOs. The buck regulators can be used in two modes: normal(FPWM) and low-power(Auto PFM). This patch series adds support for the MCP16502 PMIC. v5: - split the driver patch in two patches, this one is the initial

[PATCH v5 1/3] regulator: dt-bindings: add MCP16502 regulator bindings

2018-12-12 Thread Andrei.Stefanescu
This patch describes the compatible and the device tree bindings necessary for the MCP16502 PMIC. Signed-off-by: Andrei Stefanescu Reviewed-by: Rob Herring --- .../bindings/regulator/mcp16502-regulator.txt | 143 + 1 file changed, 143 insertions(+) create mode 100644

[PATCH v5 3/3] regulator: mcp16502: add regulator driver for MCP16502

2018-12-12 Thread Andrei.Stefanescu
This patch adds a regulator driver for the MCP16502 PMIC. This drivers supports basic operations through the regulator interface such as: - setting/reading voltage - setting/reading operating mode - reading current status Signed-off-by: Andrei Stefanescu --- drivers/regulator/Kconfig| 9 +

[PATCH] regulator: mcp16502: add support for suspend

2018-12-12 Thread Andrei.Stefanescu
This patch adds support for entering/resuming suspend states. It does this by setting the LPM pin of the PMIC. When suspending the PMIC will enter the Low-power mode when the LPM pin will be set to high. If the suspend target state is suspend-to-mem, the PMIC will transition to Hibernate mode,

Re: [RESEND PATCH v3 3/3] regulator: mcp16502: add regulator driver for MCP16502

2018-12-13 Thread Andrei.Stefanescu
Hi Mark, On 12.12.2018 17:55, Mark Brown wrote: > On Wed, Dec 12, 2018 at 08:01:07AM +, andrei.stefane...@microchip.com > wrote: > >>> This puts the device into low power mode when the suspend function gets >>> called but this might not be safe - devices using the regulator may not >>> be

[PATCH v2] regulator: mcp16502: add support for suspend

2018-12-14 Thread Andrei.Stefanescu
This patch adds support for entering/resuming suspend states. It does this by setting the LPM pin of the PMIC. When suspending the PMIC will enter the Low-power mode when the LPM pin will be set to high. If the suspend target state is suspend-to-mem, the PMIC will transition to Hibernate mode,

[RESEND PATCH v3 3/3] regulator: mcp16502: add regulator driver for MCP16502

2018-12-11 Thread Andrei.Stefanescu
This patch adds a regulator driver for the MCP16502 PMIC. This drivers supports basic operations through the regulator interface such as: - setting/reading voltage - setting/reading operating mode - reading current status - transitioning to/from suspend-to-ram and standby power states

[RESEND PATCH v3 2/3] MAINTAINERS: add maintainer for MCP16502 PMIC driver

2018-12-11 Thread Andrei.Stefanescu
This patch adds a maintainer for the MCP16502 PMIC driver. Signed-off-by: Andrei Stefanescu --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index b755a89..6a74a65 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -9730,6 +9730,13 @@ M:

[RESEND PATCH v3 1/3] regulator: dt-bindings: add MCP16502 regulator bindings

2018-12-11 Thread Andrei.Stefanescu
This patch describes the compatible and the device tree bindings necessary for the MCP16502 PMIC. Signed-off-by: Andrei Stefanescu Reviewed-by: Rob Herring --- .../bindings/regulator/mcp16502-regulator.txt | 143 + 1 file changed, 143 insertions(+) create mode 100644

[RESEND PATCH v3 0/3] add support for MCP16502 PMIC

2018-12-11 Thread Andrei.Stefanescu
The resend is because I forgot to add Mark. MCP16502 is a Power Management IC from Microchip. It has 4 Buck outputs and 2 LDOs. The buck regulators can be used in two modes: normal(FPWM) and low-power(Auto PFM). This patch series adds support for the MCP16502 PMIC. v3: - use CONFIG_SUSPEND and

Re: linux-next: Tree for Dec 17 (regulator/mcp16502.c)

2018-12-18 Thread Andrei.Stefanescu
Hi Randy, Thank you for the email. The error should be fixed with this patch [1]. Best regards, Andrei [1] - http://lists.infradead.org/pipermail/linux-arm-kernel/2018-December/621292.html On 17.12.2018 18:03, Randy Dunlap wrote: > On 12/17/18 3:09 AM, Stephen Rothwell wrote: >> Hi all, >> >>

Re: [PATCH] regulator: mcp16502: Fix missing n_voltages setting

2018-12-19 Thread Andrei.Stefanescu
Hi Axel, Thank you for the patch! However, there are not MCP16502_VSEL + 1 voltages, but VDD_HIGH_SEL - VDD_LOW_SEL + 1 (=51). Best regards, Andrei On 19.12.2018 10:58, Axel Lin wrote: > The n_voltages setting is not set, fix it. > > Signed-off-by: Axel Lin > --- >

Re: [PATCH v2 1/2] dt-bindings: gpio: add SAMA5D2 PIOBU support

2018-12-05 Thread Andrei.Stefanescu
Hello Rob, Thank you for your feedback. I will add a bit of context regarding the secumod. The "atmel,sama5d2-secumod" compatible string is not used for loading a driver. It is used by atmel securam driver (drivers/misc/sram.c) which has access to secumod's registers via:    

[PATCH v3 0/3] add support for MCP16502 PMIC

2018-12-04 Thread Andrei.Stefanescu
MCP16502 is a Power Management IC from Microchip. It has 4 Buck outputs and 2 LDOs. The buck regulators can be used in two modes: normal(FPWM) and low-power(Auto PFM). This patch series adds support for the MCP16502 PMIC. v3: - use CONFIG_SUSPEND and CONFIG_PM to fix compile errors for some

[PATCH v3 1/3] regulator: dt-bindings: add MCP16502 regulator bindings

2018-12-04 Thread Andrei.Stefanescu
This patch describes the compatible and the device tree bindings necessary for the MCP16502 PMIC. Signed-off-by: Andrei Stefanescu --- .../bindings/regulator/mcp16502-regulator.txt | 143 + 1 file changed, 143 insertions(+) create mode 100644

[PATCH v3 2/3] MAINTAINERS: add maintainer for MCP16502 PMIC driver

2018-12-04 Thread Andrei.Stefanescu
This patch adds a maintainer for the MCP16502 PMIC driver. Signed-off-by: Andrei Stefanescu --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index b755a89..6a74a65 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -9730,6 +9730,13 @@ M:

[PATCH v3 3/3] regulator: mcp16502: add regulator driver for MCP16502

2018-12-04 Thread Andrei.Stefanescu
This patch adds a regulator driver for the MCP16502 PMIC. This drivers supports basic operations through the regulator interface such as: - setting/reading voltage - setting/reading operating mode - reading current status - transitioning to/from suspend-to-ram and standby power states

Re: [PATCH v2 1/2] dt-bindings: gpio: add SAMA5D2 PIOBU support

2018-12-04 Thread Andrei.Stefanescu
Hello Rob, Could you please tell me if there are any improvements to be made to the patch? Best regards, Andrei On 20.11.2018 10:08, Andrei Stefanescu - M50506 wrote: > This patch describes the compatible and the device tree > bindings necessary for the SAMA5D2 PIOBU GPIO. > > Signed-off-by:

[PATCH v3 1/2] dt-bindings: arm: atmel: describe SECUMOD usage as a GPIO controller

2018-12-06 Thread Andrei.Stefanescu
This patch describes the Security Module's usage as a GPIO controller for its PIOBU pins. These pins have the special property of maintaining their voltage during suspend-to-mem. Signed-off-by: Andrei Stefanescu --- Documentation/devicetree/bindings/arm/atmel-sysregs.txt | 12 +++- 1

[PATCH v3 2/2] gpio: add driver for SAMA5D2 PIOBU pins

2018-12-06 Thread Andrei.Stefanescu
PIOBU pins do not lose their voltage during Backup/Self-refresh. This patch adds a simple GPIO controller for them and a maintainer for the driver. This driver adds support for using the pins as GPIO offering the possibility to read/set the voltage. Signed-off-by: Andrei Stefanescu ---

[PATCH v3 0/2] add SAMA5D2 PIOBU GPIO driver

2018-12-06 Thread Andrei.Stefanescu
On SAMA5D2 SoC the PIOBU pins do not lose their voltage during Backup/Self-refresh mode. This can be useful, for example, when the voltage must remain positive for a peripheral during Backup/Self-refresh mode (suspend-to ram is the Linux equivalent state). v3: - change driver's compatible to

[RESEND PATCH] i2c: at91: switched to resume/suspend callbacks.

2018-12-07 Thread Andrei.Stefanescu
In the previous version of the driver resume/suspend_noirq callbacks were used. Because of this, when resuming from suspend-to-ram, an I2C (belonging to a FLEXCOM) would resume before FLEXCOM. The first read on the I2C bus would then result in a timeout. This patch switches to resume/suspend

Re: [PATCH] i2c: at91: switched to resume/suspend callbacks.

2018-11-15 Thread Andrei.Stefanescu
Hello Wolfram, Could you please tell me if there are any changes that I should make to the patch? Thank you, Andrei Stefanescu On 07.11.2018 10:39, Ludovic Desroches wrote: > On Mon, Oct 22, 2018 at 12:17:47PM +0200, Andrei Stefanescu - M50506 wrote: >> In the previous version of the driver

[PATCH] i2c: at91: switched to resume/suspend callbacks.

2018-10-22 Thread Andrei.Stefanescu
In the previous version of the driver resume/suspend_noirq callbacks were used. Because of this, when resuming from suspend-to-ram, an I2C (belonging to a FLEXCOM) would resume before FLEXCOM. The first read on the I2C bus would then result in a timeout. This patch switches to resume/suspend

[PATCH 2/3] MAINTAINERS: add maintainer for sama5d2 PIOBU GPIO driver

2018-11-07 Thread Andrei.Stefanescu
This patch adds a maintainer for the sama5d2 GPIO controller driver. Signed-off-by: Andrei Stefanescu --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index f485597..88369f1 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -9760,6 +9760,13 @@ M:

[PATCH 3/3] gpio: add driver for sama5d2 PIOBU pins

2018-11-07 Thread Andrei.Stefanescu
PIOBU pins do not lose their voltage during Backup/Self-refresh. This patch adds a simple GPIO controller for them. This driver adds support for using the pins as GPIO offering the possibility to read/set the voltage. Signed-off-by: Andrei Stefanescu --- drivers/gpio/Kconfig | 10

[PATCH 1/3] dt-bindings: gpio: add sama5d2 PIOBU support

2018-11-07 Thread Andrei.Stefanescu
This patch describes the compatible and the device tree bindings necessary for the sama5d2 PIOBU GPIO controller driver. Signed-off-by: Andrei Stefanescu --- .../bindings/gpio/gpio-sama5d2-piobu.txt | 23 ++ 1 file changed, 23 insertions(+) create mode 100644

[PATCH 0/3] add sama5d2 PIOBU GPIO driver

2018-11-07 Thread Andrei.Stefanescu
On sama5d2 SoC the PIOBU pins do not lose their voltage during Backup/Self-refresh mode. This can be useful, for example, when the voltage must remain positive for a peripheral during Backup/Self-refresh mode (suspend-to ram is the Linux equivalent state). This patch series: - documents the