public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@ti.com>
To: Guruswamy Senthilvadivu <svadivu@ti.com>
Cc: tomi.valkeinen@nokia.com, paul@pwsan.com, v-hiremath@ti.com,
	a0919096@ti.com, linux-omap@vger.kernel.org
Subject: Re: [PATCH v3 08/17] OMAP2,3: DSS2: Create platform_driver for each DSS HW IP
Date: Tue, 04 Jan 2011 16:07:42 -0800	[thread overview]
Message-ID: <87zkrg43ht.fsf@ti.com> (raw)
In-Reply-To: <1294059069-26737-9-git-send-email-svadivu@ti.com> (Guruswamy Senthilvadivu's message of "Mon, 3 Jan 2011 18:21:00 +0530")

Guruswamy Senthilvadivu <svadivu@ti.com> writes:

> From: Senthilvadivu Guruswamy <svadivu@ti.com>
>
> Hwmod adaptation design requires each of the DSS HW IP to be a platform driver. 
> Platform driver of dsshw has to be registered before of dispc, rfbi, dsi1,
> venc and omapdisplay driver should be after all the HW IPs. Sequence it with
> arch_initcall and device_initcall_sync.
>
> Signed-off-by: Senthilvadivu Guruswamy <svadivu@ti.com>

Rather than creating a bunch of empty/dummy driver here to be populated
later, I'd prefer them to be created as needed in the subsequent
patches.

For example, the dispc parts of this patch should be added in PATCH 9
where you populate the functions.  The RFBI parts of this patch should
be added in PATCH 12, etc. etc.

Kevin


> ---
>  drivers/video/omap2/dss/core.c  |    2 +-
>  drivers/video/omap2/dss/dispc.c |   28 ++++++++++++++++++++++++++++
>  drivers/video/omap2/dss/dsi.c   |   29 ++++++++++++++++++++++++++++-
>  drivers/video/omap2/dss/dss.c   |   27 +++++++++++++++++++++++++++
>  drivers/video/omap2/dss/rfbi.c  |   28 ++++++++++++++++++++++++++++
>  drivers/video/omap2/dss/venc.c  |   28 ++++++++++++++++++++++++++++
>  6 files changed, 140 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/video/omap2/dss/core.c b/drivers/video/omap2/dss/core.c
> index 48d20d8..d165434 100644
> --- a/drivers/video/omap2/dss/core.c
> +++ b/drivers/video/omap2/dss/core.c
> @@ -989,7 +989,7 @@ static int __init omap_dss_init2(void)
>  }
>  
>  core_initcall(omap_dss_init);
> -device_initcall(omap_dss_init2);
> +device_initcall_sync(omap_dss_init2);
>  #endif
>  
>  MODULE_AUTHOR("Tomi Valkeinen <tomi.valkeinen@nokia.com>");
> diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
> index fa40fa5..942dea5 100644
> --- a/drivers/video/omap2/dss/dispc.c
> +++ b/drivers/video/omap2/dss/dispc.c
> @@ -3167,3 +3167,31 @@ int dispc_setup_plane(enum omap_plane plane,
>  
>  	return r;
>  }
> +
> +/* DISPC HW IP initialisation */
> +static int omap_dispchw_probe(struct platform_device *pdev)
> +{
> +	return 0;
> +}
> +
> +static int omap_dispchw_remove(struct platform_device *pdev)
> +{
> +	return 0;
> +}
> +
> +static struct platform_driver omap_dispchw_driver = {
> +	.probe          = omap_dispchw_probe,
> +	.remove         = omap_dispchw_remove,
> +	.driver         = {
> +		.name   = "omap_dispc",
> +		.owner  = THIS_MODULE,
> +	},
> +};
> +
> +static int __init omap_dispc_init(void)
> +{
> +	return platform_driver_register(&omap_dispchw_driver);
> +}
> +
> +device_initcall(omap_dispc_init);
> +
> diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
> index aa4f7a5..037d366 100644
> --- a/drivers/video/omap2/dss/dsi.c
> +++ b/drivers/video/omap2/dss/dsi.c
> @@ -292,7 +292,6 @@ static inline u32 dsi_read_reg(const struct dsi_reg idx)
>  	return __raw_readl(dsi.base + idx.idx);
>  }
>  
> -
>  void dsi_save_context(void)
>  {
>  }
> @@ -3304,3 +3303,31 @@ void dsi_exit(void)
>  	DSSDBG("omap_dsi_exit\n");
>  }
>  
> +/* DSI1 HW IP initialisation */
> +static int omap_dsi1hw_probe(struct platform_device *pdev)
> +{
> +	return 0;
> +}
> +
> +static int omap_dsi1hw_remove(struct platform_device *pdev)
> +{
> +	return 0;
> +}
> +
> +static struct platform_driver omap_dsi1hw_driver = {
> +	.probe          = omap_dsi1hw_probe,
> +	.remove         = omap_dsi1hw_remove,
> +	.driver         = {
> +		.name   = "omap_dsi1",
> +		.owner  = THIS_MODULE,
> +	},
> +};
> +
> +static int __init omap_dsi1_init(void)
> +{
> +	return platform_driver_register(&omap_dsi1hw_driver);
> +}
> +
> +device_initcall(omap_dsi1_init);
> +
> +
> diff --git a/drivers/video/omap2/dss/dss.c b/drivers/video/omap2/dss/dss.c
> index 77c3621..6d0bd89 100644
> --- a/drivers/video/omap2/dss/dss.c
> +++ b/drivers/video/omap2/dss/dss.c
> @@ -639,3 +639,30 @@ void dss_exit(void)
>  	iounmap(dss.base);
>  }
>  
> +/* DSS HW IP initialisation */
> +static int omap_dsshw_probe(struct platform_device *pdev)
> +{
> +	return 0;
> +}
> +
> +static int omap_dsshw_remove(struct platform_device *pdev)
> +{
> +	return 0;
> +}
> +
> +static struct platform_driver omap_dsshw_driver = {
> +	.probe          = omap_dsshw_probe,
> +	.remove         = omap_dsshw_remove,
> +	.driver         = {
> +		.name   = "omap_dss",
> +		.owner  = THIS_MODULE,
> +	},
> +};
> +
> +static int __init omap_dss_init1(void)
> +{
> +	return platform_driver_register(&omap_dsshw_driver);
> +}
> +
> +arch_initcall(omap_dss_init1);
> +
> diff --git a/drivers/video/omap2/dss/rfbi.c b/drivers/video/omap2/dss/rfbi.c
> index bbe6246..a086233 100644
> --- a/drivers/video/omap2/dss/rfbi.c
> +++ b/drivers/video/omap2/dss/rfbi.c
> @@ -1054,3 +1054,31 @@ int rfbi_init_display(struct omap_dss_device *dssdev)
>  	dssdev->caps = OMAP_DSS_DISPLAY_CAP_MANUAL_UPDATE;
>  	return 0;
>  }
> +
> +/* RFBI HW IP initialisation */
> +static int omap_rfbihw_probe(struct platform_device *pdev)
> +{
> +	return 0;
> +}
> +
> +static int omap_rfbihw_remove(struct platform_device *pdev)
> +{
> +	return 0;
> +}
> +
> +static struct platform_driver omap_rfbihw_driver = {
> +	.probe          = omap_rfbihw_probe,
> +	.remove         = omap_rfbihw_remove,
> +	.driver         = {
> +		.name   = "omap_rfbi",
> +		.owner  = THIS_MODULE,
> +	},
> +};
> +
> +static int __init omap_rfbi_init(void)
> +{
> +	return platform_driver_register(&omap_rfbihw_driver);
> +}
> +
> +device_initcall(omap_rfbi_init);
> +
> diff --git a/drivers/video/omap2/dss/venc.c b/drivers/video/omap2/dss/venc.c
> index eff3505..ac63cee 100644
> --- a/drivers/video/omap2/dss/venc.c
> +++ b/drivers/video/omap2/dss/venc.c
> @@ -740,3 +740,31 @@ void venc_dump_regs(struct seq_file *s)
>  
>  #undef DUMPREG
>  }
> +
> +/* VENC HW IP initialisation */
> +static int omap_venchw_probe(struct platform_device *pdev)
> +{
> +	return 0;
> +}
> +
> +static int omap_venchw_remove(struct platform_device *pdev)
> +{
> +	return 0;
> +}
> +
> +static struct platform_driver omap_venchw_driver = {
> +	.probe          = omap_venchw_probe,
> +	.remove         = omap_venchw_remove,
> +	.driver         = {
> +		.name   = "omap_venc",
> +		.owner  = THIS_MODULE,
> +	},
> +};
> +
> +static int __init omap_venc_init(void)
> +{
> +	return platform_driver_register(&omap_venchw_driver);
> +}
> +
> +device_initcall(omap_venc_init);
> +

  reply	other threads:[~2011-01-05  0:07 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-03 12:50 [PATCH v3 00/17] OMAP2,3: hwmod DSS Adaptation Guruswamy Senthilvadivu
2011-01-03 12:50 ` [PATCH v3 01/17] OMAP2420: hwmod data: add DSS DISPC RFBI VENC Guruswamy Senthilvadivu
2011-01-03 12:50 ` [PATCH v3 02/17] OMAP2430: " Guruswamy Senthilvadivu
2011-01-03 12:50 ` [PATCH v3 03/17] OMAP3: hwmod data: add DSS DISPC RFBI DSI VENC Guruswamy Senthilvadivu
2011-01-03 12:50 ` [PATCH v3 04/17] OMAP2,3 DSS2 Change driver name to omap_display Guruswamy Senthilvadivu
2011-01-03 12:50 ` [PATCH v3 05/17] OMAP2,3 DSS2 Use Regulator init with driver name Guruswamy Senthilvadivu
2011-01-03 12:50 ` [PATCH v3 06/17] OMAP2,3 DSS2 Move DSS driver register from board file to devices.c Guruswamy Senthilvadivu
2011-01-04 23:58   ` Kevin Hilman
2011-01-05 10:51   ` Tomi Valkeinen
2011-01-05 10:55     ` Semwal, Sumit
2011-01-03 12:50 ` [PATCH v3 07/17] OMAP2,3: DSS2: Build omap_device for each DSS HWIP Guruswamy Senthilvadivu
2011-01-04  1:56   ` Tony Lindgren
2011-01-04 12:27     ` Semwal, Sumit
2011-01-03 12:51 ` [PATCH v3 08/17] OMAP2,3: DSS2: Create platform_driver for each DSS HW IP Guruswamy Senthilvadivu
2011-01-05  0:07   ` Kevin Hilman [this message]
2011-01-05  3:44     ` Semwal, Sumit
2011-01-05 11:27   ` Tomi Valkeinen
2011-01-05 13:25     ` Semwal, Sumit
2011-01-05 14:58       ` Tomi Valkeinen
2011-01-03 12:51 ` [PATCH v3 09/17] OMAP2,3: DSS2: Move clocks from core driver to dss driver Guruswamy Senthilvadivu
2011-01-05 15:35   ` Tomi Valkeinen
2011-01-06  9:40     ` Semwal, Sumit
2011-01-07  9:14       ` Tomi Valkeinen
2011-01-03 12:51 ` [PATCH v3 10/17] OMAP2,3: DSS2: Move dss_feature_init to dss Guruswamy Senthilvadivu
2011-01-03 12:51 ` [PATCH v3 11/17] OMAP2,3: DSS2: DSS Move init,exit to driver Guruswamy Senthilvadivu
2011-01-03 12:51 ` [PATCH v3 12/17] OMAP2,3: DSS2: RFBI " Guruswamy Senthilvadivu
2011-01-05 15:46   ` Tomi Valkeinen
2011-01-03 12:51 ` [PATCH v3 13/17] OMAP2,3: DSS2: DISPC " Guruswamy Senthilvadivu
2011-01-03 12:51 ` [PATCH v3 14/17] OMAP2,3: DSS2: VENC " Guruswamy Senthilvadivu
2011-01-03 12:51 ` [PATCH v3 15/17] OMAP2,3: DSS2: DSI Move init, exit " Guruswamy Senthilvadivu
2011-01-03 12:51 ` [PATCH v3 16/17] OMAP2,3: DSS2: Use platform device to get baseaddr Guruswamy Senthilvadivu
2011-01-03 12:51 ` [PATCH v3 17/17] OMAP2,3: DSS2: Get DSS IRQ from platform device Guruswamy Senthilvadivu

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=87zkrg43ht.fsf@ti.com \
    --to=khilman@ti.com \
    --cc=a0919096@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=paul@pwsan.com \
    --cc=svadivu@ti.com \
    --cc=tomi.valkeinen@nokia.com \
    --cc=v-hiremath@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