Lines Matching +full:up +full:- +full:samples
1 // SPDX-License-Identifier: GPL-2.0-only
36 /* 3 low word X samples */ in jornada720_ts_collect_data()
37 jornada_ts->x_data[0] = jornada_ssp_byte(TXDUMMY); in jornada720_ts_collect_data()
38 jornada_ts->x_data[1] = jornada_ssp_byte(TXDUMMY); in jornada720_ts_collect_data()
39 jornada_ts->x_data[2] = jornada_ssp_byte(TXDUMMY); in jornada720_ts_collect_data()
41 /* 3 low word Y samples */ in jornada720_ts_collect_data()
42 jornada_ts->y_data[0] = jornada_ssp_byte(TXDUMMY); in jornada720_ts_collect_data()
43 jornada_ts->y_data[1] = jornada_ssp_byte(TXDUMMY); in jornada720_ts_collect_data()
44 jornada_ts->y_data[2] = jornada_ssp_byte(TXDUMMY); in jornada720_ts_collect_data()
46 /* combined x samples bits */ in jornada720_ts_collect_data()
47 jornada_ts->x_data[3] = jornada_ssp_byte(TXDUMMY); in jornada720_ts_collect_data()
49 /* combined y samples bits */ in jornada720_ts_collect_data()
50 jornada_ts->y_data[3] = jornada_ssp_byte(TXDUMMY); in jornada720_ts_collect_data()
68 struct input_dev *input = jornada_ts->dev; in jornada720_ts_interrupt()
71 /* If gpio is high then report pen up */ in jornada720_ts_interrupt()
72 if (gpiod_get_value(jornada_ts->gpio)) { in jornada720_ts_interrupt()
82 x = jornada720_ts_average(jornada_ts->x_data); in jornada720_ts_interrupt()
83 y = jornada720_ts_average(jornada_ts->y_data); in jornada720_ts_interrupt()
103 jornada_ts = devm_kzalloc(&pdev->dev, sizeof(*jornada_ts), GFP_KERNEL); in jornada720_ts_probe()
105 return -ENOMEM; in jornada720_ts_probe()
107 input_dev = devm_input_allocate_device(&pdev->dev); in jornada720_ts_probe()
109 return -ENOMEM; in jornada720_ts_probe()
113 jornada_ts->gpio = devm_gpiod_get(&pdev->dev, "penup", GPIOD_IN); in jornada720_ts_probe()
114 if (IS_ERR(jornada_ts->gpio)) in jornada720_ts_probe()
115 return PTR_ERR(jornada_ts->gpio); in jornada720_ts_probe()
117 irq = gpiod_to_irq(jornada_ts->gpio); in jornada720_ts_probe()
119 return irq < 0 ? irq : -EINVAL; in jornada720_ts_probe()
121 jornada_ts->dev = input_dev; in jornada720_ts_probe()
123 input_dev->name = "HP Jornada 7xx Touchscreen"; in jornada720_ts_probe()
124 input_dev->phys = "jornadats/input0"; in jornada720_ts_probe()
125 input_dev->id.bustype = BUS_HOST; in jornada720_ts_probe()
126 input_dev->dev.parent = &pdev->dev; in jornada720_ts_probe()
128 input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS); in jornada720_ts_probe()
129 input_dev->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH); in jornada720_ts_probe()
133 error = devm_request_irq(&pdev->dev, irq, jornada720_ts_interrupt, in jornada720_ts_probe()
137 dev_err(&pdev->dev, "HP7XX TS : Unable to acquire irq!\n"); in jornada720_ts_probe()
141 error = input_register_device(jornada_ts->dev); in jornada720_ts_probe()