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@lechnology.com Signed-off-by: Noralf Trønnes noralf@tronnes.org
...
@@ -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); }