lkml.org 
[lkml]   [2023]   [Jul]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH V2] Input: synaptics-rmi4- Add a new feature for Forepad.
Date
Hi Andi,
I have modified it and send PATCH V3.
Thanks
Marge Yang

-----Original Message-----
From: Andi Shyti <andi.shyti@kernel.org>
Sent: Wednesday, June 14, 2023 4:49 AM
To: Marge Yang <Marge.Yang@tw.synaptics.com>
Cc: dmitry.torokhov@gmail.com; linux-input@vger.kernel.org; linux-kernel@vger.kernel.org; David Chiu <David.Chiu@tw.synaptics.com>; Derek Cheng <derek.cheng@tw.synaptics.com>; Sam Tsai <Sam.Tsai@synaptics.com>; Vincent Huang <Vincent.huang@tw.synaptics.com>
Subject: Re: [PATCH V2] Input: synaptics-rmi4- Add a new feature for Forepad.

CAUTION: Email originated externally, do not click links or open attachments unless you recognize the sender and know the content is safe.


Hi Marge,

[...]

> +static irqreturn_t rmi_f21_attention(int irq, void *ctx) {
> + struct rmi_function *fn = ctx;
> + struct f21_data *f21 = dev_get_drvdata(&fn->dev);
> + int error;
> +
> + error = rmi_read_block(fn->rmi_dev,
> + fn->fd.data_base_addr+RMI_F21_FORCE_CLICK_OFFSET,
> + f21->data_regs, 1);
> + if (error) {
> + dev_err(&fn->dev,
> + "%s: Failed to read f21 data registers: %d\n",
> + __func__, error);
> + return IRQ_RETVAL(error);
> + }
> +
> + if (!!(f21->data_regs[0] & RMI_f21_FORCE_CLICK))

no need for double negation here.

Andi

> + input_report_key(f21->input, f21->key_code, true);
> + else
> + input_report_key(f21->input, f21->key_code, false);
> + return IRQ_HANDLED;
> +}

\
 
 \ /
  Last update: 2023-07-03 04:50    [W:0.064 / U:0.780 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site