diff --git a/README.md b/README.md index 83d4505..41219a0 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # axpd +AXP288 I2C Daemon, temporary workaround, for the absence of working axp288 driver for Bay Trail tablets in mainline kernel. + diff --git a/axpd-20170203git-Chuwi-i2c-dev-14.patch b/axpd-20170203git-Chuwi-i2c-dev-14.patch new file mode 100644 index 0000000..5e5c342 --- /dev/null +++ b/axpd-20170203git-Chuwi-i2c-dev-14.patch @@ -0,0 +1,11 @@ +--- axpd-20170203git/axpd.sh.orig 2017-02-03 15:46:45.819648051 +0100 ++++ axpd-20170203git/axpd.sh 2017-02-03 15:46:52.909631894 +0100 +@@ -8,7 +8,7 @@ + rmmod -f battery + modprobe i2c-dev + modprobe test_power +-for i in 4 12 ++for i in 4 12 14 + do + if find /sys | grep axp288_charger | grep -q i2c-$i/ + then diff --git a/axpd.spec b/axpd.spec new file mode 100644 index 0000000..12d5fb2 --- /dev/null +++ b/axpd.spec @@ -0,0 +1,60 @@ +Name: axpd +Version: 20170203git +Release: 1mamba +Summary: AXP288 I2C Daemon for Bay Trail tablets in mainline kernel +Group: System/Kernel and Hardware +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: https://github.com/Icenowy/axpd +## GITSOURCE https://github.com/Icenowy/axpd.git master +Source: https://github.com/Icenowy/axpd.git/master/axpd-%{version}.tar.bz2 +Patch0: axpd-20170203git-Chuwi-i2c-dev-14.patch +License: GPL +## AUTOBUILDREQ-BEGIN +## AUTOBUILDREQ-END +Requires: i2c-tools +Requires: bc +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%description +AXP288 I2C Daemon, temporary workaround, for the absence of working axp288 driver for Bay Trail tablets in mainline kernel. + +%debug_package + +%prep +%setup -q +%patch0 -p1 + +%build + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +install -D -m0644 axpd.service %{buildroot}%{_unitdir}/axpd.service +install -D -m0755 axpd.sh %{buildroot}%{_prefix}/libexec/axpd.sh + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%post +%systemd_post axpd +systemctl -q daemon-reload +: + +%preun +%systemd_preun axpd +: + +%postun +%systemd_postun axpd +: + +%files +%defattr(-,root,root) +%{_prefix}/libexec/axpd.sh +%{_unitdir}/axpd.service +%doc LICENSE + +%changelog +* Fri Feb 03 2017 Silvan Calarco 20170203git-1mamba +- package created using the webbuild interface