2016-12-05 01:04:49

by Nick Dyer

[permalink] [raw]
Subject: [PATCH] Input: synaptics-rmi4 - fix debug for sensor clip

The debug would only ever output zero for the clip information.

Signed-off-by: Nick Dyer <[email protected]>
---

drivers/input/rmi4/rmi_f12.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/input/rmi4/rmi_f12.c b/drivers/input/rmi4/rmi_f12.c
index 8c5360c..e35c64b 100644
--- a/drivers/input/rmi4/rmi_f12.c
+++ b/drivers/input/rmi4/rmi_f12.c
@@ -71,10 +71,6 @@ static int rmi_f12_read_sensor_tuning(struct f12_data *f12)
u8 buf[15];
int pitch_x = 0;
int pitch_y = 0;
- int clip_x_low = 0;
- int clip_x_high = 0;
- int clip_y_low = 0;
- int clip_y_high = 0;
int rx_receivers = 0;
int tx_receivers = 0;
int sensor_flags = 0;
@@ -127,7 +123,8 @@ static int rmi_f12_read_sensor_tuning(struct f12_data *f12)
}

rmi_dbg(RMI_DEBUG_FN, &fn->dev, "%s: x low: %d x high: %d y low: %d y high: %d\n",
- __func__, clip_x_low, clip_x_high, clip_y_low, clip_y_high);
+ __func__, sensor->axis_align.clip_x_low, sensor->axis_align.clip_x_high,
+ sensor->axis_align.clip_y_low, sensor->axis_align.clip_y_high);

if (rmi_register_desc_has_subpacket(item, 3)) {
rx_receivers = buf[offset];
--
2.7.4


2016-12-05 18:04:46

by Andrew Duggan

[permalink] [raw]
Subject: Re: [PATCH] Input: synaptics-rmi4 - fix debug for sensor clip

On 12/04/2016 05:04 PM, Nick Dyer wrote:
> The debug would only ever output zero for the clip information.
>
> Signed-off-by: Nick Dyer <[email protected]>

Reviewed-by: Andrew Duggan <[email protected]>

> ---
>
> drivers/input/rmi4/rmi_f12.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/input/rmi4/rmi_f12.c b/drivers/input/rmi4/rmi_f12.c
> index 8c5360c..e35c64b 100644
> --- a/drivers/input/rmi4/rmi_f12.c
> +++ b/drivers/input/rmi4/rmi_f12.c
> @@ -71,10 +71,6 @@ static int rmi_f12_read_sensor_tuning(struct f12_data *f12)
> u8 buf[15];
> int pitch_x = 0;
> int pitch_y = 0;
> - int clip_x_low = 0;
> - int clip_x_high = 0;
> - int clip_y_low = 0;
> - int clip_y_high = 0;
> int rx_receivers = 0;
> int tx_receivers = 0;
> int sensor_flags = 0;
> @@ -127,7 +123,8 @@ static int rmi_f12_read_sensor_tuning(struct f12_data *f12)
> }
>
> rmi_dbg(RMI_DEBUG_FN, &fn->dev, "%s: x low: %d x high: %d y low: %d y high: %d\n",
> - __func__, clip_x_low, clip_x_high, clip_y_low, clip_y_high);
> + __func__, sensor->axis_align.clip_x_low, sensor->axis_align.clip_x_high,
> + sensor->axis_align.clip_y_low, sensor->axis_align.clip_y_high);
>
> if (rmi_register_desc_has_subpacket(item, 3)) {
> rx_receivers = buf[offset];


2016-12-08 01:22:23

by Dmitry Torokhov

[permalink] [raw]
Subject: Re: [PATCH] Input: synaptics-rmi4 - fix debug for sensor clip

On Mon, Dec 05, 2016 at 01:04:41AM +0000, Nick Dyer wrote:
> The debug would only ever output zero for the clip information.
>
> Signed-off-by: Nick Dyer <[email protected]>

Applied, thank you.

> ---
>
> drivers/input/rmi4/rmi_f12.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/input/rmi4/rmi_f12.c b/drivers/input/rmi4/rmi_f12.c
> index 8c5360c..e35c64b 100644
> --- a/drivers/input/rmi4/rmi_f12.c
> +++ b/drivers/input/rmi4/rmi_f12.c
> @@ -71,10 +71,6 @@ static int rmi_f12_read_sensor_tuning(struct f12_data *f12)
> u8 buf[15];
> int pitch_x = 0;
> int pitch_y = 0;
> - int clip_x_low = 0;
> - int clip_x_high = 0;
> - int clip_y_low = 0;
> - int clip_y_high = 0;
> int rx_receivers = 0;
> int tx_receivers = 0;
> int sensor_flags = 0;
> @@ -127,7 +123,8 @@ static int rmi_f12_read_sensor_tuning(struct f12_data *f12)
> }
>
> rmi_dbg(RMI_DEBUG_FN, &fn->dev, "%s: x low: %d x high: %d y low: %d y high: %d\n",
> - __func__, clip_x_low, clip_x_high, clip_y_low, clip_y_high);
> + __func__, sensor->axis_align.clip_x_low, sensor->axis_align.clip_x_high,
> + sensor->axis_align.clip_y_low, sensor->axis_align.clip_y_high);
>
> if (rmi_register_desc_has_subpacket(item, 3)) {
> rx_receivers = buf[offset];
> --
> 2.7.4
>

--
Dmitry