Re: [PATCH 3/4] drm/tiny/mi0283qt: Move driver to panel-ilitek-ili9341

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8/1/19 8:52 AM, Noralf Trønnes wrote:
The MI0283QT panels use a ILI9341 controller so it makes sense to merge
it with the other ili9341 code.

The DRM driver name is ABI, so that is retained.

Cc: David Lechner <david@xxxxxxxxxxxxxx>
Signed-off-by: Noralf Trønnes <noralf@xxxxxxxxxxx>
---

...

@@ -216,6 +339,10 @@ static int ili9341_probe(struct spi_device *spi)
  		return PTR_ERR(dc);
  	}
+ ili->regulator = devm_regulator_get(dev, "power");
+	if (IS_ERR(ili->regulator))
+		return PTR_ERR(ili->regulator);
+
  	ili->backlight = devm_of_find_backlight(dev);
  	if (IS_ERR(ili->backlight))
  		return PTR_ERR(ili->backlight);
@@ -230,7 +357,12 @@ static int ili9341_probe(struct spi_device *spi)
  	ili->panel.dev = dev;
  	ili->panel.funcs = ili->conf->funcs;

Should probably add a comment here that this is for backwards
compatibility of the driver name so that no one is tempted to
to add more driver structs when adding new panels.

-	return drm_mipi_dbi_panel_register(&ili->panel, &ili->dbidev, &ili9341_drm_driver,
+	if (ili->conf == &mi0283qt_data)
+		driver = &mi0283qt_drm_driver;
+	else
+		driver = &ili9341_drm_driver;
+
+	return drm_mipi_dbi_panel_register(&ili->panel, &ili->dbidev, driver,
  					   ili->conf->mode, rotation);
  }
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux