Re: DSS2 panel question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Nov 25, 2009 at 7:44 PM, TAO HU <tghk48@xxxxxxxxxxxx> wrote:
> Hi, Grazvydas Ignotas
>
> What did you mean "Hm, omap_dss_register_device() takes omap_dss_driver"?

Whoops, I meant omap_dss_register_driver()

> Below is what I saw from the code
>  int omap_dss_register_device(struct omap_dss_device *dssdev)
>
> I assume the code I have is for DSS. Does DSS2 change the API?

I was referring to version that is being submitted to mainline, and
panel drivers in particular, like:
http://git.kernel.org/?p=linux/kernel/git/next/linux-next.git;a=blob;f=drivers/video/omap2/displays/panel-generic.c;h=eb48d1afd8008437458bb3fe87e351b5ce785c42;hb=HEAD

> BTW, what's the location for DSS2 code in linux-omap tree? Seems not
> see it anywhere

Tony is probably waiting for it to reach mainline and fall from there.

>
> - Hu Tao
>
>
> On Wed, Nov 25, 2009 at 6:53 PM, Grazvydas Ignotas <notasas@xxxxxxxxx> wrote:
>> On Mon, Nov 23, 2009 at 7:41 PM, TAO HU <tghk48@xxxxxxxxxxxx> wrote:
>>> Hi,
>>>
>>> One idea as below
>>>
>>> struct spi_dss_device {
>>>              struct omap_dss_device dss_dev;
>>>              struct spi_dss_dev_priv  * spi_data;
>>> } spi_dss_dev;
>>
>> Hm, omap_dss_register_device() takes omap_dss_driver, not
>> omap_dss_device. Anyway that wouldn't work if there were 2 instances
>> of same panel in one system I guess, as 2 different spi_data instances
>> would probe, when there is only one omap_dss_driver.
>>
>> Instead I'm thinking to link omap_dss_device with spi in board file
>> itself by (ab)using platform_data:
>>
>> static struct omap_dss_device pandora_lcd_device = {
>> ...
>> };
>>
>> struct spi_board_info pandora_spi_board_info = {
>>  .bus_num = 1,
>>  ...
>>  .platform_data = pandora_lcd_device,
>> };
>>
>> Then in panel driver:
>>
>> int spi_probe(struct spi_device *spi)
>> {
>>  struct omap_dss_device *dssdev = spi->dev.platform_data;
>>  dev_set_drvdata(&dssdev->dev, spi);
>> }
>>
>> static int lcd_probe(struct omap_dss_device *dssdev)
>> {
>>  struct spi_device *spi = dev_get_drvdata(&dssdev->dev);
>> }
>>
>> Tomi, does that look reasonable to you?
>>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux