On Sun, Feb 06, 2022 at 09:00:12AM +0100, Andreas Kemnade wrote: > This driver is for the EPD controller in the i.MX SoCs. Add a skeleton > and basic things for the driver > > Signed-off-by: Andreas Kemnade <andreas@xxxxxxxxxxxx> > --- > drivers/gpu/drm/Kconfig | 2 + > drivers/gpu/drm/Makefile | 1 + > drivers/gpu/drm/mxc-epdc/Kconfig | 15 + > drivers/gpu/drm/mxc-epdc/Makefile | 5 + > drivers/gpu/drm/mxc-epdc/epdc_regs.h | 442 ++++++++++++++++++++++++ > drivers/gpu/drm/mxc-epdc/mxc_epdc.h | 20 ++ > drivers/gpu/drm/mxc-epdc/mxc_epdc_drv.c | 248 +++++++++++++ > 7 files changed, 733 insertions(+) > create mode 100644 drivers/gpu/drm/mxc-epdc/Kconfig > create mode 100644 drivers/gpu/drm/mxc-epdc/Makefile > create mode 100644 drivers/gpu/drm/mxc-epdc/epdc_regs.h > create mode 100644 drivers/gpu/drm/mxc-epdc/mxc_epdc.h > create mode 100644 drivers/gpu/drm/mxc-epdc/mxc_epdc_drv.c > > diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig > index b1f22e457fd0..6b6b44ff7556 100644 > --- a/drivers/gpu/drm/Kconfig > +++ b/drivers/gpu/drm/Kconfig > @@ -390,6 +390,8 @@ source "drivers/gpu/drm/gud/Kconfig" > > source "drivers/gpu/drm/sprd/Kconfig" > > +source "drivers/gpu/drm/mxc-epdc/Kconfig" I'd put it under gpu/drm/imx/epdc, perhaps. > +int mxc_epdc_output(struct drm_device *drm) > +{ > + struct mxc_epdc *priv = to_mxc_epdc(drm); > + int ret; > + > + priv->connector.dpms = DRM_MODE_DPMS_OFF; > + priv->connector.polled = 0; > + drm_connector_helper_add(&priv->connector, > + &mxc_epdc_connector_helper_funcs); > + ret = drm_connector_init(drm, &priv->connector, > + &mxc_epdc_connector_funcs, > + DRM_MODE_CONNECTOR_Unknown); > + if (ret) > + return ret; > + ret = of_get_display_timing(drm->dev->of_node, "timing", &priv->timing); > + if (ret) > + return ret; > + > + return 0; Possible to simplify to: return of_get_display_timing(drm->dev->of_node, "timing", &priv->timing); Jonathan
Attachment:
signature.asc
Description: PGP signature