Lines Matching refs:ts

50 	struct ts4800_ts *ts = input_get_drvdata(input_dev);  in ts4800_ts_open()  local
53 ts->pendown = false; in ts4800_ts_open()
54 ts->debounce = DEBOUNCE_COUNT; in ts4800_ts_open()
56 error = regmap_update_bits(ts->regmap, ts->reg, ts->bit, ts->bit); in ts4800_ts_open()
58 dev_warn(ts->dev, "Failed to enable touchscreen: %d\n", error); in ts4800_ts_open()
67 struct ts4800_ts *ts = input_get_drvdata(input_dev); in ts4800_ts_close() local
70 ret = regmap_update_bits(ts->regmap, ts->reg, ts->bit, 0); in ts4800_ts_close()
72 dev_warn(ts->dev, "Failed to disable touchscreen\n"); in ts4800_ts_close()
78 struct ts4800_ts *ts = input_get_drvdata(input_dev); in ts4800_ts_poll() local
79 u16 last_x = readw(ts->base + X_OFFSET); in ts4800_ts_poll()
80 u16 last_y = readw(ts->base + Y_OFFSET); in ts4800_ts_poll()
84 if (ts->debounce) { in ts4800_ts_poll()
85 ts->debounce--; in ts4800_ts_poll()
89 if (!ts->pendown) { in ts4800_ts_poll()
91 ts->pendown = true; in ts4800_ts_poll()
100 } else if (ts->pendown) { in ts4800_ts_poll()
101 ts->pendown = false; in ts4800_ts_poll()
102 ts->debounce = DEBOUNCE_COUNT; in ts4800_ts_poll()
109 struct ts4800_ts *ts) in ts4800_parse_dt() argument
123 ts->regmap = syscon_node_to_regmap(syscon_np); in ts4800_parse_dt()
125 if (IS_ERR(ts->regmap)) { in ts4800_parse_dt()
127 return PTR_ERR(ts->regmap); in ts4800_parse_dt()
136 ts->reg = reg; in ts4800_parse_dt()
144 ts->bit = BIT(bit); in ts4800_parse_dt()
152 struct ts4800_ts *ts; in ts4800_ts_probe() local
155 ts = devm_kzalloc(&pdev->dev, sizeof(*ts), GFP_KERNEL); in ts4800_ts_probe()
156 if (!ts) in ts4800_ts_probe()
159 error = ts4800_parse_dt(pdev, ts); in ts4800_ts_probe()
163 ts->base = devm_platform_ioremap_resource(pdev, 0); in ts4800_ts_probe()
164 if (IS_ERR(ts->base)) in ts4800_ts_probe()
165 return PTR_ERR(ts->base); in ts4800_ts_probe()
171 snprintf(ts->phys, sizeof(ts->phys), "%s/input0", dev_name(&pdev->dev)); in ts4800_ts_probe()
172 ts->input = input_dev; in ts4800_ts_probe()
173 ts->dev = &pdev->dev; in ts4800_ts_probe()
175 input_set_drvdata(input_dev, ts); in ts4800_ts_probe()
178 input_dev->phys = ts->phys; in ts4800_ts_probe()