From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Jyri Sarha <jsarha@ti.com>, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 02/13] drm/omap: acx565akm: remove non-DT support
Date: Fri, 12 May 2017 15:10:31 +0300 [thread overview]
Message-ID: <1522173.IbNSfixIWc@avalon> (raw)
In-Reply-To: <1494585702-9665-3-git-send-email-tomi.valkeinen@ti.com>
Hi Tomi,
Thank you for the patch.
On Friday 12 May 2017 13:41:31 Tomi Valkeinen wrote:
> Non-DT booting is no longer supported, so remove legacy code.
>
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
> ---
> .../drm/omapdrm/displays/panel-sony-acx565akm.c | 50 +++----------------
> 1 file changed, 6 insertions(+), 44 deletions(-)
>
> diff --git a/drivers/gpu/drm/omapdrm/displays/panel-sony-acx565akm.c
> b/drivers/gpu/drm/omapdrm/displays/panel-sony-acx565akm.c index
> 5ab39e0060f2..be368868f77f 100644
> --- a/drivers/gpu/drm/omapdrm/displays/panel-sony-acx565akm.c
> +++ b/drivers/gpu/drm/omapdrm/displays/panel-sony-acx565akm.c
> @@ -32,8 +32,6 @@
> #include <linux/of.h>
> #include <linux/of_gpio.h>
Slightly out of scope for this patch, it would be nice to convert the driver
to gpiod.
>
> -#include <video/omap-panel-data.h>
> -
> #include "../dss/omapdss.h"
>
> #define MIPID_CMD_READ_DISP_ID 0x04
> @@ -69,7 +67,6 @@ struct panel_drv_data {
> struct omap_dss_device *in;
>
> int reset_gpio;
> - int datapairs;
>
> struct videomode vm;
>
> @@ -547,9 +544,6 @@ static int acx565akm_panel_power_on(struct
> omap_dss_device *dssdev)
>
> in->ops.sdi->set_timings(in, &ddata->vm);
>
> - if (ddata->datapairs > 0)
> - in->ops.sdi->set_datapairs(in, ddata->datapairs);
> -
> r = in->ops.sdi->enable(in);
> if (r) {
> pr_err("%s sdi enable failed\n", __func__);
> @@ -701,32 +695,6 @@ static struct omap_dss_driver acx565akm_ops = {
> .get_resolution = omapdss_default_get_resolution,
> };
>
> -static int acx565akm_probe_pdata(struct spi_device *spi)
> -{
> - const struct panel_acx565akm_platform_data *pdata;
> - struct panel_drv_data *ddata = dev_get_drvdata(&spi->dev);
> - struct omap_dss_device *dssdev, *in;
> -
> - pdata = dev_get_platdata(&spi->dev);
> -
> - ddata->reset_gpio = pdata->reset_gpio;
> -
> - in = omap_dss_find_output(pdata->source);
> - if (in == NULL) {
> - dev_err(&spi->dev, "failed to find video source '%s'\n",
> - pdata->source);
> - return -EPROBE_DEFER;
> - }
> - ddata->in = in;
> -
> - ddata->datapairs = pdata->datapairs;
> -
> - dssdev = &ddata->dssdev;
> - dssdev->name = pdata->name;
> -
> - return 0;
> -}
> -
> static int acx565akm_probe_of(struct spi_device *spi)
> {
> struct panel_drv_data *ddata = dev_get_drvdata(&spi->dev);
> @@ -754,6 +722,9 @@ static int acx565akm_probe(struct spi_device *spi)
>
> dev_dbg(&spi->dev, "%s\n", __func__);
>
> + if (!spi->dev.of_node)
> + return -ENODEV;
> +
This can't happen (I won't repeat the comment for the other patches in the
series, please take it into account where applicable).
> spi->mode = SPI_MODE_3;
>
> ddata = devm_kzalloc(&spi->dev, sizeof(*ddata), GFP_KERNEL);
> @@ -766,18 +737,9 @@ static int acx565akm_probe(struct spi_device *spi)
>
> mutex_init(&ddata->mutex);
>
> - if (dev_get_platdata(&spi->dev)) {
> - r = acx565akm_probe_pdata(spi);
> - if (r)
> - return r;
> - } else if (spi->dev.of_node) {
> - r = acx565akm_probe_of(spi);
> - if (r)
> - return r;
> - } else {
> - dev_err(&spi->dev, "platform data missing!\n");
> - return -ENODEV;
> - }
> + r = acx565akm_probe_of(spi);
> + if (r)
> + return r;
>
> if (gpio_is_valid(ddata->reset_gpio)) {
> r = devm_gpio_request_one(&spi->dev, ddata->reset_gpio,
--
Regards,
Laurent Pinchart
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2017-05-12 12:10 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-12 10:41 [PATCH 00/13] drm/omap: legacy cleanup Tomi Valkeinen
2017-05-12 10:41 ` [PATCH 01/13] drm/omap: panel-dpi: remove non-DT support Tomi Valkeinen
2017-05-12 12:08 ` Laurent Pinchart
2017-05-12 12:29 ` Tomi Valkeinen
2017-05-12 12:30 ` Laurent Pinchart
2017-05-12 10:41 ` [PATCH 02/13] drm/omap: acx565akm: " Tomi Valkeinen
2017-05-12 12:10 ` Laurent Pinchart [this message]
2017-05-12 10:41 ` [PATCH 03/13] drm/omap: connector-analog-tv: " Tomi Valkeinen
2017-05-12 10:41 ` [PATCH 04/13] drm/omap: connector-dvi/hdmi: remove extra include Tomi Valkeinen
2017-05-12 12:14 ` Laurent Pinchart
2017-05-12 10:41 ` [PATCH 05/13] drm/omap: sdi: remove legacy set_datapairs Tomi Valkeinen
2017-05-12 12:14 ` Laurent Pinchart
2017-05-12 10:41 ` [PATCH 06/13] drm/omap: venc: remove set_type & invert_vid_out_polarity Tomi Valkeinen
2017-05-12 12:15 ` Laurent Pinchart
2017-05-12 10:41 ` [PATCH 07/13] drm/omap: remove recommended_bpp Tomi Valkeinen
2017-05-12 12:16 ` Laurent Pinchart
2017-05-12 10:41 ` [PATCH 08/13] drm/omap: dpi: remove legacy data_lines Tomi Valkeinen
2017-05-12 12:17 ` Laurent Pinchart
2017-05-12 10:41 ` [PATCH 09/13] drm/omap: remove rfbi Tomi Valkeinen
2017-05-12 12:18 ` Laurent Pinchart
2017-05-12 10:41 ` [PATCH 10/13] drm/omap: remove unused get_dimensions() Tomi Valkeinen
2017-05-12 12:19 ` Laurent Pinchart
2017-05-12 10:41 ` [PATCH 11/13] drm/omap: remove legacy get_resolution Tomi Valkeinen
2017-05-12 12:20 ` Laurent Pinchart
2017-05-12 10:41 ` [PATCH 12/13] drm/omap: remove unused fields Tomi Valkeinen
2017-05-12 12:21 ` Laurent Pinchart
2017-05-12 10:41 ` [PATCH 13/13] drm/omap: remove omap_overlay & omap_overlay_manager Tomi Valkeinen
2017-05-12 12:25 ` Laurent Pinchart
2017-05-12 12:33 ` [PATCH 14/13] drm: omapdrm: Remove unused omap_dss_find_output() function Laurent Pinchart
2017-05-12 12:40 ` Tomi Valkeinen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1522173.IbNSfixIWc@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jsarha@ti.com \
--cc=tomi.valkeinen@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox