-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

? 2013?12?09? 16:52, Thierry Reding ??:
> On Mon, Dec 09, 2013 at 01:22:02AM +0800, randy wrote:
>> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
>> 
>> The dts for my board tiny4412 is ready, in my board, the pwm 0
>> is connect to a buzzer. I want to test whether it works, but I
>> don't know any test util. As I have a oscillograph, there is no
>> problem for me to measure whether the output is correct. Thanks
> 
> You can use the sysfs interface to easily test the PWM
> functionality. The documentation for that is in
> Documentation/pwm.txt and 
> Documentation/ABI/testing/sysfs-class-pwm.
> 
I am sorry for I didn't notice that documents.
> Generally this should work somewhat like this:
> 
> # echo 0 > /sys/class/pwm/pwmchip0/export
It seems can't work.
root@mifu:~# LANG=C echo 0 > /sys/class/pwm/pwmchip0/export
- -bash: echo: write error: Invalid argument

> # echo 50000 > /sys/class/pwm/pwmchip0/pwm0/period # echo 25000 >
> /sys/class/pwm/pwmchip0/pwm0/duty_cycle # echo 1 >
> /sys/class/pwm/pwmchip0/pwm0/enable
> 
> Which should configure PWM 0 to run at a period of 50000 ns and a
> 50% duty-cycle.
> 
> # echo 0 > /sys/class/pwm/pwmchip0/pwm0/disable
> 
> Stops the PWM signal and when you're done with all the testing you
> can export the PWM (so that it can be reused):
> 
> # echo 0 > /sys/class/pwm/pwmchip0/unexport
> 
> Thierry
Actually, I don't know whether the pwm works or not. In dmesg, I saw:
[  853.690000] samsung-pwm 139d0000.pwm: tried to request PWM channel
0 without output
[  876.930000] samsung-pwm 139d0000.pwm: tried to request PWM channel
0 without output
[  879.615000] samsung-pwm 139d0000.pwm: tried to request PWM channel
1 without output

in my dts, I only add
================================
pwm@139D0000 {
        status = "okay";
};
================================
is it enough to make pwm work, if the driver in kernel has been correct.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJSpaOrAAoJEPb4VsMIzTzicUkH+gJXR61k2/29tnZ01FtMprY+
LFO8taGcFn+P8rHXFm9v6911PBzJtuUtHgGhvjap2nb6cKpvxdGxPey/Jo3tyKwi
KuNsq1SJUcKBoS2RyqwbBEKkFsHHxtUQhu5IQ3ZjqtWIPsefhgUiPV0LlnmnxH6E
eLs9NCtuZx0Gb8PekKZRlNK15wAQNKouUFZvOAmeQ8/kR9cOYreWkmgrJUU5AaE2
qnBqGD8Z4V1I/0qrFlyx5upu87Z3thU6bAy4IxbJGSMb8/ESPsoCIps7EXFLlD3o
LWkPQNbE6a5I+78Ugb44JNgW6gR/fAFAXReupiteXeAfwhugQOIUSqdtBJNrp6I=
=w87N
-----END PGP SIGNATURE-----
--
To unsubscribe from this list: send the line "unsubscribe linux-pwm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to