From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: "Lothar Waßmann" <LW@KARO-electronics.de>,
"Arthur LAMBERT" <lambertarthur22@gmail.com>
Cc: linux-pwm@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: Handle pwm with sysfs with recent kernel
Date: Wed, 9 Jan 2019 10:20:06 +0100 [thread overview]
Message-ID: <20190109092006.35364dwcfiindd7c@pengutronix.de> (raw)
In-Reply-To: <20190109092531.71cf52c8@karo-electronics.de>
Hello,
On Wed, Jan 09, 2019 at 09:25:31AM +0100, Lothar Waßmann wrote:
> Hi,
>
> On Tue, 8 Jan 2019 23:21:02 +0100 Uwe Kleine-König wrote:
> > On Tue, Jan 08, 2019 at 11:07:39AM +0100, Arthur LAMBERT wrote:
> > > Then I have another issue when I try to enable my pwm :
> > >
> > > # ls /sys/class/pwm/
> > > pwmchip0 pwmchip2 pwmchip4 pwmchip6
> > > pwmchip1 pwmchip3 pwmchip5 pwmchip7
> > > # echo 0 > /sys/class/pwm/pwmchip0/export
> > > # echo 1 > /sys/class/pwm/pwmchip0/pwm0/enable
> > > -sh: write error: Invalid argument
> >
> > Just a guess: did you check that /sys/class/pwm/pwmchip0/pwm0/enable
> > actually exists?
> >
> If not, the error message would be 'No such file or directory' rather
> than "Invalid argument".
Then "Invalid argument" means that either the "1" couldn't be parsed as
an integer 1 or 0 (no) or that pwm_apply_state returned -EINVAL. What
type of pwm are we talking about (i.e. which driver is responsible for
pwmchip0)? Hmm, that machine is an imx6ul, looking at the pwm-imx driver
there doesn't seem to be a path through the .apply callback that returns
-EINVAL. Would you care to add a few printk in
drivers/pwm/sysfs.c:enable_store() that show where the -EINVAL comes
from?
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
next prev parent reply other threads:[~2019-01-09 9:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20190108100739.GA9046@arthur-bzh>
2019-01-08 22:21 ` Handle pwm with sysfs with recent kernel Uwe Kleine-König
2019-01-09 8:25 ` Lothar Waßmann
2019-01-09 9:20 ` Uwe Kleine-König [this message]
2019-01-09 9:26 ` Arthur LAMBERT
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=20190109092006.35364dwcfiindd7c@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=LW@KARO-electronics.de \
--cc=lambertarthur22@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-pwm@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).