I have set my PWM driven beeper up as per the Linux device tree documentation. I see that this results in an extra input device in /sys/class/input:
root:/sys/class/input/input0# ls
capabilities device event0 id modalias name phys power properties subsystem uevent uniq
root:/sys/class/input/input0# cat name
pwm-beeper
However, I don't see anything related to the duty cycle, polarity etc to actually control the beeper. Perhaps I am very mistaken about pwm-beeper as it is clearly created as an input device. Please help!
[update]
Changes in my dts
:
pwm15: dmtimer-pwm@15 {
compatible = "ti,omap-dmtimer-pwm";
ti,timers = <&timer15>;
#pwm-cells = <3>;
};
beeper: pwm-beeper {
compatible = "pwm-beeper";
pwms = <&pwm15 0 5000>;
volume-levels = <0 8 20 40 500>;
default-volume-level = <4>;
};
Relevant dmesg
:
[ 6.716560] OF: /pwm-beeper: arguments longer than property
[ 6.716566] of_pwm_get(): can't parse "pwms" property
[ 6.716574] pwm-beeper pwm-beeper: Failed to request PWM device: -22
[ 6.716590] pwm-beeper: probe of pwm-beeper failed with error -22
I am utterly confused because there is just so little info about this device driver mainlined in Linux!