From: Thierry Reding <thierry.reding@avionic-design.de>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Shiraz Hashim <shiraz.hashim@st.com>,
linux-kernel@vger.kernel.org, spear-devel@list.st.com
Subject: Re: [PATCH V4] PWM: Add SPEAr PWM chip driver support
Date: Wed, 24 Oct 2012 07:43:34 +0200 [thread overview]
Message-ID: <20121024054333.GB9787@avionic-0098.mockup.avionic-design.de> (raw)
In-Reply-To: <CAKohpon7e0+PhikmHkgcY30gEH0v+nYJzctA-0wN7w+oDRO7Vw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1527 bytes --]
On Mon, Oct 22, 2012 at 07:25:45PM +0530, Viresh Kumar wrote:
> On 22 October 2012 16:36, Shiraz Hashim <shiraz.hashim@st.com> wrote:
> > Add support for PWM chips present on SPEAr platforms. These PWM
> > chips support 4 channel output with programmable duty cycle and
> > frequency.
> >
> > More details on these PWM chips can be obtained from relevant
> > chapter of reference manual, present at following[1] location.
> >
> > 1. http://www.st.com/internet/mcu/product/251211.jsp
> >
> > Cc: Thierry Reding <thierry.reding@avionic-design.de>
> > Signed-off-by: Shiraz Hashim <shiraz.hashim@st.com>
> > Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> > Reviewed-by: Vipin Kumar <vipin.kumar@st.com>
>
> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
>
> > diff --git a/drivers/pwm/pwm-spear.c b/drivers/pwm/pwm-spear.c
> > +static int spear_pwm_probe(struct platform_device *pdev)
> > +{
>
> > + ret = pwmchip_add(&pc->chip);
> > + if (ret < 0) {
> > + dev_err(&pdev->dev, "pwmchip_add() failed: %d\n", ret);
> > + return ret;
> > + }
>
> Sorry couldn't think of this complex situation earlier :(
>
> Can it happen that we get a request for a pwm here and its config or enable
> gets called...?
>
> If yes, then we must call clk_prepare() before doing pwmchip_add?? Otherwise
> you will see a crash :)
>
> @Thierry: Can this happen?
Yeah, it's very unlikely to happen, but it could. See my reply to the
patch.
Thierry
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2012-10-24 5:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-22 11:06 [PATCH V4] PWM: Add SPEAr PWM chip driver support Shiraz Hashim
2012-10-22 13:55 ` Viresh Kumar
2012-10-24 5:43 ` Thierry Reding [this message]
2012-10-24 5:51 ` Thierry Reding
2012-10-24 6:37 ` Viresh Kumar
2012-10-25 4:09 ` Shiraz Hashim
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=20121024054333.GB9787@avionic-0098.mockup.avionic-design.de \
--to=thierry.reding@avionic-design.de \
--cc=linux-kernel@vger.kernel.org \
--cc=shiraz.hashim@st.com \
--cc=spear-devel@list.st.com \
--cc=viresh.kumar@linaro.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