* [PATCH v2 0/2] regulator: rpi-panel-v2: Add required vcc-supply
@ 2026-09-07 5:46 Shashank Maurya
2026-09-07 5:46 ` [PATCH v2 1/2] dt-bindings: regulator: rpi-panel-v2: Add required vcc-supply property Shashank Maurya
2026-09-07 5:46 ` [PATCH v2 2/2] regulator: rpi-panel-v2: Add required vcc-supply support Shashank Maurya
0 siblings, 2 replies; 12+ messages in thread
From: Shashank Maurya @ 2026-09-07 5:46 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Florian Fainelli,
Broadcom internal kernel review list, Marek Vasut
Cc: linux-kernel, devicetree, linux-rpi-kernel, linux-arm-kernel,
venkata.valluru, Jessica Zhang, Shashank Maurya
This series adds a required vcc-supply property to both the dt-binding
and the driver:
- Patch 1/2: dt-bindings - documents the vcc-supply property and
marks it required in the schema.
- Patch 2/2: driver - uses devm_regulator_get() to obtain and enable
the vcc supply at the start of probe, before any I2C access.
---
Changes in v2:
- Made vcc-supply required instead of optional (devm_regulator_get()
instead of devm_regulator_get_optional()).
- Added vcc-supply to the required list in the dt-binding schema.
Changes in v1:
- Initial submission with optional vcc-supply support.
To: Liam Girdwood <lgirdwood@gmail.com>
To: Mark Brown <broonie@kernel.org>
To: Rob Herring <robh@kernel.org>
To: Krzysztof Kozlowski <krzk+dt@kernel.org>
To: Conor Dooley <conor+dt@kernel.org>
To: Florian Fainelli <florian.fainelli@broadcom.com>
To: Broadcom internal kernel review list <bcm-kernel-feedback-list@broadcom.com>
To: Marek Vasut <marek.vasut+renesas@mailbox.org>
Cc: linux-kernel@vger.kernel.org
Cc: devicetree@vger.kernel.org
Cc: linux-rpi-kernel@lists.infradead.org
Cc: linux-arm-kernel@lists.infradead.org
---
Shashank Maurya (2):
dt-bindings: regulator: rpi-panel-v2: Add required vcc-supply property
regulator: rpi-panel-v2: Add required vcc-supply support
.../raspberrypi,7inch-touchscreen-panel-regulator-v2.yaml | 5 +++++
drivers/regulator/rpi-panel-v2-regulator.c | 12 ++++++++++++
2 files changed, 17 insertions(+)
---
base-commit: bd2a0c2d8c49ffb7acfcb0c1177af355ea417caf
change-id: 20260907-rpi_reg-8c6885b35e5b
Best regards,
--
Shashank Maurya <shashank.maurya@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v2 1/2] dt-bindings: regulator: rpi-panel-v2: Add required vcc-supply property
2026-09-07 5:46 [PATCH v2 0/2] regulator: rpi-panel-v2: Add required vcc-supply Shashank Maurya
@ 2026-09-07 5:46 ` Shashank Maurya
2026-09-07 13:24 ` Dave Stevenson
2026-09-07 5:46 ` [PATCH v2 2/2] regulator: rpi-panel-v2: Add required vcc-supply support Shashank Maurya
1 sibling, 1 reply; 12+ messages in thread
From: Shashank Maurya @ 2026-09-07 5:46 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Florian Fainelli,
Broadcom internal kernel review list, Marek Vasut
Cc: linux-kernel, devicetree, linux-rpi-kernel, linux-arm-kernel,
venkata.valluru, Jessica Zhang, Shashank Maurya
Add a vcc-supply property to the Raspberry Pi 7" touchscreen panel V2
regulator binding and mark it as required. The panel controller MCU
needs an external power rail to be supplied before any I2C communication
can take place.
Signed-off-by: Shashank Maurya <shashank.maurya@oss.qualcomm.com>
---
.../regulator/raspberrypi,7inch-touchscreen-panel-regulator-v2.yaml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/Documentation/devicetree/bindings/regulator/raspberrypi,7inch-touchscreen-panel-regulator-v2.yaml b/Documentation/devicetree/bindings/regulator/raspberrypi,7inch-touchscreen-panel-regulator-v2.yaml
index 37b9ed371b67..a6195e53be16 100644
--- a/Documentation/devicetree/bindings/regulator/raspberrypi,7inch-touchscreen-panel-regulator-v2.yaml
+++ b/Documentation/devicetree/bindings/regulator/raspberrypi,7inch-touchscreen-panel-regulator-v2.yaml
@@ -35,6 +35,9 @@ properties:
const: 3
description: See ../../pwm/pwm.yaml for description of the cell formats.
+ vcc-supply:
+ description: Regulator supplying power to the panel controller.
+
additionalProperties: false
required:
@@ -43,6 +46,7 @@ required:
- gpio-controller
- "#gpio-cells"
- "#pwm-cells"
+ - vcc-supply
examples:
- |
@@ -55,6 +59,7 @@ examples:
gpio-controller;
#gpio-cells = <2>;
#pwm-cells = <3>;
+ vcc-supply = <&vcc_reg>;
};
};
--
2.34.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v2 2/2] regulator: rpi-panel-v2: Add required vcc-supply support
2026-09-07 5:46 [PATCH v2 0/2] regulator: rpi-panel-v2: Add required vcc-supply Shashank Maurya
2026-09-07 5:46 ` [PATCH v2 1/2] dt-bindings: regulator: rpi-panel-v2: Add required vcc-supply property Shashank Maurya
@ 2026-09-07 5:46 ` Shashank Maurya
2026-09-07 6:02 ` Marek Vasut
2026-09-07 17:06 ` Conor Dooley
1 sibling, 2 replies; 12+ messages in thread
From: Shashank Maurya @ 2026-09-07 5:46 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Florian Fainelli,
Broadcom internal kernel review list, Marek Vasut
Cc: linux-kernel, devicetree, linux-rpi-kernel, linux-arm-kernel,
venkata.valluru, Jessica Zhang, Shashank Maurya
The Raspberry Pi 7" touchscreen panel V2 MCU requires an external power
rail to be enabled before any I2C register access is attempted. Use
devm_regulator_get() to obtain the vcc supply and enable it at the
start of probe.
Signed-off-by: Shashank Maurya <shashank.maurya@oss.qualcomm.com>
---
drivers/regulator/rpi-panel-v2-regulator.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/regulator/rpi-panel-v2-regulator.c b/drivers/regulator/rpi-panel-v2-regulator.c
index 30b78aa75ee3..e54d675962e7 100644
--- a/drivers/regulator/rpi-panel-v2-regulator.c
+++ b/drivers/regulator/rpi-panel-v2-regulator.c
@@ -11,6 +11,7 @@
#include <linux/module.h>
#include <linux/pwm.h>
#include <linux/regmap.h>
+#include <linux/regulator/consumer.h>
/* I2C registers of the microcontroller. */
#define REG_ID 0x01
@@ -66,10 +67,21 @@ static int rpi_panel_v2_i2c_probe(struct i2c_client *i2c)
.parent = &i2c->dev,
.reg_set_base = REG_POWERON,
};
+ struct regulator *vcc;
struct regmap *regmap;
struct pwm_chip *pc;
int ret;
+ vcc = devm_regulator_get(&i2c->dev, "vcc");
+ if (IS_ERR(vcc))
+ return dev_err_probe(&i2c->dev, PTR_ERR(vcc),
+ "Failed to get vcc supply\n");
+
+ ret = regulator_enable(vcc);
+ if (ret)
+ return dev_err_probe(&i2c->dev, ret,
+ "Failed to enable vcc supply\n");
+
pc = devm_pwmchip_alloc(&i2c->dev, 1, 0);
if (IS_ERR(pc))
return PTR_ERR(pc);
--
2.34.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH v2 2/2] regulator: rpi-panel-v2: Add required vcc-supply support
2026-09-07 5:46 ` [PATCH v2 2/2] regulator: rpi-panel-v2: Add required vcc-supply support Shashank Maurya
@ 2026-09-07 6:02 ` Marek Vasut
2026-09-07 13:21 ` Dave Stevenson
2026-09-07 17:06 ` Conor Dooley
1 sibling, 1 reply; 12+ messages in thread
From: Marek Vasut @ 2026-09-07 6:02 UTC (permalink / raw)
To: Shashank Maurya, Liam Girdwood, Mark Brown, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Florian Fainelli,
Broadcom internal kernel review list
Cc: linux-kernel, devicetree, linux-rpi-kernel, linux-arm-kernel,
venkata.valluru, Jessica Zhang
On 9/7/26 7:46 AM, Shashank Maurya wrote:
> The Raspberry Pi 7" touchscreen panel V2 MCU requires an external power
> rail to be enabled before any I2C register access is attempted. Use
> devm_regulator_get() to obtain the vcc supply and enable it at the
> start of probe.
Which power rail is this ?
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 2/2] regulator: rpi-panel-v2: Add required vcc-supply support
2026-09-07 6:02 ` Marek Vasut
@ 2026-09-07 13:21 ` Dave Stevenson
0 siblings, 0 replies; 12+ messages in thread
From: Dave Stevenson @ 2026-09-07 13:21 UTC (permalink / raw)
To: Marek Vasut
Cc: Shashank Maurya, Liam Girdwood, Mark Brown, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Florian Fainelli,
Broadcom internal kernel review list, linux-kernel, devicetree,
linux-rpi-kernel, linux-arm-kernel, venkata.valluru,
Jessica Zhang
Hi Shashank and Marek
On Mon, 7 Sept 2026 at 07:12, Marek Vasut <marek.vasut@mailbox.org> wrote:
>
> On 9/7/26 7:46 AM, Shashank Maurya wrote:
> > The Raspberry Pi 7" touchscreen panel V2 MCU requires an external power
> > rail to be enabled before any I2C register access is attempted. Use
> > devm_regulator_get() to obtain the vcc supply and enable it at the
> > start of probe.
> Which power rail is this ?
It'll be the 3.3V rail on the FFC which is used for the MCU, touch
controller, and LCD controller.
The separate 5V supply on the V2 panels is only used for the backlight.
Dave
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 1/2] dt-bindings: regulator: rpi-panel-v2: Add required vcc-supply property
2026-09-07 5:46 ` [PATCH v2 1/2] dt-bindings: regulator: rpi-panel-v2: Add required vcc-supply property Shashank Maurya
@ 2026-09-07 13:24 ` Dave Stevenson
2026-09-07 17:10 ` Conor Dooley
0 siblings, 1 reply; 12+ messages in thread
From: Dave Stevenson @ 2026-09-07 13:24 UTC (permalink / raw)
To: Shashank Maurya
Cc: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Florian Fainelli,
Broadcom internal kernel review list, Marek Vasut, linux-kernel,
devicetree, linux-rpi-kernel, linux-arm-kernel, venkata.valluru,
Jessica Zhang
Hi Shashank
(Apologies for the earlier HTML version of this - I thought I had my
mail client under control)
On Mon, 7 Sept 2026 at 06:48, Shashank Maurya
<shashank.maurya@oss.qualcomm.com> wrote:
>
> Add a vcc-supply property to the Raspberry Pi 7" touchscreen panel V2
> regulator binding and mark it as required. The panel controller MCU
> needs an external power rail to be supplied before any I2C communication
> can take place.
>
> Signed-off-by: Shashank Maurya <shashank.maurya@oss.qualcomm.com>
> ---
> .../regulator/raspberrypi,7inch-touchscreen-panel-regulator-v2.yaml | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/regulator/raspberrypi,7inch-touchscreen-panel-regulator-v2.yaml b/Documentation/devicetree/bindings/regulator/raspberrypi,7inch-touchscreen-panel-regulator-v2.yaml
> index 37b9ed371b67..a6195e53be16 100644
> --- a/Documentation/devicetree/bindings/regulator/raspberrypi,7inch-touchscreen-panel-regulator-v2.yaml
> +++ b/Documentation/devicetree/bindings/regulator/raspberrypi,7inch-touchscreen-panel-regulator-v2.yaml
> @@ -35,6 +35,9 @@ properties:
> const: 3
> description: See ../../pwm/pwm.yaml for description of the cell formats.
>
> + vcc-supply:
> + description: Regulator supplying power to the panel controller.
> +
> additionalProperties: false
>
> required:
> @@ -43,6 +46,7 @@ required:
> - gpio-controller
> - "#gpio-cells"
> - "#pwm-cells"
> + - vcc-supply
Adding a new property as "required" breaks all existing users. Adding
it as optional would be reasonable.
Dave
>
> examples:
> - |
> @@ -55,6 +59,7 @@ examples:
> gpio-controller;
> #gpio-cells = <2>;
> #pwm-cells = <3>;
> + vcc-supply = <&vcc_reg>;
> };
> };
>
>
> --
> 2.34.1
>
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 2/2] regulator: rpi-panel-v2: Add required vcc-supply support
2026-09-07 5:46 ` [PATCH v2 2/2] regulator: rpi-panel-v2: Add required vcc-supply support Shashank Maurya
2026-09-07 6:02 ` Marek Vasut
@ 2026-09-07 17:06 ` Conor Dooley
2026-09-07 17:09 ` Mark Brown
1 sibling, 1 reply; 12+ messages in thread
From: Conor Dooley @ 2026-09-07 17:06 UTC (permalink / raw)
To: Shashank Maurya
Cc: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Florian Fainelli,
Broadcom internal kernel review list, Marek Vasut, linux-kernel,
devicetree, linux-rpi-kernel, linux-arm-kernel, venkata.valluru,
Jessica Zhang
[-- Attachment #1: Type: text/plain, Size: 1938 bytes --]
On Mon, Sep 07, 2026 at 11:16:08AM +0530, Shashank Maurya wrote:
> The Raspberry Pi 7" touchscreen panel V2 MCU requires an external power
> rail to be enabled before any I2C register access is attempted. Use
> devm_regulator_get() to obtain the vcc supply and enable it at the
> start of probe.
>
> Signed-off-by: Shashank Maurya <shashank.maurya@oss.qualcomm.com>
> ---
> drivers/regulator/rpi-panel-v2-regulator.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/drivers/regulator/rpi-panel-v2-regulator.c b/drivers/regulator/rpi-panel-v2-regulator.c
> index 30b78aa75ee3..e54d675962e7 100644
> --- a/drivers/regulator/rpi-panel-v2-regulator.c
> +++ b/drivers/regulator/rpi-panel-v2-regulator.c
> @@ -11,6 +11,7 @@
> #include <linux/module.h>
> #include <linux/pwm.h>
> #include <linux/regmap.h>
> +#include <linux/regulator/consumer.h>
>
> /* I2C registers of the microcontroller. */
> #define REG_ID 0x01
> @@ -66,10 +67,21 @@ static int rpi_panel_v2_i2c_probe(struct i2c_client *i2c)
> .parent = &i2c->dev,
> .reg_set_base = REG_POWERON,
> };
> + struct regulator *vcc;
> struct regmap *regmap;
> struct pwm_chip *pc;
> int ret;
>
> + vcc = devm_regulator_get(&i2c->dev, "vcc");
> + if (IS_ERR(vcc))
> + return dev_err_probe(&i2c->dev, PTR_ERR(vcc),
> + "Failed to get vcc supply\n");
> +
> + ret = regulator_enable(vcc);
> + if (ret)
> + return dev_err_probe(&i2c->dev, ret,
> + "Failed to enable vcc supply\n");
This needs to be optional, because without it you'll break existing
devicetrees. Unless you can explain how all existing users are
nonfunctional (e.g. nothing ever enabled the supply, which seems
doubtful given this surely worked when it was added) this must remain
optional.
> +
> pc = devm_pwmchip_alloc(&i2c->dev, 1, 0);
> if (IS_ERR(pc))
> return PTR_ERR(pc);
>
> --
> 2.34.1
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 2/2] regulator: rpi-panel-v2: Add required vcc-supply support
2026-09-07 17:06 ` Conor Dooley
@ 2026-09-07 17:09 ` Mark Brown
2026-09-07 18:04 ` Conor Dooley
0 siblings, 1 reply; 12+ messages in thread
From: Mark Brown @ 2026-09-07 17:09 UTC (permalink / raw)
To: Conor Dooley
Cc: Shashank Maurya, Liam Girdwood, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Florian Fainelli,
Broadcom internal kernel review list, Marek Vasut, linux-kernel,
devicetree, linux-rpi-kernel, linux-arm-kernel, venkata.valluru,
Jessica Zhang
[-- Attachment #1: Type: text/plain, Size: 801 bytes --]
On Mon, Sep 07, 2026 at 06:06:24PM +0100, Conor Dooley wrote:
> On Mon, Sep 07, 2026 at 11:16:08AM +0530, Shashank Maurya wrote:
> > + vcc = devm_regulator_get(&i2c->dev, "vcc");
> > + if (IS_ERR(vcc))
> > + return dev_err_probe(&i2c->dev, PTR_ERR(vcc),
> > + "Failed to get vcc supply\n");
> This needs to be optional, because without it you'll break existing
> devicetrees. Unless you can explain how all existing users are
> nonfunctional (e.g. nothing ever enabled the supply, which seems
> doubtful given this surely worked when it was added) this must remain
> optional.
The core will stub in a dummy regulator for mandatory supplies that
don't have anything mapped by firmware, otherwise essentially all
regualtors would be optional and our error handling would be a disaster
zone.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 1/2] dt-bindings: regulator: rpi-panel-v2: Add required vcc-supply property
2026-09-07 13:24 ` Dave Stevenson
@ 2026-09-07 17:10 ` Conor Dooley
2026-09-11 5:42 ` Shashank Maurya
0 siblings, 1 reply; 12+ messages in thread
From: Conor Dooley @ 2026-09-07 17:10 UTC (permalink / raw)
To: Dave Stevenson
Cc: Shashank Maurya, Liam Girdwood, Mark Brown, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Florian Fainelli,
Broadcom internal kernel review list, Marek Vasut, linux-kernel,
devicetree, linux-rpi-kernel, linux-arm-kernel, venkata.valluru,
Jessica Zhang
[-- Attachment #1: Type: text/plain, Size: 2243 bytes --]
On Mon, Sep 07, 2026 at 02:24:09PM +0100, Dave Stevenson wrote:
> Hi Shashank
>
> (Apologies for the earlier HTML version of this - I thought I had my
> mail client under control)
>
> On Mon, 7 Sept 2026 at 06:48, Shashank Maurya
> <shashank.maurya@oss.qualcomm.com> wrote:
> >
> > Add a vcc-supply property to the Raspberry Pi 7" touchscreen panel V2
> > regulator binding and mark it as required. The panel controller MCU
> > needs an external power rail to be supplied before any I2C communication
> > can take place.
> >
> > Signed-off-by: Shashank Maurya <shashank.maurya@oss.qualcomm.com>
> > ---
> > .../regulator/raspberrypi,7inch-touchscreen-panel-regulator-v2.yaml | 5 +++++
> > 1 file changed, 5 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/regulator/raspberrypi,7inch-touchscreen-panel-regulator-v2.yaml b/Documentation/devicetree/bindings/regulator/raspberrypi,7inch-touchscreen-panel-regulator-v2.yaml
> > index 37b9ed371b67..a6195e53be16 100644
> > --- a/Documentation/devicetree/bindings/regulator/raspberrypi,7inch-touchscreen-panel-regulator-v2.yaml
> > +++ b/Documentation/devicetree/bindings/regulator/raspberrypi,7inch-touchscreen-panel-regulator-v2.yaml
> > @@ -35,6 +35,9 @@ properties:
> > const: 3
> > description: See ../../pwm/pwm.yaml for description of the cell formats.
> >
> > + vcc-supply:
> > + description: Regulator supplying power to the panel controller.
> > +
> > additionalProperties: false
> >
> > required:
> > @@ -43,6 +46,7 @@ required:
> > - gpio-controller
> > - "#gpio-cells"
> > - "#pwm-cells"
> > + - vcc-supply
>
> Adding a new property as "required" breaks all existing users. Adding
> it as optional would be reasonable.
It can be made required here, but never in the driver. If it's actually
required that something turn this on before the device can be used,
making it required is probably correct.
>
> Dave
>
> >
> > examples:
> > - |
> > @@ -55,6 +59,7 @@ examples:
> > gpio-controller;
> > #gpio-cells = <2>;
> > #pwm-cells = <3>;
> > + vcc-supply = <&vcc_reg>;
> > };
> > };
> >
> >
> > --
> > 2.34.1
> >
> >
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 2/2] regulator: rpi-panel-v2: Add required vcc-supply support
2026-09-07 17:09 ` Mark Brown
@ 2026-09-07 18:04 ` Conor Dooley
2026-09-11 5:16 ` Shashank Maurya
0 siblings, 1 reply; 12+ messages in thread
From: Conor Dooley @ 2026-09-07 18:04 UTC (permalink / raw)
To: Mark Brown
Cc: Shashank Maurya, Liam Girdwood, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Florian Fainelli,
Broadcom internal kernel review list, Marek Vasut, linux-kernel,
devicetree, linux-rpi-kernel, linux-arm-kernel, venkata.valluru,
Jessica Zhang
[-- Attachment #1: Type: text/plain, Size: 980 bytes --]
On Mon, Sep 07, 2026 at 06:09:57PM +0100, Mark Brown wrote:
> On Mon, Sep 07, 2026 at 06:06:24PM +0100, Conor Dooley wrote:
> > On Mon, Sep 07, 2026 at 11:16:08AM +0530, Shashank Maurya wrote:
>
> > > + vcc = devm_regulator_get(&i2c->dev, "vcc");
> > > + if (IS_ERR(vcc))
> > > + return dev_err_probe(&i2c->dev, PTR_ERR(vcc),
> > > + "Failed to get vcc supply\n");
>
> > This needs to be optional, because without it you'll break existing
> > devicetrees. Unless you can explain how all existing users are
> > nonfunctional (e.g. nothing ever enabled the supply, which seems
> > doubtful given this surely worked when it was added) this must remain
> > optional.
>
> The core will stub in a dummy regulator for mandatory supplies that
> don't have anything mapped by firmware, otherwise essentially all
> regualtors would be optional and our error handling would be a disaster
> zone.
I always forget how this works. Thanks for the reminder.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 2/2] regulator: rpi-panel-v2: Add required vcc-supply support
2026-09-07 18:04 ` Conor Dooley
@ 2026-09-11 5:16 ` Shashank Maurya
0 siblings, 0 replies; 12+ messages in thread
From: Shashank Maurya @ 2026-09-11 5:16 UTC (permalink / raw)
To: Conor Dooley
Cc: Mark Brown, Liam Girdwood, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Florian Fainelli,
Broadcom internal kernel review list, Marek Vasut, linux-kernel,
devicetree, linux-rpi-kernel, linux-arm-kernel, venkata.valluru,
Jessica Zhang
On Mon, Sep 07, 2026 at 07:04:21PM +0100, Conor Dooley wrote:
> On Mon, Sep 07, 2026 at 06:09:57PM +0100, Mark Brown wrote:
> > On Mon, Sep 07, 2026 at 06:06:24PM +0100, Conor Dooley wrote:
> > > On Mon, Sep 07, 2026 at 11:16:08AM +0530, Shashank Maurya wrote:
> >
> > > > + vcc = devm_regulator_get(&i2c->dev, "vcc");
> > > > + if (IS_ERR(vcc))
> > > > + return dev_err_probe(&i2c->dev, PTR_ERR(vcc),
> > > > + "Failed to get vcc supply\n");
> >
> > > This needs to be optional, because without it you'll break existing
> > > devicetrees. Unless you can explain how all existing users are
> > > nonfunctional (e.g. nothing ever enabled the supply, which seems
> > > doubtful given this surely worked when it was added) this must remain
> > > optional.
> >
> > The core will stub in a dummy regulator for mandatory supplies that
> > don't have anything mapped by firmware, otherwise essentially all
> > regualtors would be optional and our error handling would be a disaster
> > zone.
>
> I always forget how this works. Thanks for the reminder.
>
>
Thanks Mark and Conor for the clarification.
To summarize: the binding marks vcc-supply as required
(since the hardware genuinely needs this rail), and the driver uses
devm_regulator_get() which lets the regulator core provide a dummy
stub for existing devicetrees that don't specify the supply.
This keeps backward compatibility intact.
Is the series good to go as-is, or is there anything else you'd like
me to address in a v3?
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 1/2] dt-bindings: regulator: rpi-panel-v2: Add required vcc-supply property
2026-09-07 17:10 ` Conor Dooley
@ 2026-09-11 5:42 ` Shashank Maurya
0 siblings, 0 replies; 12+ messages in thread
From: Shashank Maurya @ 2026-09-11 5:42 UTC (permalink / raw)
To: Conor Dooley
Cc: Dave Stevenson, Liam Girdwood, Mark Brown, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Florian Fainelli,
Broadcom internal kernel review list, Marek Vasut, linux-kernel,
devicetree, linux-rpi-kernel, linux-arm-kernel, venkata.valluru,
Jessica Zhang
On Mon, Sep 07, 2026 at 06:10:36PM +0100, Conor Dooley wrote:
> On Mon, Sep 07, 2026 at 02:24:09PM +0100, Dave Stevenson wrote:
> > Hi Shashank
> >
> > (Apologies for the earlier HTML version of this - I thought I had my
> > mail client under control)
> >
> > On Mon, 7 Sept 2026 at 06:48, Shashank Maurya
> > <shashank.maurya@oss.qualcomm.com> wrote:
> > >
> > > Add a vcc-supply property to the Raspberry Pi 7" touchscreen panel V2
> > > regulator binding and mark it as required. The panel controller MCU
> > > needs an external power rail to be supplied before any I2C communication
> > > can take place.
> > >
> > > Signed-off-by: Shashank Maurya <shashank.maurya@oss.qualcomm.com>
> > > ---
> > > .../regulator/raspberrypi,7inch-touchscreen-panel-regulator-v2.yaml | 5 +++++
> > > 1 file changed, 5 insertions(+)
> > >
> > > diff --git a/Documentation/devicetree/bindings/regulator/raspberrypi,7inch-touchscreen-panel-regulator-v2.yaml b/Documentation/devicetree/bindings/regulator/raspberrypi,7inch-touchscreen-panel-regulator-v2.yaml
> > > index 37b9ed371b67..a6195e53be16 100644
> > > --- a/Documentation/devicetree/bindings/regulator/raspberrypi,7inch-touchscreen-panel-regulator-v2.yaml
> > > +++ b/Documentation/devicetree/bindings/regulator/raspberrypi,7inch-touchscreen-panel-regulator-v2.yaml
> > > @@ -35,6 +35,9 @@ properties:
> > > const: 3
> > > description: See ../../pwm/pwm.yaml for description of the cell formats.
> > >
> > > + vcc-supply:
> > > + description: Regulator supplying power to the panel controller.
> > > +
> > > additionalProperties: false
> > >
> > > required:
> > > @@ -43,6 +46,7 @@ required:
> > > - gpio-controller
> > > - "#gpio-cells"
> > > - "#pwm-cells"
> > > + - vcc-supply
> >
> > Adding a new property as "required" breaks all existing users. Adding
> > it as optional would be reasonable.
>
> It can be made required here, but never in the driver. If it's actually
> required that something turn this on before the device can be used,
> making it required is probably correct.
Thanks Dave for clarification. I also see one existing consumer of this
regulator driver: arch/arm64/boot/dts/renesas/r8a779g3-sparrow-hawk-rpi-display-2.dtsi
So, adding required in bindings will fail for this user.
Apologies, I didn't notice this earlier.
>
> >
> > Dave
> >
> > >
> > > examples:
> > > - |
> > > @@ -55,6 +59,7 @@ examples:
> > > gpio-controller;
> > > #gpio-cells = <2>;
> > > #pwm-cells = <3>;
> > > + vcc-supply = <&vcc_reg>;
> > > };
> > > };
> > >
> > >
> > > --
> > > 2.34.1
> > >
> > >
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2026-09-11 5:42 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-07 5:46 [PATCH v2 0/2] regulator: rpi-panel-v2: Add required vcc-supply Shashank Maurya
2026-09-07 5:46 ` [PATCH v2 1/2] dt-bindings: regulator: rpi-panel-v2: Add required vcc-supply property Shashank Maurya
2026-09-07 13:24 ` Dave Stevenson
2026-09-07 17:10 ` Conor Dooley
2026-09-11 5:42 ` Shashank Maurya
2026-09-07 5:46 ` [PATCH v2 2/2] regulator: rpi-panel-v2: Add required vcc-supply support Shashank Maurya
2026-09-07 6:02 ` Marek Vasut
2026-09-07 13:21 ` Dave Stevenson
2026-09-07 17:06 ` Conor Dooley
2026-09-07 17:09 ` Mark Brown
2026-09-07 18:04 ` Conor Dooley
2026-09-11 5:16 ` Shashank Maurya
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox