All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] drm/mipi-dbi: Support separate I/O regulator
@ 2022-11-25 17:31 Otto Pflüger
  2022-11-25 17:51 ` [PATCH 3/4] dt-bindings: display: panel: mipi-dbi-spi: Add missing property Otto Pflüger
  0 siblings, 1 reply; 5+ messages in thread
From: Otto Pflüger @ 2022-11-25 17:31 UTC (permalink / raw)
  To: Noralf Trønnes, Thierry Reding, Sam Ravnborg, David Airlie,
	Daniel Vetter, Rob Herring, Krzysztof Kozlowski,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, dri-devel,
	devicetree, linux-kernel

The MIPI DBI specification defines separate vdd (panel power) and
vddi (I/O power) supplies. Displays that require different voltages
for the different supplies do exist, so the supplies cannot be
combined into one as they are now. Add a new io_regulator property to
the mipi_dbi_dev struct which can be set by the panel driver along
with the regulator property.

Signed-off-by: Otto Pflüger <affenull2345@gmail.com>
---
  drivers/gpu/drm/drm_mipi_dbi.c | 14 ++++++++++++++
  include/drm/drm_mipi_dbi.h     |  7 ++++++-
  2 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_mipi_dbi.c b/drivers/gpu/drm/drm_mipi_dbi.c
index a6ac56580876..047cab93a041 100644
--- a/drivers/gpu/drm/drm_mipi_dbi.c
+++ b/drivers/gpu/drm/drm_mipi_dbi.c
@@ -427,6 +427,8 @@ void mipi_dbi_pipe_disable(struct 
drm_simple_display_pipe *pipe)

  	if (dbidev->regulator)
  		regulator_disable(dbidev->regulator);
+	if (dbidev->io_regulator)
+		regulator_disable(dbidev->io_regulator);
  }
  EXPORT_SYMBOL(mipi_dbi_pipe_disable);

@@ -652,6 +654,16 @@ static int 
mipi_dbi_poweron_reset_conditional(struct mipi_dbi_dev *dbidev, bool
  		}
  	}

+	if (dbidev->io_regulator) {
+		ret = regulator_enable(dbidev->io_regulator);
+		if (ret) {
+			DRM_DEV_ERROR(dev, "Failed to enable I/O regulator (%d)\n", ret);
+			if (dbidev->regulator)
+				regulator_disable(dbidev->regulator);
+			return ret;
+		}
+	}
+
  	if (cond && mipi_dbi_display_is_on(dbi))
  		return 1;

@@ -661,6 +673,8 @@ static int mipi_dbi_poweron_reset_conditional(struct 
mipi_dbi_dev *dbidev, bool
  		DRM_DEV_ERROR(dev, "Failed to send reset command (%d)\n", ret);
  		if (dbidev->regulator)
  			regulator_disable(dbidev->regulator);
+		if (dbidev->io_regulator)
+			regulator_disable(dbidev->io_regulator);
  		return ret;
  	}

diff --git a/include/drm/drm_mipi_dbi.h b/include/drm/drm_mipi_dbi.h
index 14eaecb1825c..e4efbd8ffc9d 100644
--- a/include/drm/drm_mipi_dbi.h
+++ b/include/drm/drm_mipi_dbi.h
@@ -122,10 +122,15 @@ struct mipi_dbi_dev {
  	struct backlight_device *backlight;

  	/**
-	 * @regulator: power regulator (optional)
+	 * @regulator: power regulator (Vdd) (optional)
  	 */
  	struct regulator *regulator;

+	/**
+	 * @io_regulator: I/O power regulator (Vddi) (optional)
+	 */
+	struct regulator *io_regulator;
+
  	/**
  	 * @dbi: MIPI DBI interface
  	 */
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 3/4] dt-bindings: display: panel: mipi-dbi-spi: Add missing property
  2022-11-25 17:31 [PATCH 1/4] drm/mipi-dbi: Support separate I/O regulator Otto Pflüger
@ 2022-11-25 17:51 ` Otto Pflüger
  2022-11-25 17:57   ` Otto Pflüger
  0 siblings, 1 reply; 5+ messages in thread
From: Otto Pflüger @ 2022-11-25 17:51 UTC (permalink / raw)
  To: Noralf Trønnes, Thierry Reding, Sam Ravnborg, David Airlie,
	Daniel Vetter, Rob Herring, Krzysztof Kozlowski,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, dri-devel,
	devicetree, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 906 bytes --]

The power-supply property is currently only mentioned in the description 
and not documented in the properties section as it should be. Add it 
there. Signed-off-by: Otto Pflüger --- 
.../devicetree/bindings/display/panel/panel-mipi-dbi-spi.yaml | 3 +++ 1 
file changed, 3 insertions(+) diff --git 
a/Documentation/devicetree/bindings/display/panel/panel-mipi-dbi-spi.yaml 
b/Documentation/devicetree/bindings/display/panel/panel-mipi-dbi-spi.yaml 
index c2df8d28aaf5..d55bf12ecead 100644 --- 
a/Documentation/devicetree/bindings/display/panel/panel-mipi-dbi-spi.yaml+++ 
b/Documentation/devicetree/bindings/display/panel/panel-mipi-dbi-spi.yaml 
@@ -80,6 +80,9 @@ properties: Controller data/command selection (D/CX) 
in 4-line SPI mode. If not set, the controller is in 3-line SPI mode. + 
power-supply: + description: Power supply for the display module (Vdd). 
+ required: - compatible - reg -- 2.30.2

[-- Attachment #2: Type: text/html, Size: 1161 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 3/4] dt-bindings: display: panel: mipi-dbi-spi: Add missing property
  2022-11-25 17:51 ` [PATCH 3/4] dt-bindings: display: panel: mipi-dbi-spi: Add missing property Otto Pflüger
@ 2022-11-25 17:57   ` Otto Pflüger
  2022-11-25 18:16     ` Affe null
  0 siblings, 1 reply; 5+ messages in thread
From: Otto Pflüger @ 2022-11-25 17:57 UTC (permalink / raw)
  To: Noralf Trønnes, Thierry Reding, Sam Ravnborg, David Airlie,
	Daniel Vetter, Rob Herring, Krzysztof Kozlowski,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, dri-devel,
	devicetree, linux-kernel

The power-supply property is currently only mentioned in the 
description, but not listed in the properties section as it should be. 
Add it there. Signed-off-by: Otto Pflüger --- 
.../devicetree/bindings/display/panel/panel-mipi-dbi-spi.yaml | 3 +++ 1 
file changed, 3 insertions(+) diff --git 
a/Documentation/devicetree/bindings/display/panel/panel-mipi-dbi-spi.yaml 
b/Documentation/devicetree/bindings/display/panel/panel-mipi-dbi-spi.yaml 
index c2df8d28aaf5..d55bf12ecead 100644 --- 
a/Documentation/devicetree/bindings/display/panel/panel-mipi-dbi-spi.yaml+++ 
b/Documentation/devicetree/bindings/display/panel/panel-mipi-dbi-spi.yaml 
@@ -80,6 +80,9 @@ properties: Controller data/command selection (D/CX) 
in 4-line SPI mode. If not set, the controller is in 3-line SPI mode. + 
power-supply: + description: Power supply for the display module (Vdd). 
+ required: - compatible - reg -- 2.30.2

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 3/4] dt-bindings: display: panel: mipi-dbi-spi: Add missing property
  2022-11-25 17:57   ` Otto Pflüger
@ 2022-11-25 18:16     ` Affe null
  2022-11-27 12:52       ` Krzysztof Kozlowski
  0 siblings, 1 reply; 5+ messages in thread
From: Affe null @ 2022-11-25 18:16 UTC (permalink / raw)
  To: Noralf Trønnes, Thierry Reding, Sam Ravnborg, David Airlie,
	Daniel Vetter, Rob Herring, Krzysztof Kozlowski,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, dri-devel,
	devicetree, linux-kernel

Sorry for the spam, unfortunately I can use neither git-send-email nor
Mutt with GMail, so I had to use Thunderbird for sending the patches.

Regards,
Otto Pflüger

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 3/4] dt-bindings: display: panel: mipi-dbi-spi: Add missing property
  2022-11-25 18:16     ` Affe null
@ 2022-11-27 12:52       ` Krzysztof Kozlowski
  0 siblings, 0 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2022-11-27 12:52 UTC (permalink / raw)
  To: Affe null, Noralf Trønnes, Thierry Reding, Sam Ravnborg,
	David Airlie, Daniel Vetter, Rob Herring, Krzysztof Kozlowski,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, dri-devel,
	devicetree, linux-kernel

On 25/11/2022 19:16, Affe null wrote:
> Sorry for the spam, unfortunately I can use neither git-send-email nor
> Mutt with GMail, so I had to use Thunderbird for sending the patches.

GMail does not have problem with git send-email or mutt (I was using it
a lot), so you need to fix your setup. Unfortunately some of the patches
are heavily corrupted.

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-11-27 12:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-25 17:31 [PATCH 1/4] drm/mipi-dbi: Support separate I/O regulator Otto Pflüger
2022-11-25 17:51 ` [PATCH 3/4] dt-bindings: display: panel: mipi-dbi-spi: Add missing property Otto Pflüger
2022-11-25 17:57   ` Otto Pflüger
2022-11-25 18:16     ` Affe null
2022-11-27 12:52       ` Krzysztof Kozlowski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.