mirror of
https://github.com/armbian/build.git
synced 2025-08-09 12:46:58 +02:00
I have changed the way the patches are generated a bit. Instead of using orange-pi branch from megous tree for 6.6 kernel, I have used the following kernel branches a83t-suspend, af8133j, anx, audio, axp, cam, drm, err, fixes, mbus, modem, opi3, pb, pinetab, pp, ppkb, samuel, speed, tbs-a711, ths These branches were carefully chosen to include only allwinner related patches and remove importing of the rockchip related patches into the allwinner kernel. Following patches are modified to fix patch application failure - patches.armbian/arm64-dts-sun50i-h616-orangepi-zero2-reg_usb1_vbus-status-ok.patch - patches.armbian/arm64-dts-sun50i-h616-orangepi-zero2-Enable-GPU-mali.patch - patches.armbian/arm64-dts-allwinner-h616-Add-efuse_xlate-cpu-frequency-scaling-v1_6_2.patch - patches.armbian/arm64-dts-allwinner-h616-LED-green_power_on-red_status_heartbeat.patch - patches.armbian/arm64-dts-allwinner-overlay-Add-Overlays-for-sunxi64.patch - patches.armbian/arm64-dts-sun50i-h616-bigtreetech-cb1.patch Following patches are modified because of kernel api change to fix compilation failure - patches.armbian/drv-gpu-drm-sun4i-Add-HDMI-audio-sun4i-hdmi-encoder.patch - patches.armbian/drv-of-Device-Tree-Overlay-ConfigFS-interface.patch
64 lines
2.2 KiB
Diff
64 lines
2.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Mitko Gamishev <hehopmajieh@debian.bg>
|
|
Date: Wed, 5 Feb 2020 15:18:04 +0200
|
|
Subject: drv:input:touchscreen:sun4i-ts Enable parsing
|
|
|
|
---
|
|
drivers/input/touchscreen/sun4i-ts.c | 19 ++++++++--
|
|
1 file changed, 15 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/drivers/input/touchscreen/sun4i-ts.c b/drivers/input/touchscreen/sun4i-ts.c
|
|
index bb3c6072fc82..9092286aa7dd 100644
|
|
--- a/drivers/input/touchscreen/sun4i-ts.c
|
|
+++ b/drivers/input/touchscreen/sun4i-ts.c
|
|
@@ -32,6 +32,7 @@
|
|
#include <linux/thermal.h>
|
|
#include <linux/init.h>
|
|
#include <linux/input.h>
|
|
+#include <linux/input/touchscreen.h>
|
|
#include <linux/interrupt.h>
|
|
#include <linux/io.h>
|
|
#include <linux/module.h>
|
|
@@ -106,6 +107,7 @@
|
|
struct sun4i_ts_data {
|
|
struct device *dev;
|
|
struct input_dev *input;
|
|
+ struct touchscreen_properties prop;
|
|
void __iomem *base;
|
|
unsigned int irq;
|
|
bool ignore_fifo_data;
|
|
@@ -123,8 +125,8 @@ static void sun4i_ts_irq_handle_input(struct sun4i_ts_data *ts, u32 reg_val)
|
|
y = readl(ts->base + TP_DATA);
|
|
/* The 1st location reported after an up event is unreliable */
|
|
if (!ts->ignore_fifo_data) {
|
|
- input_report_abs(ts->input, ABS_X, x);
|
|
- input_report_abs(ts->input, ABS_Y, y);
|
|
+ touchscreen_report_pos(ts->input, &ts->prop, x, y, false);
|
|
+
|
|
/*
|
|
* The hardware has a separate down status bit, but
|
|
* that gets set before we get the first location,
|
|
@@ -296,8 +298,17 @@ static int sun4i_ts_probe(struct platform_device *pdev)
|
|
ts->input->id.version = 0x0100;
|
|
ts->input->evbit[0] = BIT(EV_SYN) | BIT(EV_KEY) | BIT(EV_ABS);
|
|
__set_bit(BTN_TOUCH, ts->input->keybit);
|
|
- input_set_abs_params(ts->input, ABS_X, 0, 4095, 0, 0);
|
|
- input_set_abs_params(ts->input, ABS_Y, 0, 4095, 0, 0);
|
|
+
|
|
+ touchscreen_parse_properties(ts->input, false, &ts->prop);
|
|
+
|
|
+ if (!ts->prop.max_x || !ts->prop.max_y) {
|
|
+ dev_info(&pdev->dev, "Invalid configuration, using defaults\n");
|
|
+ ts->prop.max_x = 4095;
|
|
+ ts->prop.max_y = 4095;
|
|
+ }
|
|
+
|
|
+ input_set_abs_params(ts->input, ABS_X, 0, ts->prop.max_x, 0, 0);
|
|
+ input_set_abs_params(ts->input, ABS_Y, 0, ts->prop.max_y, 0, 0);
|
|
input_set_drvdata(ts->input, ts);
|
|
}
|
|
|
|
--
|
|
Armbian
|
|
|