Hi Dmitry, On Fri, Jan 7, 2022 at 11:07 PM Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx> wrote: > > Hi Angela, > > On Tue, Dec 21, 2021 at 07:17:38PM +0000, Angela Czubak wrote: > > Add a function to switch off ABS_PRESSURE generation if necessary. > > This may be helpful in case drivers want to generate ABS_PRESSURE events > > themselves from ABS_MT_PRESSURE. > > This needs better explanation for why it is needed. I assume this is to > use ABS_PRESSURE to report "true force" for devices. If this is correct > then I believe we should define a new flag for input_mt_init_slots() > and check it here and also use it to calculate the force across contacts > in input_mt_sync_frame(). > > Or did I misunderstand the point? > I would say you understood it correctly, though to my mind it is not a static behaviour, i.e. we may want to switch this kind of calculation on and off. Are flags intended to be modified at runtime? For instance, if user decides to remove the release or press effect (previously uploaded by them) and there is no default one per device, then we should switch the haptic handling from kernel mode back to device mode. Currently it also means that the driver stops generating ABS_PRESSURE events on its own and so input-mt layer may/should be used again (i.e. mt report pointer emulation). Anyhow, if it would be actually better to calculate the true force in input_mt_sync_frame()/input_mt_report_pointer_emulation() > Thanks. > > -- > Dmitry