Input: tps6507x-ts - use bool for booleans
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
This commit is contained in:
parent
04848ba829
commit
02a71600df
1 changed files with 7 additions and 7 deletions
|
@ -45,12 +45,12 @@ struct tps6507x_ts {
|
||||||
struct ts_event tc;
|
struct ts_event tc;
|
||||||
struct tps6507x_dev *mfd;
|
struct tps6507x_dev *mfd;
|
||||||
u16 model;
|
u16 model;
|
||||||
unsigned pendown;
|
u16 min_pressure;
|
||||||
int irq;
|
int irq;
|
||||||
void (*clear_penirq)(void);
|
void (*clear_penirq)(void);
|
||||||
unsigned long poll_period; /* ms */
|
unsigned long poll_period; /* ms */
|
||||||
u16 min_pressure;
|
|
||||||
int vref; /* non-zero to leave vref on */
|
int vref; /* non-zero to leave vref on */
|
||||||
|
bool pendown;
|
||||||
};
|
};
|
||||||
|
|
||||||
static int tps6507x_read_u8(struct tps6507x_ts *tsc, u8 reg, u8 *data)
|
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 *tsc = container_of(work,
|
||||||
struct tps6507x_ts, work.work);
|
struct tps6507x_ts, work.work);
|
||||||
struct input_dev *input_dev = tsc->input_dev;
|
struct input_dev *input_dev = tsc->input_dev;
|
||||||
int pendown;
|
bool pendown;
|
||||||
int schd;
|
int schd;
|
||||||
s32 ret;
|
s32 ret;
|
||||||
|
|
||||||
ret = tps6507x_adc_conversion(tsc, TPS6507X_TSCMODE_PRESSURE,
|
ret = tps6507x_adc_conversion(tsc, TPS6507X_TSCMODE_PRESSURE,
|
||||||
&tsc->tc.pressure);
|
&tsc->tc.pressure);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto done;
|
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_key(input_dev, BTN_TOUCH, 0);
|
||||||
input_report_abs(input_dev, ABS_PRESSURE, 0);
|
input_report_abs(input_dev, ABS_PRESSURE, 0);
|
||||||
input_sync(input_dev);
|
input_sync(input_dev);
|
||||||
tsc->pendown = 0;
|
tsc->pendown = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pendown) {
|
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_Y, tsc->tc.y);
|
||||||
input_report_abs(input_dev, ABS_PRESSURE, tsc->tc.pressure);
|
input_report_abs(input_dev, ABS_PRESSURE, tsc->tc.pressure);
|
||||||
input_sync(input_dev);
|
input_sync(input_dev);
|
||||||
tsc->pendown = 1;
|
tsc->pendown = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
done:
|
done:
|
||||||
|
|
Loading…
Add table
Reference in a new issue