From: "Li.Xiubo@freescale.com" <Li.Xiubo@freescale.com>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: Shawn Guo <Shawn.Guo@freescale.com>,
"s.hauer@pengutronix.de" <s.hauer@pengutronix.de>,
"swarren@wwwdotorg.org" <swarren@wwwdotorg.org>,
"t.figa@samsung.com" <t.figa@samsung.com>,
"grant.likely@linaro.org" <grant.likely@linaro.org>,
"linux@arm.linux.org.uk" <linux@arm.linux.org.uk>,
"rob@landley.net" <rob@landley.net>,
"ian.campbell@citrix.com" <ian.campbell@citrix.com>,
"mark.rutland@arm.com" <mark.rutland@arm.com>,
"pawel.moll@arm.com" <pawel.moll@arm.com>,
"rob.herring@calxeda.com" <rob.herring@calxeda.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-pwm@vger.kernel.org" <linux-pwm@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
Huan Wang <Huan.Wang@freescale.com>,
"Jingchang Lu" <jingchang.lu@freescale.com>
Subject: RE: [PATCHv6 1/4] pwm: Add Freescale FTM PWM driver support
Date: Fri, 13 Dec 2013 09:30:09 +0000 [thread overview]
Message-ID: <e2fc53d0ff1d4a0a962500be6dc6e019@BY2PR03MB505.namprd03.prod.outlook.com> (raw)
In-Reply-To: <20131128212510.GC14689@mithrandir>
> > + struct fsl_pwm_chip *fpc;
> > +
> > + fpc = to_fsl_chip(chip);
> > +
> > + period_cycles = fsl_rate_to_cycles(fpc, period_ns);
> > + if (period_cycles > 0xFFFF) {
> > + dev_err(chip->dev, "required PWM period cycles(%lu) overflow "
> > + "16-bits counter!\n", period_cycles);
> > + return -EINVAL;
> > + }
> > +
> > + duty_cycles = fsl_rate_to_cycles(fpc, duty_ns);
> > + if (duty_cycles >= 0xFFFF) {
> > + dev_err(chip->dev, "required PWM duty cycles(%lu) overflow "
> > + "16-bits counter!\n", duty_cycles);
> > + return -EINVAL;
> > + }
>
> I'm not sure the error messages are all that useful. A -EINVAL error code
> should make it pretty clear what the problem is.
>
Yes, it is.
But for the pwm leds, there hasn't any check about the return values, if
there is something wrong, we cannot get any information about this.
So I think this error messages are useful for this case.
--
Xiubo
next prev parent reply other threads:[~2013-12-13 9:32 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-12 1:36 [PATCHv6 0/4] Add Freescale FTM PWM driver Xiubo Li
2013-11-12 1:36 ` [PATCHv6 1/4] pwm: Add Freescale FTM PWM driver support Xiubo Li
2013-11-28 21:25 ` Thierry Reding
2013-11-28 22:37 ` Thierry Reding
2013-12-02 11:02 ` Mark Rutland
2013-12-04 6:01 ` Li Xiubo
2013-11-29 5:58 ` Li Xiubo
2013-11-29 6:42 ` Li Xiubo
2013-11-29 9:22 ` Thierry Reding
2013-12-02 2:45 ` Li Xiubo
2013-12-13 9:30 ` Li.Xiubo [this message]
2013-11-12 1:36 ` [PATCHv6 2/4] ARM: dts: Add Freescale FTM PWM node for VF610 Xiubo Li
2013-11-28 21:26 ` Thierry Reding
2013-11-12 1:36 ` [PATCHv6 3/4] ARM: dts: Enables FTM PWM device for Vybrid VF610 TOWER board Xiubo Li
2013-11-12 1:36 ` [PATCHv6 4/4] Documentation: Add device tree bindings for Freescale FTM PWM Xiubo Li
2013-11-28 21:32 ` Thierry Reding
2013-12-02 7:17 ` Li Xiubo
2013-12-03 6:56 ` Li Xiubo
2013-11-22 7:18 ` [PATCHv6 0/4] Add Freescale FTM PWM driver Li Xiubo
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=e2fc53d0ff1d4a0a962500be6dc6e019@BY2PR03MB505.namprd03.prod.outlook.com \
--to=li.xiubo@freescale.com \
--cc=Huan.Wang@freescale.com \
--cc=Shawn.Guo@freescale.com \
--cc=devicetree@vger.kernel.org \
--cc=grant.likely@linaro.org \
--cc=ian.campbell@citrix.com \
--cc=jingchang.lu@freescale.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=mark.rutland@arm.com \
--cc=pawel.moll@arm.com \
--cc=rob.herring@calxeda.com \
--cc=rob@landley.net \
--cc=s.hauer@pengutronix.de \
--cc=swarren@wwwdotorg.org \
--cc=t.figa@samsung.com \
--cc=thierry.reding@gmail.com \
/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
all inboxes | Powered by JetHome®