Re: DSS2 panel question

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

 



Hi, Grazvydas Ignotas

What did you mean "Hm, omap_dss_register_device() takes omap_dss_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?
BTW, what's the location for DSS2 code in linux-omap tree? Seems not
see it anywhere


- 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