Messages in this thread | | | From | Marge Yang <> | Subject | RE: [PATCH V2] Input: synaptics-rmi4- Add a new feature for Forepad. | Date | Mon, 3 Jul 2023 02:49:50 +0000 |
| |
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; > +}
| |