Skip to contentSkip to conversation

video: stm32_ltdc: Convert to use APIs which support live DT

PATCH New Patrick Delaunay 4 participants 8 messages Sep 9, 2020 – Oct 2, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 video: stm32_ltdc: Convert to use APIs which support live DT

Use ofnode_ or dev_ APIs instead of fdt_ and fdtdec_ APIs so that the driver can support live DT.

---

 drivers/video/stm32/stm32_ltdc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/video/stm32/stm32_ltdc.c +1 -2
index 2f3427a32e..7fff735930 100644
@@ -366,8 +366,7 @@ static int stm32_ltdc_probe(struct udevice *dev)
 
 	ret = panel_get_display_timing(panel, &timings);
 	if (ret) {
-		ret = fdtdec_decode_display_timing(gd->fdt_blob,
-						   dev_of_offset(panel),
+		ret = ofnode_decode_display_timing(dev_ofnode(panel),
 						   0, &timings);
 		if (ret) {
 			dev_err(dev, "decode display timing error %d\n", ret);
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/2 video: stm32_ltdc: Convert to use APIs which support live DT

Hi,

Quoted 12 lines

From: Patrick DELAUNAY <[email protected]>
Sent: mercredi 9 septembre 2020 17:44

Use ofnode_ or dev_ APIs instead of fdt_ and fdtdec_ APIs so that the driver can support live DT.

---

 drivers/video/stm32/stm32_ltdc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Applied to u-boot-stm/next, thanks!

Regards

Patrick

#2 lore raw

PATCH 1/2 video: stm32_ltdc: Convert to use APIs which support live DT

In reply to Patrick Delaunay
Quoted 24 lines · Patrick Delaunay

Use ofnode_ or dev_ APIs instead of fdt_ and fdtdec_ APIs so that the driver can support live DT.

---

  drivers/video/stm32/stm32_ltdc.c | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)
drivers/video/stm32/stm32_ltdc.c +1 -2
index 2f3427a32e..7fff735930 100644
@@ -366,8 +366,7 @@ static int stm32_ltdc_probe(struct udevice *dev)
 
  	ret = panel_get_display_timing(panel, &timings);
  	if (ret) {
-		ret = fdtdec_decode_display_timing(gd->fdt_blob,
-						   dev_of_offset(panel),
+		ret = ofnode_decode_display_timing(dev_ofnode(panel),
  						   0, &timings);
  		if (ret) {
  			dev_err(dev, "decode display timing error %d\n", ret);
#3 lore raw

PATCH 1/2 video: stm32_ltdc: Convert to use APIs which support live DT

In reply to Patrick Delaunay

Hi Patrick

Quoted 14 lines · Patrick Delaunay

Use ofnode_ or dev_ APIs instead of fdt_ and fdtdec_ APIs so that the driver can support live DT.

---

 drivers/video/stm32/stm32_ltdc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/video/stm32/stm32_ltdc.c +0 -0
index 2f3427a32e..7fff735930 100644

drivers/video/stm32/stm32_ltdc.c static int stm32_ltdc_probe(struct udevice *dev) · line 372

Quoted 9 lines
drivers/video/stm32/stm32_ltdc.c +1 -2
@@ -366,8 +366,7 @@ static int stm32_ltdc_probe(struct udevice *dev)
 
 	ret = panel_get_display_timing(panel, &timings);
 	if (ret) {
-		ret = fdtdec_decode_display_timing(gd->fdt_blob,
-						   dev_of_offset(panel),
+		ret = ofnode_decode_display_timing(dev_ofnode(panel),
 						   0, &timings);
 		if (ret) {
 			dev_err(dev, "decode display timing error %d\n", ret);

Thanks

#4 lore raw

PATCH 2/2 video: stm32_dsi: Convert to use APIs which support live DT

In reply to Patrick Delaunay

Use ofnode_ or dev_ APIs instead of fdt_ and fdtdec_ APIs so that the driver can support live DT.

---

 drivers/video/stm32/stm32_dsi.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/video/stm32/stm32_dsi.c +1 -2
index 283151398b..9d5abacc2b 100644
@@ -359,8 +359,7 @@ static int stm32_dsi_attach(struct udevice *dev)
 
 	ret = panel_get_display_timing(priv->panel, &timings);
 	if (ret) {
-		ret = fdtdec_decode_display_timing(gd->fdt_blob,
-						   dev_of_offset(priv->panel),
+		ret = ofnode_decode_display_timing(dev_ofnode(priv->panel),
 						   0, &timings);
 		if (ret) {
 			dev_err(dev, "decode display timing error %d\n", ret);
Signature · 1 line
2.17.1
#6 lore raw

PATCH 2/2 video: stm32_dsi: Convert to use APIs which support live DT

In reply to Patrick Delaunay
Quoted 24 lines · Patrick Delaunay

Use ofnode_ or dev_ APIs instead of fdt_ and fdtdec_ APIs so that the driver can support live DT.

---

  drivers/video/stm32/stm32_dsi.c | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)
drivers/video/stm32/stm32_dsi.c +1 -2
index 283151398b..9d5abacc2b 100644
@@ -359,8 +359,7 @@ static int stm32_dsi_attach(struct udevice *dev)
 
  	ret = panel_get_display_timing(priv->panel, &timings);
  	if (ret) {
-		ret = fdtdec_decode_display_timing(gd->fdt_blob,
-						   dev_of_offset(priv->panel),
+		ret = ofnode_decode_display_timing(dev_ofnode(priv->panel),
  						   0, &timings);
  		if (ret) {
  			dev_err(dev, "decode display timing error %d\n", ret);
#7 lore raw

PATCH 2/2 video: stm32_dsi: Convert to use APIs which support live DT

In reply to Patrick Delaunay

Hi,

Quoted 12 lines

From: Patrick DELAUNAY <[email protected]>
Sent: mercredi 9 septembre 2020 17:44

Use ofnode_ or dev_ APIs instead of fdt_ and fdtdec_ APIs so that the driver can support live DT.

---

 drivers/video/stm32/stm32_dsi.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Applied to u-boot-stm/next, thanks!

Regards

Patrick