linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH fbdev-for-next 1/2] dt-bindings: display: ssd1307fb: Add reset-active-low property
@ 2018-11-02 14:56 Vokáč Michal
  2018-11-02 14:56 ` [PATCH fbdev-for-next 2/2] video: ssd1307fb: Add support for the " Vokáč Michal
  0 siblings, 1 reply; 7+ messages in thread
From: Vokáč Michal @ 2018-11-02 14:56 UTC (permalink / raw)
  To: Rob Herring, Bartlomiej Zolnierkiewicz
  Cc: linux-fbdev, linux-kernel, devicetree, Jyri Sarha,
	Vokáč Michal

This reverts commit 519b4dba586198eed8f72ba07bc71808af2e0e32.
It is true that the actual implementation has never been there. But
contrary to what the reverted commit message says it does make sense
to add it.

Current implementation of the reset signal is hard-coded to active low
with the assumption that reset-gpios is specified as GPIO_ACTIVE_HIGH.
That is technically wrong as the DTS authors should know that SSD130x
displays need active low reset and hence they are temped to use
GPIO_ACTIVE_LOW. But with that the reset is broken. So reset-acive-low
property can be used to invert the signal once again to fix this.

Signed-off-by: Michal Vokáč <michal.vokac@ysoft.com>
---
 Documentation/devicetree/bindings/display/ssd1307fb.txt | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/display/ssd1307fb.txt b/Documentation/devicetree/bindings/display/ssd1307fb.txt
index 209d931..a5ead10 100644
--- a/Documentation/devicetree/bindings/display/ssd1307fb.txt
+++ b/Documentation/devicetree/bindings/display/ssd1307fb.txt
@@ -16,6 +16,8 @@ Required properties:
 Optional properties:
   - reset-gpios: The GPIO used to reset the OLED display, if available. See
                  Documentation/devicetree/bindings/gpio/gpio.txt for details.
+  - reset-active-low: Bool flag to indicate the GPIO specified in "reset-gpios"
+                      property is active low.
   - vbat-supply: The supply for VBAT
   - solomon,segment-no-remap: Display needs normal (non-inverted) data column
                               to segment mapping
@@ -35,7 +37,7 @@ ssd1307: oled@3c {
         compatible = "solomon,ssd1307fb-i2c";
         reg = <0x3c>;
         pwms = <&pwm 4 3000>;
-        reset-gpios = <&gpio2 7>;
+        reset-gpios = <&gpio2 7 GPIO_ACTIVE_LOW>;
         reset-active-low;
 };
 
@@ -43,7 +45,7 @@ ssd1306: oled@3c {
         compatible = "solomon,ssd1306fb-i2c";
         reg = <0x3c>;
         pwms = <&pwm 4 3000>;
-        reset-gpios = <&gpio2 7>;
+        reset-gpios = <&gpio2 7 GPIO_ACTIVE_LOW>;
         reset-active-low;
         solomon,com-lrremap;
         solomon,com-invdir;
-- 
2.1.4


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

end of thread, other threads:[~2018-11-26 14:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-02 14:56 [PATCH fbdev-for-next 1/2] dt-bindings: display: ssd1307fb: Add reset-active-low property Vokáč Michal
2018-11-02 14:56 ` [PATCH fbdev-for-next 2/2] video: ssd1307fb: Add support for the " Vokáč Michal
     [not found]   ` <5bea0e9c.1c69fb81.1f3c8.be5a@mx.google.com>
2018-11-19 15:12     ` Vokáč Michal
2018-11-19 22:32       ` Rob Herring
2018-11-26 12:25         ` Vokáč Michal
2018-11-26 13:49           ` Rob Herring
2018-11-26 14:20             ` Vokáč Michal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).