lkml.org 
[lkml]   [2012]   [Oct]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V4] PWM: Add SPEAr PWM chip driver support
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
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2012-10-24 08:21    [W:0.063 / U:0.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site