Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   1) // SPDX-License-Identifier: GPL-2.0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3)  * Raspberry Pi firmware based touchscreen driver
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5)  * Copyright (C) 2015, 2017 Raspberry Pi
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6)  * Copyright (C) 2018 Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9) #include <linux/io.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10) #include <linux/of.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11) #include <linux/slab.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12) #include <linux/device.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13) #include <linux/module.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14) #include <linux/bitops.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15) #include <linux/dma-mapping.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16) #include <linux/platform_device.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17) #include <linux/input.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18) #include <linux/input/mt.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) #include <linux/input/touchscreen.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20) #include <soc/bcm2835/raspberrypi-firmware.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22) #define RPI_TS_DEFAULT_WIDTH	800
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) #define RPI_TS_DEFAULT_HEIGHT	480
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) #define RPI_TS_MAX_SUPPORTED_POINTS	10
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) #define RPI_TS_FTS_TOUCH_DOWN		0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) #define RPI_TS_FTS_TOUCH_CONTACT	2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) #define RPI_TS_POLL_INTERVAL		17	/* 60fps */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) #define RPI_TS_NPOINTS_REG_INVALIDATE	99
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) struct rpi_ts {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) 	struct platform_device *pdev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) 	struct input_dev *input;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) 	struct touchscreen_properties prop;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) 	void __iomem *fw_regs_va;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) 	dma_addr_t fw_regs_phys;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) 	int known_ids;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) struct rpi_ts_regs {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) 	u8 device_mode;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) 	u8 gesture_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) 	u8 num_points;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) 	struct rpi_ts_touch {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) 		u8 xh;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) 		u8 xl;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) 		u8 yh;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) 		u8 yl;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54) 		u8 pressure; /* Not supported */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) 		u8 area;     /* Not supported */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) 	} point[RPI_TS_MAX_SUPPORTED_POINTS];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) static void rpi_ts_poll(struct input_dev *input)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) 	struct rpi_ts *ts = input_get_drvdata(input);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) 	struct rpi_ts_regs regs;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) 	int modified_ids = 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) 	long released_ids;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) 	int event_type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) 	int touchid;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) 	int x, y;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) 	int i;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) 	memcpy_fromio(&regs, ts->fw_regs_va, sizeof(regs));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) 	/*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72) 	 * We poll the memory based register copy of the touchscreen chip using
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73) 	 * the number of points register to know whether the copy has been
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74) 	 * updated (we write 99 to the memory copy, the GPU will write between
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75) 	 * 0 - 10 points)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76) 	 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) 	iowrite8(RPI_TS_NPOINTS_REG_INVALIDATE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) 		 ts->fw_regs_va + offsetof(struct rpi_ts_regs, num_points));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) 	if (regs.num_points == RPI_TS_NPOINTS_REG_INVALIDATE ||
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) 	    (regs.num_points == 0 && ts->known_ids == 0))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) 		return;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) 	for (i = 0; i < regs.num_points; i++) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) 		x = (((int)regs.point[i].xh & 0xf) << 8) + regs.point[i].xl;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) 		y = (((int)regs.point[i].yh & 0xf) << 8) + regs.point[i].yl;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) 		touchid = (regs.point[i].yh >> 4) & 0xf;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) 		event_type = (regs.point[i].xh >> 6) & 0x03;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) 		modified_ids |= BIT(touchid);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92) 		if (event_type == RPI_TS_FTS_TOUCH_DOWN ||
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93) 		    event_type == RPI_TS_FTS_TOUCH_CONTACT) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) 			input_mt_slot(input, touchid);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) 			input_mt_report_slot_state(input, MT_TOOL_FINGER, 1);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) 			touchscreen_report_pos(input, &ts->prop, x, y, true);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) 		}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) 	released_ids = ts->known_ids & ~modified_ids;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) 	for_each_set_bit(i, &released_ids, RPI_TS_MAX_SUPPORTED_POINTS) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) 		input_mt_slot(input, i);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) 		input_mt_report_slot_inactive(input);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) 		modified_ids &= ~(BIT(i));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) 	ts->known_ids = modified_ids;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) 	input_mt_sync_frame(input);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) 	input_sync(input);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) static void rpi_ts_dma_cleanup(void *data)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) 	struct rpi_ts *ts = data;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) 	struct device *dev = &ts->pdev->dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) 	dma_free_coherent(dev, PAGE_SIZE, ts->fw_regs_va, ts->fw_regs_phys);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) static int rpi_ts_probe(struct platform_device *pdev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) 	struct device *dev = &pdev->dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) 	struct device_node *np = dev->of_node;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) 	struct input_dev *input;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) 	struct device_node *fw_node;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) 	struct rpi_firmware *fw;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) 	struct rpi_ts *ts;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) 	u32 touchbuf;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) 	int error;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) 	fw_node = of_get_parent(np);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) 	if (!fw_node) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) 		dev_err(dev, "Missing firmware node\n");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) 		return -ENOENT;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) 	fw = rpi_firmware_get(fw_node);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) 	of_node_put(fw_node);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) 	if (!fw)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) 		return -EPROBE_DEFER;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) 	ts = devm_kzalloc(dev, sizeof(*ts), GFP_KERNEL);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) 	if (!ts)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) 		return -ENOMEM;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) 	ts->pdev = pdev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) 	ts->fw_regs_va = dma_alloc_coherent(dev, PAGE_SIZE, &ts->fw_regs_phys,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) 					    GFP_KERNEL);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) 	if (!ts->fw_regs_va) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) 		dev_err(dev, "failed to dma_alloc_coherent\n");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) 		return -ENOMEM;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) 	error = devm_add_action_or_reset(dev, rpi_ts_dma_cleanup, ts);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) 	if (error) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) 		dev_err(dev, "failed to devm_add_action_or_reset, %d\n", error);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) 		return error;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) 	touchbuf = (u32)ts->fw_regs_phys;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) 	error = rpi_firmware_property(fw, RPI_FIRMWARE_FRAMEBUFFER_SET_TOUCHBUF,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) 				      &touchbuf, sizeof(touchbuf));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) 	if (error || touchbuf != 0) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) 		dev_warn(dev, "Failed to set touchbuf, %d\n", error);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) 		return error;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) 	input = devm_input_allocate_device(dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) 	if (!input) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) 		dev_err(dev, "Failed to allocate input device\n");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) 		return -ENOMEM;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) 	ts->input = input;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) 	input_set_drvdata(input, ts);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) 	input->name = "raspberrypi-ts";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) 	input->id.bustype = BUS_HOST;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) 	input_set_abs_params(input, ABS_MT_POSITION_X, 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) 			     RPI_TS_DEFAULT_WIDTH, 0, 0);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) 	input_set_abs_params(input, ABS_MT_POSITION_Y, 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) 			     RPI_TS_DEFAULT_HEIGHT, 0, 0);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) 	touchscreen_parse_properties(input, true, &ts->prop);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) 	error = input_mt_init_slots(input, RPI_TS_MAX_SUPPORTED_POINTS,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) 				    INPUT_MT_DIRECT);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) 	if (error) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) 		dev_err(dev, "could not init mt slots, %d\n", error);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) 		return error;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) 	error = input_setup_polling(input, rpi_ts_poll);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) 	if (error) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) 		dev_err(dev, "could not set up polling mode, %d\n", error);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) 		return error;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) 	input_set_poll_interval(input, RPI_TS_POLL_INTERVAL);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) 	error = input_register_device(input);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) 	if (error) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) 		dev_err(dev, "could not register input device, %d\n", error);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) 		return error;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) 	return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) static const struct of_device_id rpi_ts_match[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) 	{ .compatible = "raspberrypi,firmware-ts", },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) 	{},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) MODULE_DEVICE_TABLE(of, rpi_ts_match);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) static struct platform_driver rpi_ts_driver = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) 	.driver = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) 		.name = "raspberrypi-ts",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) 		.of_match_table = rpi_ts_match,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) 	},
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) 	.probe = rpi_ts_probe,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) module_platform_driver(rpi_ts_driver);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) MODULE_AUTHOR("Gordon Hollingworth");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) MODULE_AUTHOR("Nicolas Saenz Julienne <nsaenzjulienne@suse.de>");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) MODULE_DESCRIPTION("Raspberry Pi firmware based touchscreen driver");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) MODULE_LICENSE("GPL v2");