Re: [PATCH v2 1/1] HID: shield: Initial driver implementation with Thunderstrike support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 14 Apr 2023, Rahul Rameshbabu wrote:

> The reason why I disable interrupts is because I call
> thunderstrike_update_haptics from the play_effect callback I pass to
> input_ff_create_memless. From there, it is used in ml_effect_timer
> drivers/input/ff-memless.c, which is a timer interrupt context so we
> should disable interrupts when taking haptics_update_lock.
> 
>   static void ml_effect_timer(struct timer_list *t)
>   {
>     struct ml_device *ml = from_timer(ml, t, timer);
>     struct input_dev *dev = ml->dev;
>     unsigned long flags;
> 
>     pr_debug("timer: updating effects\n");
> 
>     spin_lock_irqsave(&dev->event_lock, flags);
>     ml_play_effects(ml);
>     spin_unlock_irqrestore(&dev->event_lock, flags);
>   }

Ah, right, I missed that, it indeed runs in softirq context. Please 
disregard my comment.

Thanks,

-- 
Jiri Kosina
SUSE Labs




[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux