Re: [PATCH v3] Input: synaptics-rmi4 - convert irq distribution to irq_domain

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

 



Hi Nick,

On Tue, Mar 27, 2018 at 10:32:25PM +0100, Nick Dyer wrote:
> Convert the RMI driver to use the standard mechanism for
> distributing IRQs to the various functions.
> 
> Tested on:
> * S7300 (F11, F34, F54)
> * S7817 (F12, F34, F54)
> 
> [v2: mark interrupts as threaded, move irq init code]
> [v3: use fwnode api, handle teardown as per dtor comments]
> 
> Signed-off-by: Nick Dyer <nick@xxxxxxxxxxxxx>
> Acked-by: Christopher Heiny <cheiny@xxxxxxxxxxxxx>

I was about to apply this, but I was getting some compile warnings:

>  
>  static void rmi_f11_finger_handler(struct f11_data *f11,
>  				   struct rmi_2d_sensor *sensor,
> -				   unsigned long *irq_bits, int num_irq_regs,
> -				   int size)
> +				   int num_irq_regs, int size)

I do not see where we are using num_irq_regs...

>  {
>  	const u8 *f_state = f11->data.f_state;
>  	u8 finger_state;
> @@ -581,12 +580,7 @@ static void rmi_f11_finger_handler(struct f11_data *f11,
>  	int rel_fingers;
>  	int abs_size = sensor->nbr_fingers * RMI_F11_ABS_BYTES;
>  
> -	int abs_bits = bitmap_and(f11->result_bits, irq_bits, f11->abs_mask,
> -				  num_irq_regs * 8);
> -	int rel_bits = bitmap_and(f11->result_bits, irq_bits, f11->rel_mask,
> -				  num_irq_regs * 8);
> -
> -	if (abs_bits) {
> +	if (sensor->report_abs) {
>  		if (abs_size > size)
>  			abs_fingers = size / RMI_F11_ABS_BYTES;
>  		else
> @@ -606,7 +600,7 @@ static void rmi_f11_finger_handler(struct f11_data *f11,
>  		}
>  	}
>  
> -	if (rel_bits) {
> +	if (sensor->report_rel) {
>  		if ((abs_size + sensor->nbr_fingers * RMI_F11_REL_BYTES) > size)
>  			rel_fingers = (size - abs_size) / RMI_F11_REL_BYTES;
>  		else
> @@ -616,7 +610,7 @@ static void rmi_f11_finger_handler(struct f11_data *f11,
>  			rmi_f11_rel_pos_report(f11, i);
>  	}
>  
> -	if (abs_bits) {
> +	if (sensor->report_abs) {

I do not see the reason why we split reporting abs like this, and that
is what causing "maybe uninitialized" warning. Please move it all into
single branch of "if (sensor->report_abs)" (but still keeping the "2
pass" approach of first parsing the reports, assigning slots if needed,
and then sending corresponding events).

>  		/*
>  		 * the absolute part is made in 2 parts to allow the kernel
>  		 * tracking to take place.
> @@ -1275,8 +1269,9 @@ static int rmi_f11_config(struct rmi_function *fn)
>  	return 0;
>  }
>  

Thanks.

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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