linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: tomi.valkeinen@nokia.com (Tomi Valkeinen)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/3] OMAP: DSS2: Add generic DPI panel display driver
Date: Wed, 17 Nov 2010 14:44:01 +0200	[thread overview]
Message-ID: <1289997841.26444.21.camel@tubuntu> (raw)
In-Reply-To: <1289960640-8782-2-git-send-email-bryan.wu@canonical.com>

On Wed, 2010-11-17 at 10:23 +0800, ext Bryan Wu wrote:
> Generic DPI panel driver includes the driver and 4 similar panel configurations. It
> will match the panel name which is passed from platform data and setup the
> right configurations.
> 
> With generic DPI panel driver, we can remove those 4 duplicated panel display
> drivers. In the future, it is simple for us just add new panel configuration
> date in panel-generic-dpi.c to support new display panel.
> 
> Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
> ---
>  .../arm/plat-omap/include/plat/panel-generic-dpi.h |   37 ++
>  drivers/video/omap2/displays/Kconfig               |    8 +
>  drivers/video/omap2/displays/Makefile              |    1 +
>  drivers/video/omap2/displays/panel-generic-dpi.c   |  348 ++++++++++++++++++++
>  4 files changed, 394 insertions(+), 0 deletions(-)
>  create mode 100644 arch/arm/plat-omap/include/plat/panel-generic-dpi.h
>  create mode 100644 drivers/video/omap2/displays/panel-generic-dpi.c
> 

<snip>

> +static int generic_dpi_panel_probe(struct omap_dss_device *dssdev)
> +{
> +	struct panel_generic_dpi_data *panel_data = get_panel_data(dssdev);
> +	struct panel_config *panel_config = NULL;
> +	struct panel_drv_data *drv_data = NULL;
> +	int i;
> +
> +	dev_dbg(&dssdev->dev, "probe\n");
> +
> +	if (!panel_data || !panel_data->name)
> +		return -EINVAL;
> +
> +	for (i = 0; i < ARRAY_SIZE(generic_dpi_panels); i++) {
> +		if (strcmp(panel_data->name, generic_dpi_panels[i].name) == 0) {
> +			panel_config = &generic_dpi_panels[i];
> +			break;
> +		}
> +	}
> +
> +	if (!panel_config)
> +		return -EINVAL;
> +
> +	dssdev->panel.config = panel_config->config;
> +	dssdev->panel.timings = panel_config->timings;
> +	dssdev->panel.acb = panel_config->acb;
> +	dssdev->panel.acbi = panel_config->acbi;
> +
> +	drv_data = kzalloc(sizeof(*drv_data), GFP_KERNEL);
> +	if (!drv_data)
> +		return -ENOMEM;
> +
> +	drv_data->dssdev = dssdev;
> +	drv_data->panel_config = panel_config;
> +
> +	dev_set_drvdata(&dssdev->dev, drv_data);
> +
> +	return 0;
> +}
> +
> +static void generic_dpi_panel_remove(struct omap_dss_device *dssdev)
> +{
> +}

You need to free the drv_data here.

Perhaps this will be the last fix =).

 Tomi

  reply	other threads:[~2010-11-17 12:44 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-17  2:23 [PATCH 0/3] OMAP: DSS2: introduce generic panel display driver (try #7) Bryan Wu
2010-11-17  2:23 ` [PATCH 1/3] OMAP: DSS2: Add generic DPI panel display driver Bryan Wu
2010-11-17 12:44   ` Tomi Valkeinen [this message]
2010-11-17 13:38     ` Bryan Wu
2010-11-17  2:23 ` [PATCH 2/3] OMAP: use generic DPI panel driver in board files Bryan Wu
2010-11-17  2:24 ` [PATCH 3/3] OMAP: DSS2: remove generic DPI panel driver duplicated panel drivers Bryan Wu
2010-11-17 12:47 ` [PATCH 0/3] OMAP: DSS2: introduce generic panel display driver (try #7) Taneja, Archit
  -- strict thread matches above, loose matches on Subject: below --
2010-11-17 13:34 [PATCH 0/3] OMAP: DSS2: introduce generic panel display driver (try #8) Bryan Wu
2010-11-17 13:34 ` [PATCH 1/3] OMAP: DSS2: Add generic DPI panel display driver Bryan Wu
2010-11-17 16:13   ` Premi, Sanjeev
2010-11-18  1:00     ` Bryan Wu
2010-11-16  4:17 [PATCH 0/3] OMAP: DSS2: introduce generic panel display driver (try #6) Bryan Wu
2010-11-16  4:17 ` [PATCH 1/3] OMAP: DSS2: Add generic DPI panel display driver Bryan Wu
2010-11-16 15:21   ` Tomi Valkeinen
2010-11-17  6:31     ` Bryan Wu
2010-11-09 17:12 [PATCH 0/3] OMAP: DSS2: introduce generic panel display driver (try #5) Bryan Wu
2010-11-09 17:12 ` [PATCH 1/3] OMAP: DSS2: Add generic DPI panel display driver Bryan Wu
2010-11-10 14:35   ` Tomi Valkeinen
2010-11-14  1:42     ` Bryan Wu
2010-11-15  4:05       ` Taneja, Archit
2010-11-15  5:33         ` Bryan Wu
2010-11-15  8:43           ` Taneja, Archit
2010-11-15  9:16       ` Tomi Valkeinen
2010-11-08 21:44 [PATCH 0/3] OMAP: DSS2: introduce generic panel display driver (try #4) Bryan Wu
2010-11-08 21:44 ` [PATCH 1/3] OMAP: DSS2: Add generic DPI panel display driver Bryan Wu
2010-11-09 10:23   ` 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=1289997841.26444.21.camel@tubuntu \
    --to=tomi.valkeinen@nokia.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).