RE: [PATCH V2] Input: synaptics-rmi4- Add a new feature for Forepad.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Andi,
	I have modified it and send PATCH V3.
Thanks
Marge Yang

-----Original Message-----
From: Andi Shyti <andi.shyti@xxxxxxxxxx> 
Sent: Wednesday, June 14, 2023 4:49 AM
To: Marge Yang <Marge.Yang@xxxxxxxxxxxxxxxx>
Cc: dmitry.torokhov@xxxxxxxxx; linux-input@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; David Chiu <David.Chiu@xxxxxxxxxxxxxxxx>; Derek Cheng <derek.cheng@xxxxxxxxxxxxxxxx>; Sam Tsai <Sam.Tsai@xxxxxxxxxxxxx>; Vincent Huang <Vincent.huang@xxxxxxxxxxxxxxxx>
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;
> +}




[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux