From: viresh.kumar@st.com (Viresh KUMAR)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH resend] GPIO PL061: Adding Clk framework support
Date: Mon, 21 Jun 2010 12:14:28 +0530 [thread overview]
Message-ID: <4C1F0A4C.2070201@st.com> (raw)
In-Reply-To: <20100621063848.GA7582@n2100.arm.linux.org.uk>
On 6/21/2010 12:08 PM, Russell King - ARM Linux wrote:
> On Mon, Jun 21, 2010 at 12:02:23PM +0530, Viresh KUMAR wrote:
>> @@ -56,8 +59,33 @@ struct pl061_gpio {
>> void __iomem *base;
>> unsigned irq_base;
>> struct gpio_chip gc;
>> + unsigned usage_count;
>> + struct clk *clk;
>> };
>>
>> +static int pl061_request(struct gpio_chip *gc, unsigned offset)
>> +{
>> + struct pl061_gpio *chip = container_of(gc, struct pl061_gpio, gc);
>> +
>> + if (offset >= gc->ngpio)
>> + return -EINVAL;
>> +
>> + if (!chip->usage_count)
>> + clk_enable(chip->clk);
>
> Clocks are already use-counted.
>
Yes. This is not required. Can simple call clk_enable and clk_disable.
prev parent reply other threads:[~2010-06-21 6:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-21 6:32 [PATCH resend] GPIO PL061: Adding Clk framework support Viresh KUMAR
2010-06-21 6:38 ` Russell King - ARM Linux
2010-06-21 6:44 ` Viresh KUMAR [this message]
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=4C1F0A4C.2070201@st.com \
--to=viresh.kumar@st.com \
--cc=linux-arm-kernel@lists.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.