[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <nycvar.YFH.7.76.2304141611320.29760@cbobk.fhfr.pm>
Date: Fri, 14 Apr 2023 16:12:01 +0200 (CEST)
From: Jiri Kosina <jikos@...nel.org>
To: Rahul Rameshbabu <rrameshbabu@...dia.com>
cc: Benjamin Tissoires <benjamin.tissoires@...hat.com>,
linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/1] HID: shield: Initial driver implementation with
Thunderstrike support
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
Powered by blists - more mailing lists