From 3c42728c18d093e8951ad6caf7daa89fa2f54702 Mon Sep 17 00:00:00 2001 From: Claudiu Beznea Date: Thu, 7 Jan 2021 16:15:26 +0200 Subject: [PATCH 1/3] regulator: mcp16502: lpm pin can be optional on some platforms On some platform (e.g. SAMA7G5) LPM pin should be optional as it can be controlled explicitly (via shutdown controller registers) in the platform specific power saving code to decrease the power consumption while suspended as this SoC pin may be connected to other devices that could take power saving actions based on its value. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/1610028927-9842-3-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Mark Brown --- drivers/regulator/mcp16502.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/mcp16502.c b/drivers/regulator/mcp16502.c index 74ad92dc664a..88c6bd5b6c78 100644 --- a/drivers/regulator/mcp16502.c +++ b/drivers/regulator/mcp16502.c @@ -550,7 +550,7 @@ static int mcp16502_probe(struct i2c_client *client, config.regmap = rmap; config.driver_data = mcp; - mcp->lpm = devm_gpiod_get(dev, "lpm", GPIOD_OUT_LOW); + mcp->lpm = devm_gpiod_get_optional(dev, "lpm", GPIOD_OUT_LOW); if (IS_ERR(mcp->lpm)) { dev_err(dev, "failed to get lpm pin: %ld\n", PTR_ERR(mcp->lpm)); return PTR_ERR(mcp->lpm); From 8aad7fabce6ad9491cc7d23f85d9798a4a0ce399 Mon Sep 17 00:00:00 2001 From: Claudiu Beznea Date: Thu, 7 Jan 2021 16:15:27 +0200 Subject: [PATCH 2/3] MAINTAINERS: add myself as maintainer for mcp16502 Andrei is no longer with Microchip. Add myself as maintainer for MCP16502. Along with this change the status from maintained to supported. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/1610028927-9842-4-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Mark Brown --- MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 546aa66428c9..3259f0e0b630 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -11690,9 +11690,9 @@ F: drivers/video/fbdev/atmel_lcdfb.c F: include/video/atmel_lcdc.h MICROCHIP MCP16502 PMIC DRIVER -M: Andrei Stefanescu +M: Claudiu Beznea L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) -S: Maintained +S: Supported F: Documentation/devicetree/bindings/regulator/mcp16502-regulator.txt F: drivers/regulator/mcp16502.c From eea0b4e213232b28a25de5b88af9e25667e8d2f2 Mon Sep 17 00:00:00 2001 From: Claudiu Beznea Date: Thu, 7 Jan 2021 16:15:25 +0200 Subject: [PATCH 3/3] regulator: mcp16502: document lpm as optional Document LPM pin as optional. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/1610028927-9842-2-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Mark Brown --- .../devicetree/bindings/regulator/mcp16502-regulator.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/regulator/mcp16502-regulator.txt b/Documentation/devicetree/bindings/regulator/mcp16502-regulator.txt index d86584ed4d93..451cc4e86b01 100644 --- a/Documentation/devicetree/bindings/regulator/mcp16502-regulator.txt +++ b/Documentation/devicetree/bindings/regulator/mcp16502-regulator.txt @@ -4,7 +4,8 @@ Required properties: - compatible: "microchip,mcp16502" - reg: I2C slave address - lpm-gpios: GPIO for LPM pin. Note that this GPIO *must* remain high during - suspend-to-ram, keeping the PMIC into HIBERNATE mode. + suspend-to-ram, keeping the PMIC into HIBERNATE mode; this + property is optional; - regulators: A node that houses a sub-node for each regulator within the device. Each sub-node is identified using the node's name. The content of each sub-node is defined by the