|
pwm申请失败!
发表于 2016-3-25 14:17:44
浏览:7944
|
回复:4
打印
只看该作者
[复制链接]
楼主
大神帮俺看看,pwm也是按照官网上配置的,但那时申请出错。
pwm1 = pwm_request(1,"backlight_pwm");
if(IS_ERR(pwm1))
{
printk("1111111111111111111\n");
return -1;
}
pwm_config(pwm1,25000,50000);
pwm_enable(pwm1)
这是写在驱动里的代码,
&pwm1 {
compatible = "rockchip,rk-pwm";
reg = <0xff680010 0x10>;
#pwm-cells = <2>;
pinctrl-names = "default";
pinctrl-0 = <&pwm1_pin>;
clocks = <&clk_gates11 11>;
clock-names = "pclk_pwm";
status = "okay";
};
上面是注册到firefly-rk3288.dts的代码,
|
|