Lines Matching refs:pwm_ir
18 struct pwm_ir { struct
32 struct pwm_ir *pwm_ir = dev->priv; in pwm_ir_set_duty_cycle() argument
34 pwm_ir->duty_cycle = duty_cycle; in pwm_ir_set_duty_cycle()
41 struct pwm_ir *pwm_ir = dev->priv; in pwm_ir_set_carrier() local
46 pwm_ir->carrier = carrier; in pwm_ir_set_carrier()
54 struct pwm_ir *pwm_ir = dev->priv; in pwm_ir_tx() local
55 struct pwm_device *pwm = pwm_ir->pwm; in pwm_ir_tx()
63 state.period = DIV_ROUND_CLOSEST(NSEC_PER_SEC, pwm_ir->carrier); in pwm_ir_tx()
64 pwm_set_relative_duty_cycle(&state, pwm_ir->duty_cycle, 100); in pwm_ir_tx()
86 struct pwm_ir *pwm_ir; in pwm_ir_probe() local
90 pwm_ir = devm_kmalloc(&pdev->dev, sizeof(*pwm_ir), GFP_KERNEL); in pwm_ir_probe()
91 if (!pwm_ir) in pwm_ir_probe()
94 pwm_ir->pwm = devm_pwm_get(&pdev->dev, NULL); in pwm_ir_probe()
95 if (IS_ERR(pwm_ir->pwm)) in pwm_ir_probe()
96 return PTR_ERR(pwm_ir->pwm); in pwm_ir_probe()
98 pwm_ir->carrier = 38000; in pwm_ir_probe()
99 pwm_ir->duty_cycle = 50; in pwm_ir_probe()
105 rcdev->priv = pwm_ir; in pwm_ir_probe()