All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/5] fbdev/ssd1307fb: Some changes and improvement
@ 2017-01-13 10:35   ` Jyri Sarha
  0 siblings, 0 replies; 28+ messages in thread
From: Jyri Sarha @ 2017-01-13 10:35 UTC (permalink / raw)
  To: linux-fbdev-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	b.zolnierkie-Sze3O3UU22JBDgjK7y7TUQ
  Cc: robh+dt-DgEjT+Ai2ygdnm+yROfE0A, tomi.valkeinen-l0cyMroinI0,
	maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8,
	bcousson-rdvid1DuHRBWk0Htik3J/w, Jyri Sarha

Changes since first version:
- Cherry-picked "fbdev/ssd1307fb: add support to enable VBAT" again
  beacuse of weird mixup in the first version
- Also tested the code on top of v4.10-rc3 with am335x-icev2 evm

We needed these changes for couple of our evm. Some of these patches
have been on mainline list before, but after that forgotten. Now we
are forward porting these on for out internal release, so this is a
good time to get them to mainline too.

Everything else is quite straight forward, but removing the
reset-active-low dts property is a questionable at least in
theory. However, in practice if anyone was using the property in their
device-tree blobs, they have never been able to get desired effect
with mainline kernel.

Jyri Sarha (3):
  fbdev: ssd1307fb: Start to use gpiod API for reset gpio
  fbdev: ssd1307fb: Remove reset-active-low from the DT binding document
  fbdev: ssd1307fb: Make reset gpio devicetree property optional

Tomi Valkeinen (2):
  fbdev/ssd1307fb: add support to enable VBAT
  fbdev/ssd1307fb: clear screen in probe

 .../devicetree/bindings/display/ssd1307fb.txt      |  5 +-
 drivers/video/fbdev/ssd1307fb.c                    | 55 ++++++++++++++--------
 2 files changed, 38 insertions(+), 22 deletions(-)

-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH v2 0/5] fbdev/ssd1307fb: Some changes and improvement
@ 2017-01-13 10:35   ` Jyri Sarha
  0 siblings, 0 replies; 28+ messages in thread
From: Jyri Sarha @ 2017-01-13 10:35 UTC (permalink / raw)
  To: linux-fbdev-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	b.zolnierkie-Sze3O3UU22JBDgjK7y7TUQ
  Cc: robh+dt-DgEjT+Ai2ygdnm+yROfE0A, tomi.valkeinen-l0cyMroinI0,
	maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8,
	bcousson-rdvid1DuHRBWk0Htik3J/w, Jyri Sarha

Changes since first version:
- Cherry-picked "fbdev/ssd1307fb: add support to enable VBAT" again
  beacuse of weird mixup in the first version
- Also tested the code on top of v4.10-rc3 with am335x-icev2 evm

We needed these changes for couple of our evm. Some of these patches
have been on mainline list before, but after that forgotten. Now we
are forward porting these on for out internal release, so this is a
good time to get them to mainline too.

Everything else is quite straight forward, but removing the
reset-active-low dts property is a questionable at least in
theory. However, in practice if anyone was using the property in their
device-tree blobs, they have never been able to get desired effect
with mainline kernel.

Jyri Sarha (3):
  fbdev: ssd1307fb: Start to use gpiod API for reset gpio
  fbdev: ssd1307fb: Remove reset-active-low from the DT binding document
  fbdev: ssd1307fb: Make reset gpio devicetree property optional

Tomi Valkeinen (2):
  fbdev/ssd1307fb: add support to enable VBAT
  fbdev/ssd1307fb: clear screen in probe

 .../devicetree/bindings/display/ssd1307fb.txt      |  5 +-
 drivers/video/fbdev/ssd1307fb.c                    | 55 ++++++++++++++--------
 2 files changed, 38 insertions(+), 22 deletions(-)

-- 
1.9.1


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

* [PATCH v2 1/5] fbdev: ssd1307fb: Start to use gpiod API for reset gpio
       [not found]   ` <cover.1484303628.git.jsarha-l0cyMroinI0@public.gmane.org>
@ 2017-01-13 10:35       ` Jyri Sarha
  2017-01-13 10:35       ` Jyri Sarha
                         ` (4 subsequent siblings)
  5 siblings, 0 replies; 28+ messages in thread
From: Jyri Sarha @ 2017-01-13 10:35 UTC (permalink / raw)
  To: linux-fbdev-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	b.zolnierkie-Sze3O3UU22JBDgjK7y7TUQ
  Cc: robh+dt-DgEjT+Ai2ygdnm+yROfE0A, tomi.valkeinen-l0cyMroinI0,
	maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8,
	bcousson-rdvid1DuHRBWk0Htik3J/w, Jyri Sarha

Start to use gpiod API for reset gpio.

Signed-off-by: Jyri Sarha <jsarha-l0cyMroinI0@public.gmane.org>
---
 drivers/video/fbdev/ssd1307fb.c | 25 ++++++++-----------------
 1 file changed, 8 insertions(+), 17 deletions(-)

diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev/ssd1307fb.c
index 2925d5c..8ffaaee 100644
--- a/drivers/video/fbdev/ssd1307fb.c
+++ b/drivers/video/fbdev/ssd1307fb.c
@@ -73,7 +73,7 @@ struct ssd1307fb_par {
 	u32 prechargep2;
 	struct pwm_device *pwm;
 	u32 pwm_period;
-	int reset;
+	struct gpio_desc *reset;
 	u32 seg_remap;
 	u32 vcomh;
 	u32 width;
@@ -561,10 +561,11 @@ static int ssd1307fb_probe(struct i2c_client *client,
 
 	par->device_info = of_device_get_match_data(&client->dev);
 
-	par->reset = of_get_named_gpio(client->dev.of_node,
-					 "reset-gpios", 0);
-	if (!gpio_is_valid(par->reset)) {
-		ret = -EINVAL;
+	par->reset = devm_gpiod_get(&client->dev, "reset", GPIOD_OUT_LOW);
+	if (IS_ERR(par->reset)) {
+		dev_err(&client->dev, "failed to get reset gpio: %ld\n",
+			PTR_ERR(par->reset));
+		ret = PTR_ERR(par->reset);
 		goto fb_alloc_error;
 	}
 
@@ -642,22 +643,12 @@ static int ssd1307fb_probe(struct i2c_client *client,
 
 	fb_deferred_io_init(info);
 
-	ret = devm_gpio_request_one(&client->dev, par->reset,
-				    GPIOF_OUT_INIT_HIGH,
-				    "oled-reset");
-	if (ret) {
-		dev_err(&client->dev,
-			"failed to request gpio %d: %d\n",
-			par->reset, ret);
-		goto reset_oled_error;
-	}
-
 	i2c_set_clientdata(client, info);
 
 	/* Reset the screen */
-	gpio_set_value(par->reset, 0);
+	gpiod_set_value(par->reset, 0);
 	udelay(4);
-	gpio_set_value(par->reset, 1);
+	gpiod_set_value(par->reset, 1);
 	udelay(4);
 
 	ret = ssd1307fb_init(par);
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH v2 1/5] fbdev: ssd1307fb: Start to use gpiod API for reset gpio
@ 2017-01-13 10:35       ` Jyri Sarha
  0 siblings, 0 replies; 28+ messages in thread
From: Jyri Sarha @ 2017-01-13 10:35 UTC (permalink / raw)
  To: linux-fbdev-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	b.zolnierkie-Sze3O3UU22JBDgjK7y7TUQ
  Cc: robh+dt-DgEjT+Ai2ygdnm+yROfE0A, tomi.valkeinen-l0cyMroinI0,
	maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8,
	bcousson-rdvid1DuHRBWk0Htik3J/w, Jyri Sarha

Start to use gpiod API for reset gpio.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
---
 drivers/video/fbdev/ssd1307fb.c | 25 ++++++++-----------------
 1 file changed, 8 insertions(+), 17 deletions(-)

diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev/ssd1307fb.c
index 2925d5c..8ffaaee 100644
--- a/drivers/video/fbdev/ssd1307fb.c
+++ b/drivers/video/fbdev/ssd1307fb.c
@@ -73,7 +73,7 @@ struct ssd1307fb_par {
 	u32 prechargep2;
 	struct pwm_device *pwm;
 	u32 pwm_period;
-	int reset;
+	struct gpio_desc *reset;
 	u32 seg_remap;
 	u32 vcomh;
 	u32 width;
@@ -561,10 +561,11 @@ static int ssd1307fb_probe(struct i2c_client *client,
 
 	par->device_info = of_device_get_match_data(&client->dev);
 
-	par->reset = of_get_named_gpio(client->dev.of_node,
-					 "reset-gpios", 0);
-	if (!gpio_is_valid(par->reset)) {
-		ret = -EINVAL;
+	par->reset = devm_gpiod_get(&client->dev, "reset", GPIOD_OUT_LOW);
+	if (IS_ERR(par->reset)) {
+		dev_err(&client->dev, "failed to get reset gpio: %ld\n",
+			PTR_ERR(par->reset));
+		ret = PTR_ERR(par->reset);
 		goto fb_alloc_error;
 	}
 
@@ -642,22 +643,12 @@ static int ssd1307fb_probe(struct i2c_client *client,
 
 	fb_deferred_io_init(info);
 
-	ret = devm_gpio_request_one(&client->dev, par->reset,
-				    GPIOF_OUT_INIT_HIGH,
-				    "oled-reset");
-	if (ret) {
-		dev_err(&client->dev,
-			"failed to request gpio %d: %d\n",
-			par->reset, ret);
-		goto reset_oled_error;
-	}
-
 	i2c_set_clientdata(client, info);
 
 	/* Reset the screen */
-	gpio_set_value(par->reset, 0);
+	gpiod_set_value(par->reset, 0);
 	udelay(4);
-	gpio_set_value(par->reset, 1);
+	gpiod_set_value(par->reset, 1);
 	udelay(4);
 
 	ret = ssd1307fb_init(par);
-- 
1.9.1


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

* [PATCH v2 2/5] fbdev: ssd1307fb: Remove reset-active-low from the DT binding document
       [not found]   ` <cover.1484303628.git.jsarha-l0cyMroinI0@public.gmane.org>
@ 2017-01-13 10:35       ` Jyri Sarha
  2017-01-13 10:35       ` Jyri Sarha
                         ` (4 subsequent siblings)
  5 siblings, 0 replies; 28+ messages in thread
From: Jyri Sarha @ 2017-01-13 10:35 UTC (permalink / raw)
  To: linux-fbdev-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	b.zolnierkie-Sze3O3UU22JBDgjK7y7TUQ
  Cc: robh+dt-DgEjT+Ai2ygdnm+yROfE0A, tomi.valkeinen-l0cyMroinI0,
	maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8,
	bcousson-rdvid1DuHRBWk0Htik3J/w, Jyri Sarha

Remove reset-active-low from the devicetree binding document. The actual
implementation has never been there in the driver code and there is no
reason to add it because the gpiod API supports gpio flags, including
GPIO_ACTIVE_LOW, directly trough its own devicetree binding.

Signed-off-by: Jyri Sarha <jsarha-l0cyMroinI0@public.gmane.org>
---
 Documentation/devicetree/bindings/display/ssd1307fb.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/display/ssd1307fb.txt b/Documentation/devicetree/bindings/display/ssd1307fb.txt
index eb31ed4..4aee67f 100644
--- a/Documentation/devicetree/bindings/display/ssd1307fb.txt
+++ b/Documentation/devicetree/bindings/display/ssd1307fb.txt
@@ -8,14 +8,14 @@ Required properties:
          0x3c or 0x3d
   - pwm: Should contain the pwm to use according to the OF device tree PWM
          specification [0]. Only required for the ssd1307.
-  - reset-gpios: Should contain the GPIO used to reset the OLED display
+  - reset-gpios: Should contain the GPIO used to reset the OLED display. See
+                 Documentation/devicetree/bindings/gpio/gpio.txt for details.
   - solomon,height: Height in pixel of the screen driven by the controller
   - solomon,width: Width in pixel of the screen driven by the controller
   - solomon,page-offset: Offset of pages (band of 8 pixels) that the screen is
     mapped to.
 
 Optional properties:
-  - reset-active-low: Is the reset gpio is active on physical low?
   - solomon,segment-no-remap: Display needs normal (non-inverted) data column
                               to segment mapping
   - solomon,com-seq: Display uses sequential COM pin configuration
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH v2 2/5] fbdev: ssd1307fb: Remove reset-active-low from the DT binding document
@ 2017-01-13 10:35       ` Jyri Sarha
  0 siblings, 0 replies; 28+ messages in thread
From: Jyri Sarha @ 2017-01-13 10:35 UTC (permalink / raw)
  To: linux-fbdev-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	b.zolnierkie-Sze3O3UU22JBDgjK7y7TUQ
  Cc: robh+dt-DgEjT+Ai2ygdnm+yROfE0A, tomi.valkeinen-l0cyMroinI0,
	maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8,
	bcousson-rdvid1DuHRBWk0Htik3J/w, Jyri Sarha

Remove reset-active-low from the devicetree binding document. The actual
implementation has never been there in the driver code and there is no
reason to add it because the gpiod API supports gpio flags, including
GPIO_ACTIVE_LOW, directly trough its own devicetree binding.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
---
 Documentation/devicetree/bindings/display/ssd1307fb.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/display/ssd1307fb.txt b/Documentation/devicetree/bindings/display/ssd1307fb.txt
index eb31ed4..4aee67f 100644
--- a/Documentation/devicetree/bindings/display/ssd1307fb.txt
+++ b/Documentation/devicetree/bindings/display/ssd1307fb.txt
@@ -8,14 +8,14 @@ Required properties:
          0x3c or 0x3d
   - pwm: Should contain the pwm to use according to the OF device tree PWM
          specification [0]. Only required for the ssd1307.
-  - reset-gpios: Should contain the GPIO used to reset the OLED display
+  - reset-gpios: Should contain the GPIO used to reset the OLED display. See
+                 Documentation/devicetree/bindings/gpio/gpio.txt for details.
   - solomon,height: Height in pixel of the screen driven by the controller
   - solomon,width: Width in pixel of the screen driven by the controller
   - solomon,page-offset: Offset of pages (band of 8 pixels) that the screen is
     mapped to.
 
 Optional properties:
-  - reset-active-low: Is the reset gpio is active on physical low?
   - solomon,segment-no-remap: Display needs normal (non-inverted) data column
                               to segment mapping
   - solomon,com-seq: Display uses sequential COM pin configuration
-- 
1.9.1


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

* [PATCH v2 3/5] fbdev: ssd1307fb: Make reset gpio devicetree property optional
       [not found]   ` <cover.1484303628.git.jsarha-l0cyMroinI0@public.gmane.org>
@ 2017-01-13 10:35       ` Jyri Sarha
  2017-01-13 10:35       ` Jyri Sarha
                         ` (4 subsequent siblings)
  5 siblings, 0 replies; 28+ messages in thread
From: Jyri Sarha @ 2017-01-13 10:35 UTC (permalink / raw)
  To: linux-fbdev-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	b.zolnierkie-Sze3O3UU22JBDgjK7y7TUQ
  Cc: robh+dt-DgEjT+Ai2ygdnm+yROfE0A, tomi.valkeinen-l0cyMroinI0,
	maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8,
	bcousson-rdvid1DuHRBWk0Htik3J/w, Jyri Sarha

Make reset gpio devicetree property optional. Depending on the board
designing there may not be a dedicated gpio for resetting the
display. Without a proper reset there may be some junk in the display
memory at probe time, so in such a case the display memory is cleared
before turning it on. The devicetree binding document is also updated.

Signed-off-by: Jyri Sarha <jsarha-l0cyMroinI0@public.gmane.org>
---
 .../devicetree/bindings/display/ssd1307fb.txt         |  4 ++--
 drivers/video/fbdev/ssd1307fb.c                       | 19 +++++++++++++------
 2 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/Documentation/devicetree/bindings/display/ssd1307fb.txt b/Documentation/devicetree/bindings/display/ssd1307fb.txt
index 4aee67f..6617df6 100644
--- a/Documentation/devicetree/bindings/display/ssd1307fb.txt
+++ b/Documentation/devicetree/bindings/display/ssd1307fb.txt
@@ -8,14 +8,14 @@ Required properties:
          0x3c or 0x3d
   - pwm: Should contain the pwm to use according to the OF device tree PWM
          specification [0]. Only required for the ssd1307.
-  - reset-gpios: Should contain the GPIO used to reset the OLED display. See
-                 Documentation/devicetree/bindings/gpio/gpio.txt for details.
   - solomon,height: Height in pixel of the screen driven by the controller
   - solomon,width: Width in pixel of the screen driven by the controller
   - solomon,page-offset: Offset of pages (band of 8 pixels) that the screen is
     mapped to.
 
 Optional properties:
+  - reset-gpios: The GPIO used to reset the OLED display, if available. See
+                 Documentation/devicetree/bindings/gpio/gpio.txt for details.
   - solomon,segment-no-remap: Display needs normal (non-inverted) data column
                               to segment mapping
   - solomon,com-seq: Display uses sequential COM pin configuration
diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev/ssd1307fb.c
index 8ffaaee..89372af 100644
--- a/drivers/video/fbdev/ssd1307fb.c
+++ b/drivers/video/fbdev/ssd1307fb.c
@@ -439,6 +439,10 @@ static int ssd1307fb_init(struct ssd1307fb_par *par)
 	if (ret < 0)
 		return ret;
 
+	/* Clear the screen if we could not give reset at probe time */
+	if (!par->reset)
+		ssd1307fb_update_display(par);
+
 	/* Turn on the display */
 	ret = ssd1307fb_write_cmd(par->client, SSD1307FB_DISPLAY_ON);
 	if (ret < 0)
@@ -561,7 +565,8 @@ static int ssd1307fb_probe(struct i2c_client *client,
 
 	par->device_info = of_device_get_match_data(&client->dev);
 
-	par->reset = devm_gpiod_get(&client->dev, "reset", GPIOD_OUT_LOW);
+	par->reset = devm_gpiod_get_optional(&client->dev, "reset",
+					     GPIOD_OUT_LOW);
 	if (IS_ERR(par->reset)) {
 		dev_err(&client->dev, "failed to get reset gpio: %ld\n",
 			PTR_ERR(par->reset));
@@ -645,11 +650,13 @@ static int ssd1307fb_probe(struct i2c_client *client,
 
 	i2c_set_clientdata(client, info);
 
-	/* Reset the screen */
-	gpiod_set_value(par->reset, 0);
-	udelay(4);
-	gpiod_set_value(par->reset, 1);
-	udelay(4);
+	if (par->reset) {
+		/* Reset the screen */
+		gpiod_set_value(par->reset, 0);
+		udelay(4);
+		gpiod_set_value(par->reset, 1);
+		udelay(4);
+	}
 
 	ret = ssd1307fb_init(par);
 	if (ret)
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH v2 3/5] fbdev: ssd1307fb: Make reset gpio devicetree property optional
@ 2017-01-13 10:35       ` Jyri Sarha
  0 siblings, 0 replies; 28+ messages in thread
From: Jyri Sarha @ 2017-01-13 10:35 UTC (permalink / raw)
  To: linux-fbdev-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	b.zolnierkie-Sze3O3UU22JBDgjK7y7TUQ
  Cc: robh+dt-DgEjT+Ai2ygdnm+yROfE0A, tomi.valkeinen-l0cyMroinI0,
	maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8,
	bcousson-rdvid1DuHRBWk0Htik3J/w, Jyri Sarha

Make reset gpio devicetree property optional. Depending on the board
designing there may not be a dedicated gpio for resetting the
display. Without a proper reset there may be some junk in the display
memory at probe time, so in such a case the display memory is cleared
before turning it on. The devicetree binding document is also updated.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
---
 .../devicetree/bindings/display/ssd1307fb.txt         |  4 ++--
 drivers/video/fbdev/ssd1307fb.c                       | 19 +++++++++++++------
 2 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/Documentation/devicetree/bindings/display/ssd1307fb.txt b/Documentation/devicetree/bindings/display/ssd1307fb.txt
index 4aee67f..6617df6 100644
--- a/Documentation/devicetree/bindings/display/ssd1307fb.txt
+++ b/Documentation/devicetree/bindings/display/ssd1307fb.txt
@@ -8,14 +8,14 @@ Required properties:
          0x3c or 0x3d
   - pwm: Should contain the pwm to use according to the OF device tree PWM
          specification [0]. Only required for the ssd1307.
-  - reset-gpios: Should contain the GPIO used to reset the OLED display. See
-                 Documentation/devicetree/bindings/gpio/gpio.txt for details.
   - solomon,height: Height in pixel of the screen driven by the controller
   - solomon,width: Width in pixel of the screen driven by the controller
   - solomon,page-offset: Offset of pages (band of 8 pixels) that the screen is
     mapped to.
 
 Optional properties:
+  - reset-gpios: The GPIO used to reset the OLED display, if available. See
+                 Documentation/devicetree/bindings/gpio/gpio.txt for details.
   - solomon,segment-no-remap: Display needs normal (non-inverted) data column
                               to segment mapping
   - solomon,com-seq: Display uses sequential COM pin configuration
diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev/ssd1307fb.c
index 8ffaaee..89372af 100644
--- a/drivers/video/fbdev/ssd1307fb.c
+++ b/drivers/video/fbdev/ssd1307fb.c
@@ -439,6 +439,10 @@ static int ssd1307fb_init(struct ssd1307fb_par *par)
 	if (ret < 0)
 		return ret;
 
+	/* Clear the screen if we could not give reset at probe time */
+	if (!par->reset)
+		ssd1307fb_update_display(par);
+
 	/* Turn on the display */
 	ret = ssd1307fb_write_cmd(par->client, SSD1307FB_DISPLAY_ON);
 	if (ret < 0)
@@ -561,7 +565,8 @@ static int ssd1307fb_probe(struct i2c_client *client,
 
 	par->device_info = of_device_get_match_data(&client->dev);
 
-	par->reset = devm_gpiod_get(&client->dev, "reset", GPIOD_OUT_LOW);
+	par->reset = devm_gpiod_get_optional(&client->dev, "reset",
+					     GPIOD_OUT_LOW);
 	if (IS_ERR(par->reset)) {
 		dev_err(&client->dev, "failed to get reset gpio: %ld\n",
 			PTR_ERR(par->reset));
@@ -645,11 +650,13 @@ static int ssd1307fb_probe(struct i2c_client *client,
 
 	i2c_set_clientdata(client, info);
 
-	/* Reset the screen */
-	gpiod_set_value(par->reset, 0);
-	udelay(4);
-	gpiod_set_value(par->reset, 1);
-	udelay(4);
+	if (par->reset) {
+		/* Reset the screen */
+		gpiod_set_value(par->reset, 0);
+		udelay(4);
+		gpiod_set_value(par->reset, 1);
+		udelay(4);
+	}
 
 	ret = ssd1307fb_init(par);
 	if (ret)
-- 
1.9.1


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

* [PATCH v2 4/5] fbdev/ssd1307fb: add support to enable VBAT
       [not found]   ` <cover.1484303628.git.jsarha-l0cyMroinI0@public.gmane.org>
@ 2017-01-13 10:35       ` Jyri Sarha
  2017-01-13 10:35       ` Jyri Sarha
                         ` (4 subsequent siblings)
  5 siblings, 0 replies; 28+ messages in thread
From: Jyri Sarha @ 2017-01-13 10:35 UTC (permalink / raw)
  To: linux-fbdev-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	b.zolnierkie-Sze3O3UU22JBDgjK7y7TUQ
  Cc: robh+dt-DgEjT+Ai2ygdnm+yROfE0A, tomi.valkeinen-l0cyMroinI0,
	maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8,
	bcousson-rdvid1DuHRBWk0Htik3J/w, Jyri Sarha

From: Tomi Valkeinen <tomi.valkeinen-l0cyMroinI0@public.gmane.org>

SSD1306 needs VBAT when it is wired in charge pump configuration. This
patch adds support to the driver to enable VBAT regulator at init time.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen-l0cyMroinI0@public.gmane.org>
Reviewed-by: Roger Quadros <rogerq-l0cyMroinI0@public.gmane.org>
Signed-off-by: Jyri Sarha <jsarha-l0cyMroinI0@public.gmane.org>
---
 .../devicetree/bindings/display/ssd1307fb.txt        |  1 +
 drivers/video/fbdev/ssd1307fb.c                      | 20 +++++++++++++++++++-
 2 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/display/ssd1307fb.txt b/Documentation/devicetree/bindings/display/ssd1307fb.txt
index 6617df6..209d931 100644
--- a/Documentation/devicetree/bindings/display/ssd1307fb.txt
+++ b/Documentation/devicetree/bindings/display/ssd1307fb.txt
@@ -16,6 +16,7 @@ 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.
+  - vbat-supply: The supply for VBAT
   - solomon,segment-no-remap: Display needs normal (non-inverted) data column
                               to segment mapping
   - solomon,com-seq: Display uses sequential COM pin configuration
diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev/ssd1307fb.c
index 89372af..616a6a3 100644
--- a/drivers/video/fbdev/ssd1307fb.c
+++ b/drivers/video/fbdev/ssd1307fb.c
@@ -16,6 +16,7 @@
 #include <linux/of_gpio.h>
 #include <linux/pwm.h>
 #include <linux/uaccess.h>
+#include <linux/regulator/consumer.h>
 
 #define SSD1307FB_DATA			0x40
 #define SSD1307FB_COMMAND		0x80
@@ -74,6 +75,7 @@ struct ssd1307fb_par {
 	struct pwm_device *pwm;
 	u32 pwm_period;
 	struct gpio_desc *reset;
+	struct regulator *vbat_reg;
 	u32 seg_remap;
 	u32 vcomh;
 	u32 width;
@@ -574,6 +576,14 @@ static int ssd1307fb_probe(struct i2c_client *client,
 		goto fb_alloc_error;
 	}
 
+	par->vbat_reg = devm_regulator_get_optional(&client->dev, "vbat");
+	if (IS_ERR(par->vbat_reg)) {
+		dev_err(&client->dev, "failed to get VBAT regulator: %ld\n",
+			PTR_ERR(par->vbat_reg));
+		ret = PTR_ERR(par->vbat_reg);
+		goto fb_alloc_error;
+	}
+
 	if (of_property_read_u32(node, "solomon,width", &par->width))
 		par->width = 96;
 
@@ -658,9 +668,15 @@ static int ssd1307fb_probe(struct i2c_client *client,
 		udelay(4);
 	}
 
+	ret = regulator_enable(par->vbat_reg);
+	if (ret) {
+		dev_err(&client->dev, "failed to enable VBAT: %d\n", ret);
+		goto reset_oled_error;
+	}
+
 	ret = ssd1307fb_init(par);
 	if (ret)
-		goto reset_oled_error;
+		goto regulator_enable_error;
 
 	ret = register_framebuffer(info);
 	if (ret) {
@@ -693,6 +709,8 @@ static int ssd1307fb_probe(struct i2c_client *client,
 		pwm_disable(par->pwm);
 		pwm_put(par->pwm);
 	};
+regulator_enable_error:
+	regulator_disable(par->vbat_reg);
 reset_oled_error:
 	fb_deferred_io_cleanup(info);
 fb_alloc_error:
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH v2 4/5] fbdev/ssd1307fb: add support to enable VBAT
@ 2017-01-13 10:35       ` Jyri Sarha
  0 siblings, 0 replies; 28+ messages in thread
From: Jyri Sarha @ 2017-01-13 10:35 UTC (permalink / raw)
  To: linux-fbdev-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	b.zolnierkie-Sze3O3UU22JBDgjK7y7TUQ
  Cc: robh+dt-DgEjT+Ai2ygdnm+yROfE0A, tomi.valkeinen-l0cyMroinI0,
	maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8,
	bcousson-rdvid1DuHRBWk0Htik3J/w, Jyri Sarha

From: Tomi Valkeinen <tomi.valkeinen@ti.com>

SSD1306 needs VBAT when it is wired in charge pump configuration. This
patch adds support to the driver to enable VBAT regulator at init time.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Jyri Sarha <jsarha@ti.com>
---
 .../devicetree/bindings/display/ssd1307fb.txt        |  1 +
 drivers/video/fbdev/ssd1307fb.c                      | 20 +++++++++++++++++++-
 2 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/display/ssd1307fb.txt b/Documentation/devicetree/bindings/display/ssd1307fb.txt
index 6617df6..209d931 100644
--- a/Documentation/devicetree/bindings/display/ssd1307fb.txt
+++ b/Documentation/devicetree/bindings/display/ssd1307fb.txt
@@ -16,6 +16,7 @@ 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.
+  - vbat-supply: The supply for VBAT
   - solomon,segment-no-remap: Display needs normal (non-inverted) data column
                               to segment mapping
   - solomon,com-seq: Display uses sequential COM pin configuration
diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev/ssd1307fb.c
index 89372af..616a6a3 100644
--- a/drivers/video/fbdev/ssd1307fb.c
+++ b/drivers/video/fbdev/ssd1307fb.c
@@ -16,6 +16,7 @@
 #include <linux/of_gpio.h>
 #include <linux/pwm.h>
 #include <linux/uaccess.h>
+#include <linux/regulator/consumer.h>
 
 #define SSD1307FB_DATA			0x40
 #define SSD1307FB_COMMAND		0x80
@@ -74,6 +75,7 @@ struct ssd1307fb_par {
 	struct pwm_device *pwm;
 	u32 pwm_period;
 	struct gpio_desc *reset;
+	struct regulator *vbat_reg;
 	u32 seg_remap;
 	u32 vcomh;
 	u32 width;
@@ -574,6 +576,14 @@ static int ssd1307fb_probe(struct i2c_client *client,
 		goto fb_alloc_error;
 	}
 
+	par->vbat_reg = devm_regulator_get_optional(&client->dev, "vbat");
+	if (IS_ERR(par->vbat_reg)) {
+		dev_err(&client->dev, "failed to get VBAT regulator: %ld\n",
+			PTR_ERR(par->vbat_reg));
+		ret = PTR_ERR(par->vbat_reg);
+		goto fb_alloc_error;
+	}
+
 	if (of_property_read_u32(node, "solomon,width", &par->width))
 		par->width = 96;
 
@@ -658,9 +668,15 @@ static int ssd1307fb_probe(struct i2c_client *client,
 		udelay(4);
 	}
 
+	ret = regulator_enable(par->vbat_reg);
+	if (ret) {
+		dev_err(&client->dev, "failed to enable VBAT: %d\n", ret);
+		goto reset_oled_error;
+	}
+
 	ret = ssd1307fb_init(par);
 	if (ret)
-		goto reset_oled_error;
+		goto regulator_enable_error;
 
 	ret = register_framebuffer(info);
 	if (ret) {
@@ -693,6 +709,8 @@ static int ssd1307fb_probe(struct i2c_client *client,
 		pwm_disable(par->pwm);
 		pwm_put(par->pwm);
 	};
+regulator_enable_error:
+	regulator_disable(par->vbat_reg);
 reset_oled_error:
 	fb_deferred_io_cleanup(info);
 fb_alloc_error:
-- 
1.9.1


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

* [PATCH v2 5/5] fbdev/ssd1307fb: clear screen in probe
       [not found]   ` <cover.1484303628.git.jsarha-l0cyMroinI0@public.gmane.org>
@ 2017-01-13 10:35       ` Jyri Sarha
  2017-01-13 10:35       ` Jyri Sarha
                         ` (4 subsequent siblings)
  5 siblings, 0 replies; 28+ messages in thread
From: Jyri Sarha @ 2017-01-13 10:35 UTC (permalink / raw)
  To: linux-fbdev-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	b.zolnierkie-Sze3O3UU22JBDgjK7y7TUQ
  Cc: robh+dt-DgEjT+Ai2ygdnm+yROfE0A, tomi.valkeinen-l0cyMroinI0,
	maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8,
	bcousson-rdvid1DuHRBWk0Htik3J/w, Jyri Sarha

From: Tomi Valkeinen <tomi.valkeinen-l0cyMroinI0@public.gmane.org>

SSD1306 does not clear the panel's framebuffer automatically, even if a
HW reset happens, so we need to do that at probe time before enabling
the panel.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen-l0cyMroinI0@public.gmane.org>
Signed-off-by: Jyri Sarha <jsarha-l0cyMroinI0@public.gmane.org>
---
 drivers/video/fbdev/ssd1307fb.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev/ssd1307fb.c
index 616a6a3..5c87ae4 100644
--- a/drivers/video/fbdev/ssd1307fb.c
+++ b/drivers/video/fbdev/ssd1307fb.c
@@ -441,9 +441,8 @@ static int ssd1307fb_init(struct ssd1307fb_par *par)
 	if (ret < 0)
 		return ret;
 
-	/* Clear the screen if we could not give reset at probe time */
-	if (!par->reset)
-		ssd1307fb_update_display(par);
+	/* Clear the screen */
+	ssd1307fb_update_display(par);
 
 	/* Turn on the display */
 	ret = ssd1307fb_write_cmd(par->client, SSD1307FB_DISPLAY_ON);
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH v2 5/5] fbdev/ssd1307fb: clear screen in probe
@ 2017-01-13 10:35       ` Jyri Sarha
  0 siblings, 0 replies; 28+ messages in thread
From: Jyri Sarha @ 2017-01-13 10:35 UTC (permalink / raw)
  To: linux-fbdev-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	b.zolnierkie-Sze3O3UU22JBDgjK7y7TUQ
  Cc: robh+dt-DgEjT+Ai2ygdnm+yROfE0A, tomi.valkeinen-l0cyMroinI0,
	maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8,
	bcousson-rdvid1DuHRBWk0Htik3J/w, Jyri Sarha

From: Tomi Valkeinen <tomi.valkeinen@ti.com>

SSD1306 does not clear the panel's framebuffer automatically, even if a
HW reset happens, so we need to do that at probe time before enabling
the panel.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Jyri Sarha <jsarha@ti.com>
---
 drivers/video/fbdev/ssd1307fb.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev/ssd1307fb.c
index 616a6a3..5c87ae4 100644
--- a/drivers/video/fbdev/ssd1307fb.c
+++ b/drivers/video/fbdev/ssd1307fb.c
@@ -441,9 +441,8 @@ static int ssd1307fb_init(struct ssd1307fb_par *par)
 	if (ret < 0)
 		return ret;
 
-	/* Clear the screen if we could not give reset at probe time */
-	if (!par->reset)
-		ssd1307fb_update_display(par);
+	/* Clear the screen */
+	ssd1307fb_update_display(par);
 
 	/* Turn on the display */
 	ret = ssd1307fb_write_cmd(par->client, SSD1307FB_DISPLAY_ON);
-- 
1.9.1


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

* Re: [PATCH v2 2/5] fbdev: ssd1307fb: Remove reset-active-low from the DT binding document
       [not found]       ` <b68e1b9b735543b9e1511cfeb8e5d9ceec6c7666.1484303628.git.jsarha-l0cyMroinI0@public.gmane.org>
@ 2017-01-18 22:28           ` Rob Herring
  0 siblings, 0 replies; 28+ messages in thread
From: Rob Herring @ 2017-01-18 22:28 UTC (permalink / raw)
  To: Jyri Sarha
  Cc: linux-fbdev-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	b.zolnierkie-Sze3O3UU22JBDgjK7y7TUQ, tomi.valkeinen-l0cyMroinI0,
	maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8,
	bcousson-rdvid1DuHRBWk0Htik3J/w

On Fri, Jan 13, 2017 at 12:35:46PM +0200, Jyri Sarha wrote:
> Remove reset-active-low from the devicetree binding document. The actual
> implementation has never been there in the driver code and there is no
> reason to add it because the gpiod API supports gpio flags, including
> GPIO_ACTIVE_LOW, directly trough its own devicetree binding.
> 
> Signed-off-by: Jyri Sarha <jsarha-l0cyMroinI0@public.gmane.org>
> ---
>  Documentation/devicetree/bindings/display/ssd1307fb.txt | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/display/ssd1307fb.txt b/Documentation/devicetree/bindings/display/ssd1307fb.txt
> index eb31ed4..4aee67f 100644
> --- a/Documentation/devicetree/bindings/display/ssd1307fb.txt
> +++ b/Documentation/devicetree/bindings/display/ssd1307fb.txt
> @@ -8,14 +8,14 @@ Required properties:
>           0x3c or 0x3d
>    - pwm: Should contain the pwm to use according to the OF device tree PWM
>           specification [0]. Only required for the ssd1307.
> -  - reset-gpios: Should contain the GPIO used to reset the OLED display
> +  - reset-gpios: Should contain the GPIO used to reset the OLED display. See
> +                 Documentation/devicetree/bindings/gpio/gpio.txt for details.

You need to define the active state. Does the active state actually 
vary? Sounds like the compatible is not specific enough unless some 
boards have an inverter.

>    - solomon,height: Height in pixel of the screen driven by the controller
>    - solomon,width: Width in pixel of the screen driven by the controller
>    - solomon,page-offset: Offset of pages (band of 8 pixels) that the screen is
>      mapped to.
>  
>  Optional properties:
> -  - reset-active-low: Is the reset gpio is active on physical low?
>    - solomon,segment-no-remap: Display needs normal (non-inverted) data column
>                                to segment mapping
>    - solomon,com-seq: Display uses sequential COM pin configuration
> -- 
> 1.9.1
> 
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH v2 2/5] fbdev: ssd1307fb: Remove reset-active-low from the DT binding document
@ 2017-01-18 22:28           ` Rob Herring
  0 siblings, 0 replies; 28+ messages in thread
From: Rob Herring @ 2017-01-18 22:28 UTC (permalink / raw)
  To: Jyri Sarha
  Cc: linux-fbdev-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	b.zolnierkie-Sze3O3UU22JBDgjK7y7TUQ, tomi.valkeinen-l0cyMroinI0,
	maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8,
	bcousson-rdvid1DuHRBWk0Htik3J/w

On Fri, Jan 13, 2017 at 12:35:46PM +0200, Jyri Sarha wrote:
> Remove reset-active-low from the devicetree binding document. The actual
> implementation has never been there in the driver code and there is no
> reason to add it because the gpiod API supports gpio flags, including
> GPIO_ACTIVE_LOW, directly trough its own devicetree binding.
> 
> Signed-off-by: Jyri Sarha <jsarha@ti.com>
> ---
>  Documentation/devicetree/bindings/display/ssd1307fb.txt | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/display/ssd1307fb.txt b/Documentation/devicetree/bindings/display/ssd1307fb.txt
> index eb31ed4..4aee67f 100644
> --- a/Documentation/devicetree/bindings/display/ssd1307fb.txt
> +++ b/Documentation/devicetree/bindings/display/ssd1307fb.txt
> @@ -8,14 +8,14 @@ Required properties:
>           0x3c or 0x3d
>    - pwm: Should contain the pwm to use according to the OF device tree PWM
>           specification [0]. Only required for the ssd1307.
> -  - reset-gpios: Should contain the GPIO used to reset the OLED display
> +  - reset-gpios: Should contain the GPIO used to reset the OLED display. See
> +                 Documentation/devicetree/bindings/gpio/gpio.txt for details.

You need to define the active state. Does the active state actually 
vary? Sounds like the compatible is not specific enough unless some 
boards have an inverter.

>    - solomon,height: Height in pixel of the screen driven by the controller
>    - solomon,width: Width in pixel of the screen driven by the controller
>    - solomon,page-offset: Offset of pages (band of 8 pixels) that the screen is
>      mapped to.
>  
>  Optional properties:
> -  - reset-active-low: Is the reset gpio is active on physical low?
>    - solomon,segment-no-remap: Display needs normal (non-inverted) data column
>                                to segment mapping
>    - solomon,com-seq: Display uses sequential COM pin configuration
> -- 
> 1.9.1
> 

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

* Re: [PATCH v2 4/5] fbdev/ssd1307fb: add support to enable VBAT
       [not found]       ` <214ae9ca86009148f233be71a3606917f3150dcd.1484303628.git.jsarha-l0cyMroinI0@public.gmane.org>
@ 2017-01-18 22:33           ` Rob Herring
  0 siblings, 0 replies; 28+ messages in thread
From: Rob Herring @ 2017-01-18 22:33 UTC (permalink / raw)
  To: Jyri Sarha
  Cc: linux-fbdev-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	b.zolnierkie-Sze3O3UU22JBDgjK7y7TUQ, tomi.valkeinen-l0cyMroinI0,
	maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8,
	bcousson-rdvid1DuHRBWk0Htik3J/w

On Fri, Jan 13, 2017 at 12:35:48PM +0200, Jyri Sarha wrote:
> From: Tomi Valkeinen <tomi.valkeinen-l0cyMroinI0@public.gmane.org>
> 
> SSD1306 needs VBAT when it is wired in charge pump configuration. This
> patch adds support to the driver to enable VBAT regulator at init time.
> 
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen-l0cyMroinI0@public.gmane.org>
> Reviewed-by: Roger Quadros <rogerq-l0cyMroinI0@public.gmane.org>
> Signed-off-by: Jyri Sarha <jsarha-l0cyMroinI0@public.gmane.org>
> ---
>  .../devicetree/bindings/display/ssd1307fb.txt        |  1 +
>  drivers/video/fbdev/ssd1307fb.c                      | 20 +++++++++++++++++++-
>  2 files changed, 20 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/display/ssd1307fb.txt b/Documentation/devicetree/bindings/display/ssd1307fb.txt
> index 6617df6..209d931 100644
> --- a/Documentation/devicetree/bindings/display/ssd1307fb.txt
> +++ b/Documentation/devicetree/bindings/display/ssd1307fb.txt
> @@ -16,6 +16,7 @@ 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.
> +  - vbat-supply: The supply for VBAT

According to the datasheet, SSD1307 has 2 supplies: Vdd and Vcc

I don't see any mention of a charge pump, so that must be an external 
component.

>    - solomon,segment-no-remap: Display needs normal (non-inverted) data column
>                                to segment mapping
>    - solomon,com-seq: Display uses sequential COM pin configuration
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH v2 4/5] fbdev/ssd1307fb: add support to enable VBAT
@ 2017-01-18 22:33           ` Rob Herring
  0 siblings, 0 replies; 28+ messages in thread
From: Rob Herring @ 2017-01-18 22:33 UTC (permalink / raw)
  To: Jyri Sarha
  Cc: linux-fbdev-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	b.zolnierkie-Sze3O3UU22JBDgjK7y7TUQ, tomi.valkeinen-l0cyMroinI0,
	maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8,
	bcousson-rdvid1DuHRBWk0Htik3J/w

On Fri, Jan 13, 2017 at 12:35:48PM +0200, Jyri Sarha wrote:
> From: Tomi Valkeinen <tomi.valkeinen@ti.com>
> 
> SSD1306 needs VBAT when it is wired in charge pump configuration. This
> patch adds support to the driver to enable VBAT regulator at init time.
> 
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
> Reviewed-by: Roger Quadros <rogerq@ti.com>
> Signed-off-by: Jyri Sarha <jsarha@ti.com>
> ---
>  .../devicetree/bindings/display/ssd1307fb.txt        |  1 +
>  drivers/video/fbdev/ssd1307fb.c                      | 20 +++++++++++++++++++-
>  2 files changed, 20 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/display/ssd1307fb.txt b/Documentation/devicetree/bindings/display/ssd1307fb.txt
> index 6617df6..209d931 100644
> --- a/Documentation/devicetree/bindings/display/ssd1307fb.txt
> +++ b/Documentation/devicetree/bindings/display/ssd1307fb.txt
> @@ -16,6 +16,7 @@ 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.
> +  - vbat-supply: The supply for VBAT

According to the datasheet, SSD1307 has 2 supplies: Vdd and Vcc

I don't see any mention of a charge pump, so that must be an external 
component.

>    - solomon,segment-no-remap: Display needs normal (non-inverted) data column
>                                to segment mapping
>    - solomon,com-seq: Display uses sequential COM pin configuration

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

* Re: [PATCH v2 2/5] fbdev: ssd1307fb: Remove reset-active-low from the DT binding document
  2017-01-18 22:28           ` Rob Herring
@ 2017-01-19  8:24             ` Jyri Sarha
  -1 siblings, 0 replies; 28+ messages in thread
From: Jyri Sarha @ 2017-01-19  8:24 UTC (permalink / raw)
  To: Rob Herring
  Cc: linux-fbdev-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	b.zolnierkie-Sze3O3UU22JBDgjK7y7TUQ, tomi.valkeinen-l0cyMroinI0,
	maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8,
	bcousson-rdvid1DuHRBWk0Htik3J/w

On 01/19/17 00:28, Rob Herring wrote:
> On Fri, Jan 13, 2017 at 12:35:46PM +0200, Jyri Sarha wrote:
>> Remove reset-active-low from the devicetree binding document. The actual
>> implementation has never been there in the driver code and there is no
>> reason to add it because the gpiod API supports gpio flags, including
>> GPIO_ACTIVE_LOW, directly trough its own devicetree binding.
>>
>> Signed-off-by: Jyri Sarha <jsarha-l0cyMroinI0@public.gmane.org>
>> ---
>>  Documentation/devicetree/bindings/display/ssd1307fb.txt | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/display/ssd1307fb.txt b/Documentation/devicetree/bindings/display/ssd1307fb.txt
>> index eb31ed4..4aee67f 100644
>> --- a/Documentation/devicetree/bindings/display/ssd1307fb.txt
>> +++ b/Documentation/devicetree/bindings/display/ssd1307fb.txt
>> @@ -8,14 +8,14 @@ Required properties:
>>           0x3c or 0x3d
>>    - pwm: Should contain the pwm to use according to the OF device tree PWM
>>           specification [0]. Only required for the ssd1307.
>> -  - reset-gpios: Should contain the GPIO used to reset the OLED display
>> +  - reset-gpios: Should contain the GPIO used to reset the OLED display. See
>> +                 Documentation/devicetree/bindings/gpio/gpio.txt for details.
> You need to define the active state. Does the active state actually 
> vary? Sounds like the compatible is not specific enough unless some 
> boards have an inverter.
> 

No, I am not aware of the active state ever varying. For some reason
someone specified the reset-active-low, but probably in the end it was
not needed after all because the implementation was not added.

The only reason I can think of why the reset gpio would need active low
flag is very weird board design or broken gpio driver.

Best regards,
Jyri
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH v2 2/5] fbdev: ssd1307fb: Remove reset-active-low from the DT binding document
@ 2017-01-19  8:24             ` Jyri Sarha
  0 siblings, 0 replies; 28+ messages in thread
From: Jyri Sarha @ 2017-01-19  8:24 UTC (permalink / raw)
  To: Rob Herring
  Cc: linux-fbdev-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	b.zolnierkie-Sze3O3UU22JBDgjK7y7TUQ, tomi.valkeinen-l0cyMroinI0,
	maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8,
	bcousson-rdvid1DuHRBWk0Htik3J/w

On 01/19/17 00:28, Rob Herring wrote:
> On Fri, Jan 13, 2017 at 12:35:46PM +0200, Jyri Sarha wrote:
>> Remove reset-active-low from the devicetree binding document. The actual
>> implementation has never been there in the driver code and there is no
>> reason to add it because the gpiod API supports gpio flags, including
>> GPIO_ACTIVE_LOW, directly trough its own devicetree binding.
>>
>> Signed-off-by: Jyri Sarha <jsarha@ti.com>
>> ---
>>  Documentation/devicetree/bindings/display/ssd1307fb.txt | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/display/ssd1307fb.txt b/Documentation/devicetree/bindings/display/ssd1307fb.txt
>> index eb31ed4..4aee67f 100644
>> --- a/Documentation/devicetree/bindings/display/ssd1307fb.txt
>> +++ b/Documentation/devicetree/bindings/display/ssd1307fb.txt
>> @@ -8,14 +8,14 @@ Required properties:
>>           0x3c or 0x3d
>>    - pwm: Should contain the pwm to use according to the OF device tree PWM
>>           specification [0]. Only required for the ssd1307.
>> -  - reset-gpios: Should contain the GPIO used to reset the OLED display
>> +  - reset-gpios: Should contain the GPIO used to reset the OLED display. See
>> +                 Documentation/devicetree/bindings/gpio/gpio.txt for details.
> You need to define the active state. Does the active state actually 
> vary? Sounds like the compatible is not specific enough unless some 
> boards have an inverter.
> 

No, I am not aware of the active state ever varying. For some reason
someone specified the reset-active-low, but probably in the end it was
not needed after all because the implementation was not added.

The only reason I can think of why the reset gpio would need active low
flag is very weird board design or broken gpio driver.

Best regards,
Jyri

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

* Re: [PATCH v2 4/5] fbdev/ssd1307fb: add support to enable VBAT
  2017-01-18 22:33           ` Rob Herring
@ 2017-01-19 13:15             ` Tomi Valkeinen
  -1 siblings, 0 replies; 28+ messages in thread
From: Tomi Valkeinen @ 2017-01-19 13:15 UTC (permalink / raw)
  To: Rob Herring, Jyri Sarha
  Cc: linux-fbdev-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	b.zolnierkie-Sze3O3UU22JBDgjK7y7TUQ,
	maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8,
	bcousson-rdvid1DuHRBWk0Htik3J/w


[-- Attachment #1.1: Type: text/plain, Size: 1572 bytes --]

On 19/01/17 00:33, Rob Herring wrote:
> On Fri, Jan 13, 2017 at 12:35:48PM +0200, Jyri Sarha wrote:
>> From: Tomi Valkeinen <tomi.valkeinen-l0cyMroinI0@public.gmane.org>
>>
>> SSD1306 needs VBAT when it is wired in charge pump configuration. This
>> patch adds support to the driver to enable VBAT regulator at init time.
>>
>> Signed-off-by: Tomi Valkeinen <tomi.valkeinen-l0cyMroinI0@public.gmane.org>
>> Reviewed-by: Roger Quadros <rogerq-l0cyMroinI0@public.gmane.org>
>> Signed-off-by: Jyri Sarha <jsarha-l0cyMroinI0@public.gmane.org>
>> ---
>>  .../devicetree/bindings/display/ssd1307fb.txt        |  1 +
>>  drivers/video/fbdev/ssd1307fb.c                      | 20 +++++++++++++++++++-
>>  2 files changed, 20 insertions(+), 1 deletion(-)
>>
>> diff --git a/Documentation/devicetree/bindings/display/ssd1307fb.txt b/Documentation/devicetree/bindings/display/ssd1307fb.txt
>> index 6617df6..209d931 100644
>> --- a/Documentation/devicetree/bindings/display/ssd1307fb.txt
>> +++ b/Documentation/devicetree/bindings/display/ssd1307fb.txt
>> @@ -16,6 +16,7 @@ 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.
>> +  - vbat-supply: The supply for VBAT
> 
> According to the datasheet, SSD1307 has 2 supplies: Vdd and Vcc
> 
> I don't see any mention of a charge pump, so that must be an external 
> component.

VBAT is for SSD1306. Perhaps the DT doc should mention it.

 Tomi


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [PATCH v2 4/5] fbdev/ssd1307fb: add support to enable VBAT
@ 2017-01-19 13:15             ` Tomi Valkeinen
  0 siblings, 0 replies; 28+ messages in thread
From: Tomi Valkeinen @ 2017-01-19 13:15 UTC (permalink / raw)
  To: Rob Herring, Jyri Sarha
  Cc: linux-fbdev-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	b.zolnierkie-Sze3O3UU22JBDgjK7y7TUQ,
	maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8,
	bcousson-rdvid1DuHRBWk0Htik3J/w


[-- Attachment #1.1: Type: text/plain, Size: 1484 bytes --]

On 19/01/17 00:33, Rob Herring wrote:
> On Fri, Jan 13, 2017 at 12:35:48PM +0200, Jyri Sarha wrote:
>> From: Tomi Valkeinen <tomi.valkeinen@ti.com>
>>
>> SSD1306 needs VBAT when it is wired in charge pump configuration. This
>> patch adds support to the driver to enable VBAT regulator at init time.
>>
>> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
>> Reviewed-by: Roger Quadros <rogerq@ti.com>
>> Signed-off-by: Jyri Sarha <jsarha@ti.com>
>> ---
>>  .../devicetree/bindings/display/ssd1307fb.txt        |  1 +
>>  drivers/video/fbdev/ssd1307fb.c                      | 20 +++++++++++++++++++-
>>  2 files changed, 20 insertions(+), 1 deletion(-)
>>
>> diff --git a/Documentation/devicetree/bindings/display/ssd1307fb.txt b/Documentation/devicetree/bindings/display/ssd1307fb.txt
>> index 6617df6..209d931 100644
>> --- a/Documentation/devicetree/bindings/display/ssd1307fb.txt
>> +++ b/Documentation/devicetree/bindings/display/ssd1307fb.txt
>> @@ -16,6 +16,7 @@ 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.
>> +  - vbat-supply: The supply for VBAT
> 
> According to the datasheet, SSD1307 has 2 supplies: Vdd and Vcc
> 
> I don't see any mention of a charge pump, so that must be an external 
> component.

VBAT is for SSD1306. Perhaps the DT doc should mention it.

 Tomi


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [PATCH v2 4/5] fbdev/ssd1307fb: add support to enable VBAT
       [not found]             ` <754f3644-a157-bb90-1494-aba4fc1264f8-l0cyMroinI0@public.gmane.org>
@ 2017-01-19 15:03                 ` Rob Herring
  0 siblings, 0 replies; 28+ messages in thread
From: Rob Herring @ 2017-01-19 15:03 UTC (permalink / raw)
  To: Tomi Valkeinen
  Cc: Jyri Sarha, linux-fbdev-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Bartlomiej Zolnierkiewicz,
	Maxime Ripard, Benoit Cousson

On Thu, Jan 19, 2017 at 7:15 AM, Tomi Valkeinen <tomi.valkeinen-l0cyMroinI0@public.gmane.org> wrote:
> On 19/01/17 00:33, Rob Herring wrote:
>> On Fri, Jan 13, 2017 at 12:35:48PM +0200, Jyri Sarha wrote:
>>> From: Tomi Valkeinen <tomi.valkeinen-l0cyMroinI0@public.gmane.org>
>>>
>>> SSD1306 needs VBAT when it is wired in charge pump configuration. This
>>> patch adds support to the driver to enable VBAT regulator at init time.
>>>
>>> Signed-off-by: Tomi Valkeinen <tomi.valkeinen-l0cyMroinI0@public.gmane.org>
>>> Reviewed-by: Roger Quadros <rogerq-l0cyMroinI0@public.gmane.org>
>>> Signed-off-by: Jyri Sarha <jsarha-l0cyMroinI0@public.gmane.org>
>>> ---
>>>  .../devicetree/bindings/display/ssd1307fb.txt        |  1 +
>>>  drivers/video/fbdev/ssd1307fb.c                      | 20 +++++++++++++++++++-
>>>  2 files changed, 20 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/Documentation/devicetree/bindings/display/ssd1307fb.txt b/Documentation/devicetree/bindings/display/ssd1307fb.txt
>>> index 6617df6..209d931 100644
>>> --- a/Documentation/devicetree/bindings/display/ssd1307fb.txt
>>> +++ b/Documentation/devicetree/bindings/display/ssd1307fb.txt
>>> @@ -16,6 +16,7 @@ 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.
>>> +  - vbat-supply: The supply for VBAT
>>
>> According to the datasheet, SSD1307 has 2 supplies: Vdd and Vcc
>>
>> I don't see any mention of a charge pump, so that must be an external
>> component.
>
> VBAT is for SSD1306. Perhaps the DT doc should mention it.

Datasheet says VBAT is reserved, connect to Vdd. I would just describe
Vdd and Vcc in that case.

Rob
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH v2 4/5] fbdev/ssd1307fb: add support to enable VBAT
@ 2017-01-19 15:03                 ` Rob Herring
  0 siblings, 0 replies; 28+ messages in thread
From: Rob Herring @ 2017-01-19 15:03 UTC (permalink / raw)
  To: Tomi Valkeinen
  Cc: Jyri Sarha, linux-fbdev-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Bartlomiej Zolnierkiewicz,
	Maxime Ripard, Benoit Cousson

On Thu, Jan 19, 2017 at 7:15 AM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote:
> On 19/01/17 00:33, Rob Herring wrote:
>> On Fri, Jan 13, 2017 at 12:35:48PM +0200, Jyri Sarha wrote:
>>> From: Tomi Valkeinen <tomi.valkeinen@ti.com>
>>>
>>> SSD1306 needs VBAT when it is wired in charge pump configuration. This
>>> patch adds support to the driver to enable VBAT regulator at init time.
>>>
>>> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
>>> Reviewed-by: Roger Quadros <rogerq@ti.com>
>>> Signed-off-by: Jyri Sarha <jsarha@ti.com>
>>> ---
>>>  .../devicetree/bindings/display/ssd1307fb.txt        |  1 +
>>>  drivers/video/fbdev/ssd1307fb.c                      | 20 +++++++++++++++++++-
>>>  2 files changed, 20 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/Documentation/devicetree/bindings/display/ssd1307fb.txt b/Documentation/devicetree/bindings/display/ssd1307fb.txt
>>> index 6617df6..209d931 100644
>>> --- a/Documentation/devicetree/bindings/display/ssd1307fb.txt
>>> +++ b/Documentation/devicetree/bindings/display/ssd1307fb.txt
>>> @@ -16,6 +16,7 @@ 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.
>>> +  - vbat-supply: The supply for VBAT
>>
>> According to the datasheet, SSD1307 has 2 supplies: Vdd and Vcc
>>
>> I don't see any mention of a charge pump, so that must be an external
>> component.
>
> VBAT is for SSD1306. Perhaps the DT doc should mention it.

Datasheet says VBAT is reserved, connect to Vdd. I would just describe
Vdd and Vcc in that case.

Rob

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

* Re: [PATCH v2 4/5] fbdev/ssd1307fb: add support to enable VBAT
       [not found]                 ` <CAL_JsqLjTa2SWP_cNU9AV4tRZLDcjJsUV7pUvy=4UhQix7ZjQQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2017-01-19 15:08                     ` Tomi Valkeinen
  0 siblings, 0 replies; 28+ messages in thread
From: Tomi Valkeinen @ 2017-01-19 15:08 UTC (permalink / raw)
  To: Rob Herring
  Cc: Jyri Sarha, linux-fbdev-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Bartlomiej Zolnierkiewicz,
	Maxime Ripard, Benoit Cousson


[-- Attachment #1.1: Type: text/plain, Size: 620 bytes --]

On 19/01/17 17:03, Rob Herring wrote:

>>> According to the datasheet, SSD1307 has 2 supplies: Vdd and Vcc
>>>
>>> I don't see any mention of a charge pump, so that must be an external
>>> component.
>>
>> VBAT is for SSD1306. Perhaps the DT doc should mention it.
> 
> Datasheet says VBAT is reserved, connect to Vdd. I would just describe
> Vdd and Vcc in that case.

I'm no HW guy, but as far as I understand, you can wire it up two ways.
One has VBAT connected to VDD. The other one has VBAT connected to
external supply. See "Figure 1 : Application Example of SSD1306Z with
charge bump".

 Tomi


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [PATCH v2 4/5] fbdev/ssd1307fb: add support to enable VBAT
@ 2017-01-19 15:08                     ` Tomi Valkeinen
  0 siblings, 0 replies; 28+ messages in thread
From: Tomi Valkeinen @ 2017-01-19 15:08 UTC (permalink / raw)
  To: Rob Herring
  Cc: Jyri Sarha, linux-fbdev-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Bartlomiej Zolnierkiewicz,
	Maxime Ripard, Benoit Cousson


[-- Attachment #1.1: Type: text/plain, Size: 620 bytes --]

On 19/01/17 17:03, Rob Herring wrote:

>>> According to the datasheet, SSD1307 has 2 supplies: Vdd and Vcc
>>>
>>> I don't see any mention of a charge pump, so that must be an external
>>> component.
>>
>> VBAT is for SSD1306. Perhaps the DT doc should mention it.
> 
> Datasheet says VBAT is reserved, connect to Vdd. I would just describe
> Vdd and Vcc in that case.

I'm no HW guy, but as far as I understand, you can wire it up two ways.
One has VBAT connected to VDD. The other one has VBAT connected to
external supply. See "Figure 1 : Application Example of SSD1306Z with
charge bump".

 Tomi


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [PATCH v2 4/5] fbdev/ssd1307fb: add support to enable VBAT
       [not found]                     ` <c0372d48-b538-64ce-f187-0502a9a4a00e-l0cyMroinI0@public.gmane.org>
@ 2017-01-19 16:22                         ` Rob Herring
  0 siblings, 0 replies; 28+ messages in thread
From: Rob Herring @ 2017-01-19 16:22 UTC (permalink / raw)
  To: Tomi Valkeinen
  Cc: Jyri Sarha, linux-fbdev-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Bartlomiej Zolnierkiewicz,
	Maxime Ripard, Benoit Cousson

On Thu, Jan 19, 2017 at 9:08 AM, Tomi Valkeinen <tomi.valkeinen-l0cyMroinI0@public.gmane.org> wrote:
> On 19/01/17 17:03, Rob Herring wrote:
>
>>>> According to the datasheet, SSD1307 has 2 supplies: Vdd and Vcc
>>>>
>>>> I don't see any mention of a charge pump, so that must be an external
>>>> component.
>>>
>>> VBAT is for SSD1306. Perhaps the DT doc should mention it.
>>
>> Datasheet says VBAT is reserved, connect to Vdd. I would just describe
>> Vdd and Vcc in that case.
>
> I'm no HW guy, but as far as I understand, you can wire it up two ways.
> One has VBAT connected to VDD. The other one has VBAT connected to
> external supply. See "Figure 1 : Application Example of SSD1306Z with
> charge bump".

I should have kept reading...

So either Vdd and Vbat supplies or Vdd and Vcc supplies are valid and
the former only applies to 1306.

Rob
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH v2 4/5] fbdev/ssd1307fb: add support to enable VBAT
@ 2017-01-19 16:22                         ` Rob Herring
  0 siblings, 0 replies; 28+ messages in thread
From: Rob Herring @ 2017-01-19 16:22 UTC (permalink / raw)
  To: Tomi Valkeinen
  Cc: Jyri Sarha, linux-fbdev-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Bartlomiej Zolnierkiewicz,
	Maxime Ripard, Benoit Cousson

On Thu, Jan 19, 2017 at 9:08 AM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote:
> On 19/01/17 17:03, Rob Herring wrote:
>
>>>> According to the datasheet, SSD1307 has 2 supplies: Vdd and Vcc
>>>>
>>>> I don't see any mention of a charge pump, so that must be an external
>>>> component.
>>>
>>> VBAT is for SSD1306. Perhaps the DT doc should mention it.
>>
>> Datasheet says VBAT is reserved, connect to Vdd. I would just describe
>> Vdd and Vcc in that case.
>
> I'm no HW guy, but as far as I understand, you can wire it up two ways.
> One has VBAT connected to VDD. The other one has VBAT connected to
> external supply. See "Figure 1 : Application Example of SSD1306Z with
> charge bump".

I should have kept reading...

So either Vdd and Vbat supplies or Vdd and Vcc supplies are valid and
the former only applies to 1306.

Rob

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

* Re: [PATCH v2 0/5] fbdev/ssd1307fb: Some changes and improvement
       [not found]   ` <cover.1484303628.git.jsarha-l0cyMroinI0@public.gmane.org>
@ 2017-02-08 15:15       ` Bartlomiej Zolnierkiewicz
  2017-01-13 10:35       ` Jyri Sarha
                         ` (4 subsequent siblings)
  5 siblings, 0 replies; 28+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2017-02-08 15:15 UTC (permalink / raw)
  To: Jyri Sarha
  Cc: linux-fbdev-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A, tomi.valkeinen-l0cyMroinI0,
	maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8,
	bcousson-rdvid1DuHRBWk0Htik3J/w


Hi,

On Friday, January 13, 2017 12:35:44 PM Jyri Sarha wrote:
> Changes since first version:
> - Cherry-picked "fbdev/ssd1307fb: add support to enable VBAT" again
>   beacuse of weird mixup in the first version
> - Also tested the code on top of v4.10-rc3 with am335x-icev2 evm
> 
> We needed these changes for couple of our evm. Some of these patches
> have been on mainline list before, but after that forgotten. Now we
> are forward porting these on for out internal release, so this is a
> good time to get them to mainline too.
> 
> Everything else is quite straight forward, but removing the
> reset-active-low dts property is a questionable at least in
> theory. However, in practice if anyone was using the property in their
> device-tree blobs, they have never been able to get desired effect
> with mainline kernel.
> 
> Jyri Sarha (3):
>   fbdev: ssd1307fb: Start to use gpiod API for reset gpio
>   fbdev: ssd1307fb: Remove reset-active-low from the DT binding document
>   fbdev: ssd1307fb: Make reset gpio devicetree property optional
> 
> Tomi Valkeinen (2):
>   fbdev/ssd1307fb: add support to enable VBAT
>   fbdev/ssd1307fb: clear screen in probe
> 
>  .../devicetree/bindings/display/ssd1307fb.txt      |  5 +-
>  drivers/video/fbdev/ssd1307fb.c                    | 55 ++++++++++++++--------
>  2 files changed, 38 insertions(+), 22 deletions(-)

Patchset queued for 4.11, thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH v2 0/5] fbdev/ssd1307fb: Some changes and improvement
@ 2017-02-08 15:15       ` Bartlomiej Zolnierkiewicz
  0 siblings, 0 replies; 28+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2017-02-08 15:15 UTC (permalink / raw)
  To: Jyri Sarha
  Cc: linux-fbdev-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A, tomi.valkeinen-l0cyMroinI0,
	maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8,
	bcousson-rdvid1DuHRBWk0Htik3J/w


Hi,

On Friday, January 13, 2017 12:35:44 PM Jyri Sarha wrote:
> Changes since first version:
> - Cherry-picked "fbdev/ssd1307fb: add support to enable VBAT" again
>   beacuse of weird mixup in the first version
> - Also tested the code on top of v4.10-rc3 with am335x-icev2 evm
> 
> We needed these changes for couple of our evm. Some of these patches
> have been on mainline list before, but after that forgotten. Now we
> are forward porting these on for out internal release, so this is a
> good time to get them to mainline too.
> 
> Everything else is quite straight forward, but removing the
> reset-active-low dts property is a questionable at least in
> theory. However, in practice if anyone was using the property in their
> device-tree blobs, they have never been able to get desired effect
> with mainline kernel.
> 
> Jyri Sarha (3):
>   fbdev: ssd1307fb: Start to use gpiod API for reset gpio
>   fbdev: ssd1307fb: Remove reset-active-low from the DT binding document
>   fbdev: ssd1307fb: Make reset gpio devicetree property optional
> 
> Tomi Valkeinen (2):
>   fbdev/ssd1307fb: add support to enable VBAT
>   fbdev/ssd1307fb: clear screen in probe
> 
>  .../devicetree/bindings/display/ssd1307fb.txt      |  5 +-
>  drivers/video/fbdev/ssd1307fb.c                    | 55 ++++++++++++++--------
>  2 files changed, 38 insertions(+), 22 deletions(-)

Patchset queued for 4.11, thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics


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

end of thread, other threads:[~2017-02-08 15:15 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20170113103601epcas4p38f03c4eb4147ff5a08e93af2cda635ba@epcas4p3.samsung.com>
2017-01-13 10:35 ` [PATCH v2 0/5] fbdev/ssd1307fb: Some changes and improvement Jyri Sarha
2017-01-13 10:35   ` Jyri Sarha
     [not found]   ` <cover.1484303628.git.jsarha-l0cyMroinI0@public.gmane.org>
2017-01-13 10:35     ` [PATCH v2 1/5] fbdev: ssd1307fb: Start to use gpiod API for reset gpio Jyri Sarha
2017-01-13 10:35       ` Jyri Sarha
2017-01-13 10:35     ` [PATCH v2 2/5] fbdev: ssd1307fb: Remove reset-active-low from the DT binding document Jyri Sarha
2017-01-13 10:35       ` Jyri Sarha
     [not found]       ` <b68e1b9b735543b9e1511cfeb8e5d9ceec6c7666.1484303628.git.jsarha-l0cyMroinI0@public.gmane.org>
2017-01-18 22:28         ` Rob Herring
2017-01-18 22:28           ` Rob Herring
2017-01-19  8:24           ` Jyri Sarha
2017-01-19  8:24             ` Jyri Sarha
2017-01-13 10:35     ` [PATCH v2 3/5] fbdev: ssd1307fb: Make reset gpio devicetree property optional Jyri Sarha
2017-01-13 10:35       ` Jyri Sarha
2017-01-13 10:35     ` [PATCH v2 4/5] fbdev/ssd1307fb: add support to enable VBAT Jyri Sarha
2017-01-13 10:35       ` Jyri Sarha
     [not found]       ` <214ae9ca86009148f233be71a3606917f3150dcd.1484303628.git.jsarha-l0cyMroinI0@public.gmane.org>
2017-01-18 22:33         ` Rob Herring
2017-01-18 22:33           ` Rob Herring
2017-01-19 13:15           ` Tomi Valkeinen
2017-01-19 13:15             ` Tomi Valkeinen
     [not found]             ` <754f3644-a157-bb90-1494-aba4fc1264f8-l0cyMroinI0@public.gmane.org>
2017-01-19 15:03               ` Rob Herring
2017-01-19 15:03                 ` Rob Herring
     [not found]                 ` <CAL_JsqLjTa2SWP_cNU9AV4tRZLDcjJsUV7pUvy=4UhQix7ZjQQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-01-19 15:08                   ` Tomi Valkeinen
2017-01-19 15:08                     ` Tomi Valkeinen
     [not found]                     ` <c0372d48-b538-64ce-f187-0502a9a4a00e-l0cyMroinI0@public.gmane.org>
2017-01-19 16:22                       ` Rob Herring
2017-01-19 16:22                         ` Rob Herring
2017-01-13 10:35     ` [PATCH v2 5/5] fbdev/ssd1307fb: clear screen in probe Jyri Sarha
2017-01-13 10:35       ` Jyri Sarha
2017-02-08 15:15     ` [PATCH v2 0/5] fbdev/ssd1307fb: Some changes and improvement Bartlomiej Zolnierkiewicz
2017-02-08 15:15       ` Bartlomiej Zolnierkiewicz

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.