Lines Matching +full:has +full:- +full:touchscreen
1 // SPDX-License-Identifier: GPL-2.0
3 * Raspberry Pi firmware based touchscreen driver
15 #include <linux/dma-mapping.h>
19 #include <linux/input/touchscreen.h>
20 #include <soc/bcm2835/raspberrypi-firmware.h>
70 memcpy_fromio(®s, ts->fw_regs_va, sizeof(regs)); in rpi_ts_poll()
72 * We poll the memory based register copy of the touchscreen chip using in rpi_ts_poll()
73 * the number of points register to know whether the copy has been in rpi_ts_poll()
75 * 0 - 10 points) in rpi_ts_poll()
78 ts->fw_regs_va + offsetof(struct rpi_ts_regs, num_points)); in rpi_ts_poll()
81 (regs.num_points == 0 && ts->known_ids == 0)) in rpi_ts_poll()
96 touchscreen_report_pos(input, &ts->prop, x, y, true); in rpi_ts_poll()
100 released_ids = ts->known_ids & ~modified_ids; in rpi_ts_poll()
106 ts->known_ids = modified_ids; in rpi_ts_poll()
115 struct device *dev = &ts->pdev->dev; in rpi_ts_dma_cleanup()
117 dma_free_coherent(dev, PAGE_SIZE, ts->fw_regs_va, ts->fw_regs_phys); in rpi_ts_dma_cleanup()
122 struct device *dev = &pdev->dev; in rpi_ts_probe()
123 struct device_node *np = dev->of_node; in rpi_ts_probe()
134 return -ENOENT; in rpi_ts_probe()
137 fw = devm_rpi_firmware_get(&pdev->dev, fw_node); in rpi_ts_probe()
140 return -EPROBE_DEFER; in rpi_ts_probe()
144 return -ENOMEM; in rpi_ts_probe()
145 ts->pdev = pdev; in rpi_ts_probe()
147 ts->fw_regs_va = dma_alloc_coherent(dev, PAGE_SIZE, &ts->fw_regs_phys, in rpi_ts_probe()
149 if (!ts->fw_regs_va) { in rpi_ts_probe()
151 return -ENOMEM; in rpi_ts_probe()
160 touchbuf = (u32)ts->fw_regs_phys; in rpi_ts_probe()
171 return -ENOMEM; in rpi_ts_probe()
174 ts->input = input; in rpi_ts_probe()
177 input->name = "raspberrypi-ts"; in rpi_ts_probe()
178 input->id.bustype = BUS_HOST; in rpi_ts_probe()
184 touchscreen_parse_properties(input, true, &ts->prop); in rpi_ts_probe()
211 { .compatible = "raspberrypi,firmware-ts", },
218 .name = "raspberrypi-ts",
227 MODULE_DESCRIPTION("Raspberry Pi firmware based touchscreen driver");