[PATCH 3/5] Input: tsc2007 - fix minor coding style issues

From: Dmitry Torokhov

Date: Thu Nov 12 2026 - 01:57:10 EST


Fix minor checkpatch warnings and checks across the tsc2007 driver:
document the mutex used to serialize I2C transfers between interrupt
handling and IIO reads, remove an unnecessary blank line following a
loop opening brace, and drop extraneous spacing after a cast.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>
---
drivers/input/touchscreen/tsc2007.h | 1 +
drivers/input/touchscreen/tsc2007_core.c | 3 +--
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/input/touchscreen/tsc2007.h b/drivers/input/touchscreen/tsc2007.h
index f65186b8e709..e5153b420371 100644
--- a/drivers/input/touchscreen/tsc2007.h
+++ b/drivers/input/touchscreen/tsc2007.h
@@ -78,6 +78,7 @@ struct tsc2007 {
wait_queue_head_t wait;
bool stopped;

+ /* Serializes I2C transfers between the ISR and IIO reads */
struct mutex mlock;
};

diff --git a/drivers/input/touchscreen/tsc2007_core.c b/drivers/input/touchscreen/tsc2007_core.c
index 51e4d985afcc..8197ad91ed8b 100644
--- a/drivers/input/touchscreen/tsc2007_core.c
+++ b/drivers/input/touchscreen/tsc2007_core.c
@@ -82,7 +82,7 @@ u32 tsc2007_calculate_resistance(struct tsc2007 *tsc, struct ts_event *tc)

if (rt > U32_MAX)
return U32_MAX;
- return (u32) rt;
+ return (u32)rt;
}

bool tsc2007_is_pen_down(struct tsc2007 *ts)
@@ -115,7 +115,6 @@ static irqreturn_t tsc2007_soft_irq(int irq, void *handle)
u32 rt;

while (!ts->stopped && tsc2007_is_pen_down(ts)) {
-
/* pen is down, continue with the measurement */

/* Serialize access between the ISR and IIO reads. */
--
2.56.0.567.gdb80ae8cd5-goog