linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomba@iki.fi>
To: Pantelis Antoniou <panto@antoniou-consulting.com>
Cc: Tony Lindgren <tony@atomide.com>,
	linux-kernel@vger.kernel.org,
	Koen Kooi <koen@dominion.thruhere.net>,
	Matt Porter <mporter@ti.com>, Russ Dill <Russ.Dill@ti.com>,
	linux-omap@vger.kernel.org
Subject: Re: [PATCH 2/3] da8xx-dt: Create da8xx DT adapter device
Date: Thu, 01 Nov 2012 16:36:09 +0200	[thread overview]
Message-ID: <509288D9.7030406@iki.fi> (raw)
In-Reply-To: <1351783082-11411-3-git-send-email-panto@antoniou-consulting.com>

On 2012-11-01 17:18, Pantelis Antoniou wrote:
> omap_device is going private.
> 
> Move the da8xx-dt adapter device to arch/arm/mach-omap2.
> 
> Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>


> +
> +	/* display_panel */
> +	priv->lcd_panel.panel_type	= QVGA;
> +	priv->lcd_panel.max_bpp		= 16;
> +	priv->lcd_panel.min_bpp		= 16;
> +	priv->lcd_panel.panel_shade	= COLOR_ACTIVE;
> +
> +	/* lcd_ctrl_config */
> +	priv->lcd_cfg.p_disp_panel	= &priv->lcd_panel;
> +	priv->lcd_cfg.ac_bias		= 255;
> +	priv->lcd_cfg.ac_bias_intrpt	= 0;
> +	priv->lcd_cfg.dma_burst_sz	= 16;
> +	priv->lcd_cfg.bpp		= 16;
> +	priv->lcd_cfg.fdd		= 0x80;
> +	priv->lcd_cfg.tft_alt_mode	= 0;
> +	priv->lcd_cfg.stn_565_mode	= 0;
> +	priv->lcd_cfg.mono_8bit_mode	= 0;
> +	priv->lcd_cfg.invert_line_clock	= 1;
> +	priv->lcd_cfg.invert_frm_clock	= 1;
> +	priv->lcd_cfg.sync_edge		= 0;
> +	priv->lcd_cfg.sync_ctrl		= 1;
> +	priv->lcd_cfg.raster_order	= 0;
> +
> +	/* da8xx_lcdc_platform_data */
> +	strcpy(priv->lcd_pdata.manu_name, "BBToys");
> +	priv->lcd_pdata.controller_data = &priv->lcd_cfg;
> +	strcpy(priv->lcd_pdata.type, panel_type);
> +
> +	priv->lcdc_oh = omap_hwmod_lookup("lcdc");
> +	if (priv->lcdc_oh == NULL) {
> +		dev_err(&pdev->dev, "Failed to lookup omap_hwmod lcdc\n");
> +		return -ENODEV;
> +	}
> +
> +	priv->lcdc_pdev = omap_device_build("da8xx_lcdc", 0, priv->lcdc_oh,
> +			&priv->lcd_pdata,
> +			sizeof(struct da8xx_lcdc_platform_data),
> +			NULL, 0, 0);
> +	if (priv->lcdc_pdev == NULL) {
> +		dev_err(&pdev->dev, "Failed to build LCDC device\n");
> +		return -ENODEV;
> +	}

I know nothing about BeagleBone, da8xx_lcdc, or the capes, but here are
my thoughts... =)

If I understood this cape-thing correctly, to handle the LCDs properly
the da8xx_lcdc driver should be changed to be more dynamic.

The da8xx_lcdc device should be always added by the standard SoC code.
If the LCD panel is fixed for the board in question, the lcdc could be
passed the LCD data as done now (I guess).

But in beaglebone's case the platform data for lcdc should be empty, and
the lcdc driver should do just minimal setup, like memmapping its
registers. No pinmuxing nor other such things.

When the cape is identified and the cape's driver is loaded, the driver
would configure lcdc depending on the cape, including pinmuxing. After
that the LCD should be functional.

 Tomi


  reply	other threads:[~2012-11-01 14:36 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-01 15:17 [PATCH 0/3] capebus moving omap_devices to mach-omap2 Pantelis Antoniou
2012-10-31 17:52 ` Tony Lindgren
2012-10-31 18:04   ` Pantelis Antoniou
2012-10-31 18:09     ` Tony Lindgren
2012-10-31 18:24       ` Pantelis Antoniou
2012-10-31 19:55       ` Benoit Cousson
2012-10-31 20:12         ` Pantelis Antoniou
2012-10-31 21:26           ` Tony Lindgren
2012-10-31 21:36             ` Pantelis Antoniou
2012-10-31 21:43               ` Tony Lindgren
2012-10-31 22:00                 ` Pantelis Antoniou
2012-10-31 22:16                   ` Tony Lindgren
2012-10-31 22:14               ` Felipe Balbi
2012-11-01  7:02                 ` Pantelis Antoniou
2012-11-01 10:23                   ` Cousson, Benoit
2012-11-01 10:39                     ` Pantelis Antoniou
2012-11-01 11:04                       ` Felipe Balbi
2012-11-01 11:26                         ` Pantelis Antoniou
2012-11-01 12:40                           ` Felipe Balbi
2012-11-01 12:57                             ` Pantelis Antoniou
2012-11-01 13:16                               ` Felipe Balbi
2012-11-01 13:35                                 ` Pantelis Antoniou
2012-11-01 13:51                                   ` Alan Cox
2012-11-01 13:59                                     ` Pantelis Antoniou
2012-11-01 22:05                                       ` Felipe Balbi
2012-11-01 23:49                                         ` Russ Dill
2012-11-02  8:57                                           ` Felipe Balbi
2012-11-02  9:42                                             ` Russ Dill
2012-11-02 10:39                                               ` Koen Kooi
2012-11-02 11:00                                               ` Felipe Balbi
2012-11-02 16:44                                                 ` Russ Dill
2012-11-02 11:21                                           ` Alan Cox
2012-11-02 12:32                                             ` Pantelis Antoniou
2012-11-05  0:37                                               ` Grant Likely
2012-11-05 15:37                                                 ` Pantelis Antoniou
2012-11-05 19:10                                                   ` Grant Likely
2012-11-05 19:54                                                     ` Pantelis Antoniou
2012-11-05 20:14                                                       ` Grant Likely
2012-11-05 22:59                                                         ` Joel A Fernandes
2012-11-05 23:58                                                           ` Grant Likely
2012-11-06  3:06                                                             ` Joel A Fernandes
2012-11-06  8:14                                                               ` Pantelis Antoniou
2012-11-06 11:16                                                                 ` Grant Likely
2012-11-06 13:54                                                                   ` Pantelis Antoniou
2012-11-02 16:07                                             ` Jason Kridner
2012-11-02 16:28                                               ` Alan Cox
2012-11-05  1:05                                               ` Grant Likely
2012-11-01 11:26                       ` Cousson, Benoit
2012-11-01 11:39                         ` Pantelis Antoniou
2012-11-01 12:00                         ` Koen Kooi
2012-11-01 13:06                           ` Felipe Balbi
2012-11-01 13:33                             ` Koen Kooi
2012-11-02  8:15                           ` Cousson, Benoit
2012-11-02  8:43                             ` Pantelis Antoniou
2012-11-03  8:23                               ` Kevin Hilman
     [not found]                               ` <40797D3D-D62C-4E15-B0DF-75636C1637EE-wVdstyuyKrO8r51toPun2/C9HSW9iNxf@public.gmane.org>
2012-11-05  0:22                                 ` Grant Likely
2012-11-05 13:25                                   ` Pantelis Antoniou
2012-11-05 14:34                                     ` Grant Likely
     [not found]                                       ` <CACxGe6ubcRqDEGyRbNmwvAMGg5ujAKvPRWe9Vmd9tiHeB7=qNw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-11-05 15:34                                         ` Tony Lindgren
2012-11-05 15:56                                         ` Rob Herring
2012-11-05 19:40                                           ` Grant Likely
2012-11-01 15:18 ` [PATCH 1/3] omap-device: Remove __init from omap_device_build family functions Pantelis Antoniou
2012-11-01 15:18 ` [PATCH 2/3] da8xx-dt: Create da8xx DT adapter device Pantelis Antoniou
2012-11-01 14:36   ` Tomi Valkeinen [this message]
2012-11-01 14:38     ` Pantelis Antoniou
2012-11-01 15:18 ` [PATCH 3/3] ti-tscadc-dt: Create ti-tscadc-dt " Pantelis Antoniou

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=509288D9.7030406@iki.fi \
    --to=tomba@iki.fi \
    --cc=Russ.Dill@ti.com \
    --cc=koen@dominion.thruhere.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=mporter@ti.com \
    --cc=panto@antoniou-consulting.com \
    --cc=tony@atomide.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;
as well as URLs for NNTP newsgroup(s).