[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <MW4PR03MB6651FF948B63B6FB209DA2C6A329A@MW4PR03MB6651.namprd03.prod.outlook.com>
Date: Mon, 3 Jul 2023 02:49:50 +0000
From: Marge Yang <Marge.Yang@...synaptics.com>
To: Andi Shyti <andi.shyti@...nel.org>,
Marge Yang <Marge.Yang@...synaptics.com>
CC: "dmitry.torokhov@...il.com" <dmitry.torokhov@...il.com>,
"linux-input@...r.kernel.org" <linux-input@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
David Chiu <David.Chiu@...synaptics.com>,
Derek Cheng <derek.cheng@...synaptics.com>,
Sam Tsai <Sam.Tsai@...aptics.com>,
Vincent Huang <Vincent.huang@...synaptics.com>
Subject: RE: [PATCH V2] Input: synaptics-rmi4- Add a new feature for Forepad.
Hi Andi,
I have modified it and send PATCH V3.
Thanks
Marge Yang
-----Original Message-----
From: Andi Shyti <andi.shyti@...nel.org>
Sent: Wednesday, June 14, 2023 4:49 AM
To: Marge Yang <Marge.Yang@...synaptics.com>
Cc: dmitry.torokhov@...il.com; linux-input@...r.kernel.org; linux-kernel@...r.kernel.org; David Chiu <David.Chiu@...synaptics.com>; Derek Cheng <derek.cheng@...synaptics.com>; Sam Tsai <Sam.Tsai@...aptics.com>; Vincent Huang <Vincent.huang@...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;
> +}
Powered by blists - more mailing lists