From: Kevin Hilman <khilman@deeprootsystems.com>
To: m-karicheri2@ti.com
Cc: linux-media@vger.kernel.org, mchehab@infradead.org,
hverkuil@xs4all.nl,
davinci-linux-open-source@linux.davincidsp.com
Subject: Re: [PATCH - v4 2/4] V4L-vpfe-capture-converting dm355 ccdc driver to a platform driver
Date: Mon, 11 Jan 2010 16:22:04 -0800 [thread overview]
Message-ID: <87aawkkw9f.fsf@deeprootsystems.com> (raw)
In-Reply-To: <1263252977-27457-2-git-send-email-m-karicheri2@ti.com> (m-karicheri2@ti.com's message of "Mon\, 11 Jan 2010 18\:36\:15 -0500")
m-karicheri2@ti.com writes:
> From: Muralidharan Karicheri <m-karicheri2@ti.com>
>
> Updated based on Kevin's comments on clock configuration.
This part belongs after the '---'
> The ccdc now uses a generic name for clocks. "master" and "slave". On individual platforms
> these clocks will inherit from the platform specific clock. This will allow re-use of
> the driver for the same IP across different SoCs.
>
> Following are the changes done:-
> 1) clocks are configured using generic clock names
> 2) converting the driver to a platform driver
> 3) cleanup - consolidate all static variables inside a structure, ccdc_cfg
>
> Reviewed-by: Kevin Hilman <khilman@deeprootsystems.com>
> Reviewed-by: Vaibhav Hiremath <hvaibhav@ti.com>
> Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
>
> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
> Signed-off-by: Muralidharan Karicheri <m-karicheri2@ti.com>
> ---
> Rebased to latest linux-next tree
> Applies to linux-next branch of v4l-dvb
> drivers/media/video/davinci/dm355_ccdc.c | 409 +++++++++++++++++++-----------
> 1 files changed, 256 insertions(+), 153 deletions(-)
>
[...]
> -static int __init dm355_ccdc_init(void)
> +static int __init dm355_ccdc_probe(struct platform_device *pdev)
> {
> - printk(KERN_NOTICE "dm355_ccdc_init\n");
> - if (vpfe_register_ccdc_device(&ccdc_hw_dev) < 0)
> - return -1;
> - printk(KERN_NOTICE "%s is registered with vpfe.\n",
> - ccdc_hw_dev.name);
> + void (*setup_pinmux)(void);
> + struct resource *res;
> + int status = 0;
> +
> + /*
> + * first try to register with vpfe. If not correct platform, then we
> + * don't have to iomap
> + */
> + status = vpfe_register_ccdc_device(&ccdc_hw_dev);
> + if (status < 0)
> + return status;
> +
> + res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> + if (!res) {
> + status = -ENODEV;
> + goto fail_nores;
> + }
> +
> + res = request_mem_region(res->start, resource_size(res), res->name);
> + if (!res) {
> + status = -EBUSY;
> + goto fail_nores;
> + }
> +
> + ccdc_cfg.base_addr = ioremap_nocache(res->start, resource_size(res));
> + if (!ccdc_cfg.base_addr) {
> + status = -ENOMEM;
> + goto fail_nomem;
> + }
> +
> + /* Get and enable Master clock */
> + ccdc_cfg.mclk = clk_get(&pdev->dev, "master");
> + if (NULL == ccdc_cfg.mclk) {
This should be an IS_ERR() check, not a NULL pointer check.
> + status = -ENODEV;
> + goto fail_nomap;
> + }
> + if (clk_enable(ccdc_cfg.mclk)) {
> + status = -ENODEV;
> + goto fail_mclk;
> + }
> +
> + /* Get and enable Slave clock */
> + ccdc_cfg.sclk = clk_get(&pdev->dev, "slave");
> + if (NULL == ccdc_cfg.sclk) {
IS_ERR()
All the same comments for the dm644x version.
Kevin
next prev parent reply other threads:[~2010-01-12 0:22 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-11 23:36 [PATCH - v4 4/4] DaVinci-vpfe-capture-converting-ccdc-drivers-to-platform-drivers m-karicheri2
2010-01-11 23:36 ` [PATCH - v4 2/4] V4L-vpfe-capture-converting dm355 ccdc driver to a platform driver m-karicheri2
2010-01-11 23:36 ` [PATCH - v4 3/4] V4L-vpfe-capture-converting-dm644x-driver " m-karicheri2
2010-01-11 23:36 ` [PATCH - v4 1/4] V4L-vpfe_capture-remove-clock and platform code m-karicheri2
2010-01-12 0:16 ` Kevin Hilman
2010-01-12 14:40 ` Karicheri, Muralidharan
2010-01-12 16:19 ` Kevin Hilman
2010-01-12 0:22 ` Kevin Hilman [this message]
2010-01-12 0:28 ` [PATCH - v4 4/4] DaVinci-vpfe-capture-converting-ccdc-drivers-to-platform-drivers Kevin Hilman
-- strict thread matches above, loose matches on Subject: below --
2010-01-11 19:22 m-karicheri2
2010-01-11 19:22 ` [PATCH - v4 2/4] V4L-vpfe-capture-converting dm355 ccdc driver to a platform driver m-karicheri2
2010-01-11 21:38 ` Kevin Hilman
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=87aawkkw9f.fsf@deeprootsystems.com \
--to=khilman@deeprootsystems.com \
--cc=davinci-linux-open-source@linux.davincidsp.com \
--cc=hverkuil@xs4all.nl \
--cc=linux-media@vger.kernel.org \
--cc=m-karicheri2@ti.com \
--cc=mchehab@infradead.org \
/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