From: Archit Taneja <a0393947@ti.com>
To: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org
Subject: Re: [PATCH 08/25] OMAPDSS: clean up the omapdss platform data mess
Date: Fri, 04 May 2012 08:48:17 +0000 [thread overview]
Message-ID: <4FA39501.3070205@ti.com> (raw)
In-Reply-To: <1336120320.2701.1.camel@deskari>
On Friday 04 May 2012 02:02 PM, Tomi Valkeinen wrote:
> On Fri, 2012-05-04 at 11:02 +0530, Archit Taneja wrote:
>> Hi,
>>
>> On Thursday 03 May 2012 07:27 PM, Tomi Valkeinen wrote:
>>> The omapdss pdata handling is a mess. This is more evident when trying
>>> to use device tree for DSS, as we don't have platform data anymore in
>>> that case. This patch cleans the pdata handling by:
>>>
>>> - Remove struct omap_display_platform_data. It was used just as a
>>> wrapper for struct omap_dss_board_info.
>>> - Pass the platform data only to omapdss device. The drivers for omap
>>> dss hwmods do not need the platform data. This should also work better
>>> for DT, as we can create omapdss device programmatically in generic omap
>>> boot code, and thus we can pass the pdata to it.
>>> - Create dss functions for get_ctx_loss_count and dsi_enable/disable_pads
>>> that the dss hwmod drivers can call.
>>>
>>> Signed-off-by: Tomi Valkeinen<tomi.valkeinen@ti.com>
>>> ---
>>> arch/arm/mach-omap2/display.c | 39 +++++++++++++++++++--------------------
>>> drivers/video/omap2/dss/core.c | 35 +++++++++++++++++++++++++++++++++++
>>> drivers/video/omap2/dss/dispc.c | 21 ++-------------------
>>> drivers/video/omap2/dss/dsi.c | 17 +++--------------
>>> drivers/video/omap2/dss/dss.h | 3 +++
>>> drivers/video/omap2/dss/hdmi.c | 2 --
>>> include/video/omapdss.h | 5 -----
>>> 7 files changed, 62 insertions(+), 60 deletions(-)
>>>
>>> diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c
>>> index 60cded4..07232fd 100644
>>> --- a/arch/arm/mach-omap2/display.c
>>> +++ b/arch/arm/mach-omap2/display.c
>>> @@ -191,10 +191,24 @@ int __init omap_display_init(struct omap_dss_board_info *board_data)
>>> struct omap_hwmod *oh;
>>> struct platform_device *pdev;
>>> int i, oh_count;
>>> - struct omap_display_platform_data pdata;
>>> const struct omap_dss_hwmod_data *curr_dss_hwmod;
>>>
>>> - memset(&pdata, 0, sizeof(pdata));
>>> + /* create omapdss device */
>>> +
>>> + board_data->dsi_enable_pads = omap_dsi_enable_pads;
>>> + board_data->dsi_disable_pads = omap_dsi_disable_pads;
>>> + board_data->get_context_loss_count = omap_pm_get_dev_context_loss_count;
>>> + board_data->set_min_bus_tput = omap_dss_set_min_bus_tput;
>>> +
>>> + omap_display_device.dev.platform_data = board_data;
>>> +
>>> + r = platform_device_register(&omap_display_device);
>>> + if (r< 0) {
>>> + pr_err("Unable to register omapdss device\n");
>>> + return r;
>>> + }
>>
>> After this patch, the "omapdss" platform device is registered before the
>> other dss platform devices. This would change the sequence of probes of
>> these devices. Was this intentional?
>
> Hmm. The sequence shouldn't change. The order in which the devices are
> registered doesn't matter if there are no drivers registered yet. When
> the drivers are registered, and there's a device for it, the probe will
> be done. So in this case the order of the driver registration will
> dictate the order of probes.
Oh okay, I don't know where the initcalls exactly happen, but I guess
they will happen after the .init_machine op in the board file.
Do you know where the initcalls happen, I couldn't find it by browsing
the kernel code :)
Archit
>
> Tomi
>
next prev parent reply other threads:[~2012-05-04 8:48 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-03 13:57 [PATCH 00/25] OMAPDSS: DT preparation patches v2 Tomi Valkeinen
2012-05-03 13:57 ` [PATCH 01/25] OMAPDSS: panel-dvi: add PD gpio handling Tomi Valkeinen
2012-05-09 16:50 ` Russ Dill
2012-05-09 17:32 ` Tomi Valkeinen
2012-05-03 13:57 ` [PATCH 02/25] OMAP: board-files: remove custom PD GPIO handling for DVI output Tomi Valkeinen
2012-05-03 13:57 ` [PATCH 03/25] OMAPDSS: TFP410: rename dvi -> tfp410 Tomi Valkeinen
2012-05-03 13:57 ` [PATCH 04/25] OMAPDSS: TFP410: rename dvi files to tfp410 Tomi Valkeinen
2012-05-03 13:57 ` [PATCH 05/25] OMAPDSS: TFP410: pdata rewrite Tomi Valkeinen
2012-05-03 13:57 ` [PATCH 06/25] OMAPDSS: DSI: use dsi_get_dsidev_id(dsidev) instead of dsidev->id Tomi Valkeinen
2012-05-03 13:57 ` [PATCH 07/25] OMAPDSS: Taal: move reset gpio handling to taal driver Tomi Valkeinen
2012-05-03 13:57 ` [PATCH 08/25] OMAPDSS: clean up the omapdss platform data mess Tomi Valkeinen
2012-05-04 5:44 ` Archit Taneja
2012-05-04 8:32 ` Tomi Valkeinen
2012-05-04 8:48 ` Archit Taneja [this message]
2012-05-04 8:49 ` Tomi Valkeinen
2012-05-03 13:57 ` [PATCH 09/25] OMAPDSS: remove return from platform_driver_unreg Tomi Valkeinen
2012-05-03 13:57 ` [PATCH 10/25] OMAPDSS: use platform_driver_probe for core/dispc/dss Tomi Valkeinen
2012-05-03 13:57 ` [PATCH 11/25] OMAPDSS: create custom pdevs for DSS omap_devices Tomi Valkeinen
2012-05-04 6:15 ` Archit Taneja
2012-05-04 8:37 ` Tomi Valkeinen
2012-05-04 8:29 ` Archit Taneja
2012-05-04 9:00 ` Tomi Valkeinen
2012-05-04 9:25 ` Archit Taneja
2012-05-03 13:57 ` [PATCH 12/25] OMAPDSS: create DPI & SDI devices Tomi Valkeinen
2012-05-03 13:57 ` [PATCH 13/25] OMAPDSS: create DPI & SDI drivers Tomi Valkeinen
2012-05-03 13:57 ` [PATCH 14/25] OMAPDSS: remove uses of dss_runtime_get/put Tomi Valkeinen
2012-05-03 13:57 ` [PATCH 15/25] OMAPDSS: handle output-driver reg/unreg more dynamically Tomi Valkeinen
2012-05-03 13:57 ` [PATCH 16/25] OMAPDSS: move the creation of debugfs files Tomi Valkeinen
2012-05-03 13:57 ` [PATCH 17/25] OMAPDSS: use platform_driver_probe for dsi/hdmi/rfbi/venc/dpi/sdi Tomi Valkeinen
2012-05-03 13:57 ` [PATCH 18/25] OMAPDSS: add __init & __exit Tomi Valkeinen
2012-05-03 13:57 ` [PATCH 19/25] OMAPFB: " Tomi Valkeinen
2012-05-03 13:57 ` [PATCH 20/25] OMAPDSS: change default_device handling Tomi Valkeinen
2012-05-03 13:57 ` [PATCH 21/25] OMAPDSS: interface drivers register their panel devices Tomi Valkeinen
2012-05-03 13:57 ` [PATCH 22/25] OMAPDSS: init omap_dss_devices internally Tomi Valkeinen
2012-05-03 13:57 ` [PATCH 23/25] OMAPDSS: DSI: implement generic DSI pin config Tomi Valkeinen
2012-05-03 13:58 ` [PATCH 24/25] OMAPDSS: DSI: improve DSI module id handling Tomi Valkeinen
2012-05-04 9:21 ` Archit Taneja
2012-05-04 9:53 ` Tomi Valkeinen
2012-05-04 10:17 ` Archit Taneja
2012-05-04 10:11 ` Tomi Valkeinen
2012-05-03 13:58 ` [PATCH 25/25] OMAPDSS: separate pdata based initialization Tomi Valkeinen
2012-05-07 17:46 ` [PATCH 00/25] OMAPDSS: DT preparation patches v2 Tony Lindgren
2012-05-08 8:44 ` Tomi Valkeinen
2012-05-08 16:00 ` Tony Lindgren
2012-05-09 8:09 ` Tomi Valkeinen
2012-05-09 15:45 ` Tony Lindgren
2012-05-10 7:11 ` Tomi Valkeinen
2012-05-10 16:13 ` Tony Lindgren
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=4FA39501.3070205@ti.com \
--to=a0393947@ti.com \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).