mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 10:31:46 +09:00
input: rc: Unify the process of requesting irq for PWM v1-v4
The irq for PWM v1-v3 used to be exclusively associated with oneshot mode. Signed-off-by: Huang zhibao <hzb@rock-chips.com> Change-Id: I6bdb8a176929965675b96ef8310f5f0097a339d6
This commit is contained in:
@@ -839,6 +839,7 @@ static int rk_pwm_probe(struct platform_device *pdev)
|
||||
struct clk *clk;
|
||||
struct clk *p_clk;
|
||||
struct cpumask cpumask;
|
||||
unsigned long irq_flags = IRQF_NO_SUSPEND;
|
||||
int num;
|
||||
int irq;
|
||||
int ret;
|
||||
@@ -941,6 +942,7 @@ static int rk_pwm_probe(struct platform_device *pdev)
|
||||
ddata->wakeup = 1;
|
||||
|
||||
if (ddata->pwm_data->pwm_version < 4) {
|
||||
irq_flags = IRQF_NO_SUSPEND | IRQF_SHARED;
|
||||
of_property_read_u32(np, "remote_pwm_id", &pwm_id);
|
||||
pwm_id %= 4;
|
||||
ddata->remote_pwm_id = pwm_id;
|
||||
@@ -978,7 +980,7 @@ static int rk_pwm_probe(struct platform_device *pdev)
|
||||
cpumask_set_cpu(cpu_id, &cpumask);
|
||||
irq_set_affinity_hint(irq, &cpumask);
|
||||
ret = devm_request_irq(&pdev->dev, irq, ddata->pwm_data->funcs.irq_handler,
|
||||
IRQF_NO_SUSPEND, "rk_pwm_irq", ddata);
|
||||
irq_flags, "pwm_rc", ddata);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "cannot claim IRQ %d\n", irq);
|
||||
goto error_irq;
|
||||
|
||||
Reference in New Issue
Block a user