diff --git a/chipone_ts-20170125git-hi10-iic_retry.patch b/chipone_ts-20170125git-hi10-iic_retry.patch deleted file mode 100644 index b842534..0000000 --- a/chipone_ts-20170125git-hi10-iic_retry.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Nru chuwi-dev-20170125git.orig/drivers/chipone_ts/chipone.h chuwi-dev-20170125git/drivers/chipone_ts/chipone.h ---- chuwi-dev-20170125git.orig/drivers/chipone_ts/chipone.h 2017-01-25 11:41:59.000000000 +0100 -+++ chuwi-dev-20170125git/drivers/chipone_ts/chipone.h 2017-02-24 16:41:38.283840348 +0100 -@@ -1,7 +1,7 @@ - #ifndef CHIPONE_H - #define CHIPONE_H - --#define CHIPONE_IIC_RETRY_NUM 3 -+#define CHIPONE_IIC_RETRY_NUM 30 - #define CHIPONE_DRIVER_NAME "chipone_ts" - #define CHIPONE_NAME "CHPN0001" - diff --git a/chipone_ts-20171121git-hi10.patch b/chipone_ts-20171121git-hi10.patch new file mode 100644 index 0000000..ac38e27 --- /dev/null +++ b/chipone_ts-20171121git-hi10.patch @@ -0,0 +1,25 @@ +diff -ru /usr/src/chipone_ts-20171121git/chipone.h chipone_ts-20171121git.buono/chipone.h +--- /usr/src/chipone_ts-20171121git/chipone.h 2017-11-21 23:01:46.000000000 +0100 ++++ chipone_ts-20171121git.buono/chipone.h 2017-11-21 23:33:04.610598932 +0100 +@@ -1,7 +1,7 @@ + #ifndef CHIPONE_H + #define CHIPONE_H + +-#define CHIPONE_IIC_RETRY_NUM 3 ++#define CHIPONE_IIC_RETRY_NUM 50 + #define CHIPONE_DRIVER_NAME "chipone_ts" + #define CHIPONE_NAME "CHPN0001" + +@@ -15,9 +15,9 @@ + #define CHIPONE_IRQ 0xB8 + #define CHIPONE_XORG_HACK 1 + #elif defined(CONFIG_HI10) +- #define SCREEN_MAX_X 1200 +- #define SCREEN_MAX_Y 1900 +- #define CHIPONE_IRQ 0xB9 // HACK: Hardcode IRQ, kernel doesn't get it at boot time ++ #define SCREEN_MAX_X 1920 ++ #define SCREEN_MAX_Y 1200 ++ #define CHIPONE_IRQ 0xBB // HACK: Hardcode IRQ, kernel doesn't get it at boot time + #else //CONFIG_VI10U + #define SCREEN_MAX_X 1366 + #define SCREEN_MAX_Y 768 diff --git a/chipone_ts-caliration.conf b/chipone_ts-caliration.conf new file mode 100644 index 0000000..cc8d733 --- /dev/null +++ b/chipone_ts-caliration.conf @@ -0,0 +1,5 @@ +Section "InputClass" + Identifier "calibration" + MatchProduct "CHPN0001:00" + Option "Calibration" "1930 75 1200 0" +EndSection diff --git a/chipone_ts.spec b/chipone_ts.spec index 22b3abf..6c33ef7 100644 --- a/chipone_ts.spec +++ b/chipone_ts.spec @@ -1,6 +1,6 @@ Name: chipone_ts -Version: 20170125git -Release: 4mamba +Version: 20171121git +Release: 1mamba Summary: Touchsreen kernel driver for Chuwi tablets Group: System/Kernel and Hardware Vendor: openmamba @@ -8,8 +8,10 @@ Distribution: openmamba Packager: Silvan Calarco URL: https://github.com/Dax89/chuwi-dev ## GITSOURCE https://github.com/Dax89/chuwi-dev.git master -Source: https://github.com/Dax89/chuwi-dev.git/master/chuwi-dev-%{version}.tar.bz2 -Patch0: chipone_ts-20170125git-hi10-iic_retry.patch +Source: https://github.com/JohnMH/chipone_ts.git/master/chipone_ts-%{version}.tar.bz2 +#Source: https://github.com/Dax89/chuwi-dev.git/master/chuwi-dev-%{version}.tar.bz2 +Source1: chipone_ts-caliration.conf +Patch0: chipone_ts-20171121git-hi10.patch License: GPL ## AUTOBUILDREQ-BEGIN ## AUTOBUILDREQ-END @@ -20,7 +22,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-root Touchsreen kernel driver for Chuwi tablets. %prep -%setup -q -n chuwi-dev-%{version} +%setup -q %patch0 -p1 %build @@ -29,7 +31,9 @@ Touchsreen kernel driver for Chuwi tablets. [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" install -d -m0755 %{buildroot}%{_prefix}/src/%{name}-%{version} -cp -a drivers/chipone_ts/* %{buildroot}%{_prefix}/src/%{name}-%{version}/ +cp -a * %{buildroot}%{_prefix}/src/%{name}-%{version}/ + +rm -rf %{buildroot}%{_prefix}/src/%{name}-%{version}/orig_firmware cat > %{buildroot}%{_prefix}/src/%{name}-%{version}/dkms.conf << _EOF PACKAGE_NAME=%{name} @@ -43,12 +47,14 @@ REMAKE_INITRD=no AUTOINSTALL=yes _EOF +install -D -m0755 %{SOURCE1} %{buildroot}%{_sysconfdir}/X11/xorg.conf.d/99-chipone_ts-calibration.conf + %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %preun # erase -if [ $1 -eq 0 ]; then +if [ $1 -ne 1 ]; then dkms remove -q -m %{name} -v %{version} --all fi : @@ -63,9 +69,13 @@ fi %files %defattr(-,root,root) %dir %{_prefix}/src/%{name}-%{version} +%{_sysconfdir}/X11/xorg.conf.d/99-chipone_ts-calibration.conf %{_prefix}/src/%{name}-%{version}/* %changelog +* Tue Nov 21 2017 Silvan Calarco 20171121git-1mamba +- update to 20171121git + * Tue Feb 28 2017 Silvan Calarco 20170125git-4mamba - require dkms in post