linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] Input: tps6507x-ts - use bool for booleans
@ 2013-06-10  5:53 Dmitry Torokhov
  2013-06-10  5:53 ` [PATCH 2/3] Input: tps6507x-ts - remove vref from platform data Dmitry Torokhov
  2013-06-10  5:53 ` [PATCH 3/3] Input: tps6507x-ts - convert to polled input device infrastructure Dmitry Torokhov
  0 siblings, 2 replies; 7+ messages in thread
From: Dmitry Torokhov @ 2013-06-10  5:53 UTC (permalink / raw)
  To: linux-input; +Cc: manishv.b, davinci-linux-open-source

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---

Note that neither of these 3 patches has been tested on the real hardware as
I don't have it so if someone could give them a spin that would be great.

 drivers/input/touchscreen/tps6507x-ts.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/input/touchscreen/tps6507x-ts.c b/drivers/input/touchscreen/tps6507x-ts.c
index 1fb397c..c981ccf 100644
--- a/drivers/input/touchscreen/tps6507x-ts.c
+++ b/drivers/input/touchscreen/tps6507x-ts.c
@@ -45,12 +45,12 @@ struct tps6507x_ts {
 	struct ts_event		tc;
 	struct tps6507x_dev	*mfd;
 	u16			model;
-	unsigned		pendown;
+	u16			min_pressure;
 	int			irq;
 	void			(*clear_penirq)(void);
 	unsigned long		poll_period;	/* ms */
-	u16			min_pressure;
 	int			vref;		/* non-zero to leave vref on */
+	bool			pendown;
 };
 
 static int tps6507x_read_u8(struct tps6507x_ts *tsc, u8 reg, u8 *data)
@@ -165,12 +165,12 @@ static void tps6507x_ts_handler(struct work_struct *work)
 	struct tps6507x_ts *tsc =  container_of(work,
 				struct tps6507x_ts, work.work);
 	struct input_dev *input_dev = tsc->input_dev;
-	int pendown;
+	bool pendown;
 	int schd;
 	s32 ret;
 
-	ret =  tps6507x_adc_conversion(tsc, TPS6507X_TSCMODE_PRESSURE,
-				       &tsc->tc.pressure);
+	ret = tps6507x_adc_conversion(tsc, TPS6507X_TSCMODE_PRESSURE,
+				      &tsc->tc.pressure);
 	if (ret)
 		goto done;
 
@@ -181,7 +181,7 @@ static void tps6507x_ts_handler(struct work_struct *work)
 		input_report_key(input_dev, BTN_TOUCH, 0);
 		input_report_abs(input_dev, ABS_PRESSURE, 0);
 		input_sync(input_dev);
-		tsc->pendown = 0;
+		tsc->pendown = false;
 	}
 
 	if (pendown) {
@@ -206,7 +206,7 @@ static void tps6507x_ts_handler(struct work_struct *work)
 		input_report_abs(input_dev, ABS_Y, tsc->tc.y);
 		input_report_abs(input_dev, ABS_PRESSURE, tsc->tc.pressure);
 		input_sync(input_dev);
-		tsc->pendown = 1;
+		tsc->pendown = true;
 	}
 
 done:
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-07-02 15:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-10  5:53 [PATCH 1/3] Input: tps6507x-ts - use bool for booleans Dmitry Torokhov
2013-06-10  5:53 ` [PATCH 2/3] Input: tps6507x-ts - remove vref from platform data Dmitry Torokhov
2013-07-02 15:49   ` Kevin Hilman
2013-06-10  5:53 ` [PATCH 3/3] Input: tps6507x-ts - convert to polled input device infrastructure Dmitry Torokhov
2013-06-12  7:12   ` Vishwanathrao Badarkhe, Manish
2013-06-19  6:17     ` Dmitry Torokhov
2013-07-01  6:42       ` Manish Badarkhe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).