From: Russell King - ARM Linux <linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>
To: Jamie Iles <jamie-wmLquQDDieKakBO8gow8eQ@public.gmane.org>
Cc: Barry Song <Barry.Song-kQvG35nSl+M@public.gmane.org>,
Xiangzhen Ye <Xiangzhen.Ye-kQvG35nSl+M@public.gmane.org>,
workgroup.linux-kQvG35nSl+M@public.gmane.org,
Zhiwu Song <Zhiwu.Song-kQvG35nSl+M@public.gmane.org>,
linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org,
Barry Song <Baohua.Song-kQvG35nSl+M@public.gmane.org>,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH] I2C: add CSR SiRFprimaII on-chip I2C controllers driver
Date: Wed, 2 Nov 2011 10:52:10 +0000 [thread overview]
Message-ID: <20111102105210.GZ19187@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <20111102103904.GB4937@totoro>
On Wed, Nov 02, 2011 at 10:39:04AM +0000, Jamie Iles wrote:
> > + clk = clk_get(&pdev->dev, NULL);
> > + if (IS_ERR(clk)) {
> > + err = PTR_ERR(clk);
> > + dev_err(&pdev->dev, "Clock get failed\n");
> > + goto out;
> > + }
> > +
> > + clk_enable(clk);
>
> The return value of clk_enable() should really be checked.
Now that the clk_prepare() patch has been enabled, new drivers should be
written assuming that clk_prepare() will be necessary before clk_enable().
And one may query why it's not possible to use clk_enable()...clk_disable()
around the transfer itself, so the clock can be turned off while the device
is idle. Obviously if its expecting to be operated in slave mode as well
then you may need to keep the clock enabled.
next prev parent reply other threads:[~2011-11-02 10:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-02 10:10 [PATCH] I2C: add CSR SiRFprimaII on-chip I2C controllers driver Barry Song
[not found] ` <1320228610-18129-1-git-send-email-Barry.Song-kQvG35nSl+M@public.gmane.org>
2011-11-02 10:39 ` Jamie Iles
2011-11-02 10:52 ` Russell King - ARM Linux [this message]
[not found] ` <20111102105210.GZ19187-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2011-11-07 5:36 ` Barry Song
2011-11-08 3:43 ` Barry Song
2011-11-07 5:29 ` Barry Song
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=20111102105210.GZ19187@n2100.arm.linux.org.uk \
--to=linux-lfz/pmaqli7xmaaqvzeohq@public.gmane.org \
--cc=Baohua.Song-kQvG35nSl+M@public.gmane.org \
--cc=Barry.Song-kQvG35nSl+M@public.gmane.org \
--cc=Xiangzhen.Ye-kQvG35nSl+M@public.gmane.org \
--cc=Zhiwu.Song-kQvG35nSl+M@public.gmane.org \
--cc=ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org \
--cc=jamie-wmLquQDDieKakBO8gow8eQ@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=workgroup.linux-kQvG35nSl+M@public.gmane.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