Created
March 15, 2018 05:45
-
-
Save ephemient/97c3859fa237a84d83900409671274f9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pkgbase = eve-v-drivers-dkms | |
pkgdesc = Patched drivers for Eve V | |
pkgver = 4.15.9 | |
pkgrel = 1 | |
url = https://www.kernel.org/ | |
arch = x86_64 | |
license = GPL2 | |
depends = dkms | |
source = https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.15.tar.xz | |
source = https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.15.tar.sign | |
source = https://www.kernel.org/pub/linux/kernel/v4.x/patch-4.15.9.xz | |
source = https://www.kernel.org/pub/linux/kernel/v4.x/patch-4.15.9.sign | |
source = cm32181.patch | |
source = Makefile | |
source = dkms.conf | |
validpgpkeys = ABAF11C65A2970B130ABE3C479BE3E4300411886 | |
validpgpkeys = 647F28654894E3BD457199BE38DBBDC86092693E | |
sha256sums = 5a26478906d5005f4f809402e981518d2b8844949199f60c4b6e1f986ca2a769 | |
sha256sums = SKIP | |
sha256sums = b5dc7021bd0c08e4a58b59035f9b757ce6909b46067950ac56d2ad68c1b69dd1 | |
sha256sums = SKIP | |
sha256sums = 2cca3174f11e12d5d5becd16c346c1d0c98d9e89264e52fda15ccadb5521bf41 | |
sha256sums = 39d7b30315ddb4ddf95a5e0bf051766b44323535b79c8507f7e150cb7bdbc200 | |
sha256sums = 4e3f04d8c3ba06fe9ba2318af5c5665e8c54e8313f4bca44d1bbe0d440dd9a4f | |
pkgname = eve-v-drivers-dkms | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/drivers/iio/light/cm32181.c b/drivers/iio/light/cm32181.c | |
index aebf7dd071af..1a4e2f894e2c 100644 | |
--- a/drivers/iio/light/cm32181.c | |
+++ b/drivers/iio/light/cm32181.c | |
@@ -7,6 +7,7 @@ | |
* by the Free Software Foundation. | |
*/ | |
+#include <linux/acpi.h> | |
#include <linux/delay.h> | |
#include <linux/err.h> | |
#include <linux/i2c.h> | |
@@ -354,10 +355,21 @@ static const struct of_device_id cm32181_of_match[] = { | |
}; | |
MODULE_DEVICE_TABLE(of, cm32181_of_match); | |
+#ifdef CONFIG_ACPI | |
+static const struct acpi_device_id cm32181_acpi_match[] = { | |
+ {"CPLM3218", 0}, | |
+ {}, | |
+}; | |
+MODULE_DEVICE_TABLE(acpi, cm32181_acpi_match); | |
+#endif | |
+ | |
static struct i2c_driver cm32181_driver = { | |
.driver = { | |
.name = "cm32181", | |
.of_match_table = of_match_ptr(cm32181_of_match), | |
+#ifdef CONFIG_ACPI | |
+ .acpi_match_table = ACPI_PTR(cm32181_acpi_match), | |
+#endif | |
}, | |
.id_table = cm32181_id, | |
.probe = cm32181_probe, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PACKAGE_NAME="@_PKGBASE@" | |
PACKAGE_VERSION="@PKGVER@" | |
AUTOINSTALL="yes" | |
BUILT_MODULE_NAME[0]="cm32181" | |
MAKE[0]="make KDIR=/usr/lib/modules/$kernelver/build" | |
DEST_MODULE_LOCATION[0]="/updates/drivers/iio/light" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
obj-m := cm32181.o | |
KVERSION := $(KERNELRELEASE) | |
ifeq ($(origin KERNELRELEASE), undefined) | |
KVERSION := $(shell uname -r) | |
endif | |
KDIR := /lib/modules/$(KVERSION)/build | |
PWD := $(shell pwd) | |
all: | |
$(MAKE) -C $(KDIR) M=$(PWD) modules | |
clean: | |
$(MAKE) -C $(KDIR) M=$(PWD) clean | |
install: | |
$(MAKE) -C $(KDIR) M=$(PWD) modules_install | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_pkgbase=eve-v-drivers | |
pkgname=(${_pkgbase}-dkms) | |
_srcname=linux-4.15 | |
pkgver=4.15.9 | |
pkgrel=1 | |
pkgdesc="Patched drivers for Eve V" | |
arch=('x86_64') | |
url="https://www.kernel.org/" | |
license=('GPL2') | |
groups=('') | |
depends=('dkms') | |
optdepends=() | |
source=("https://www.kernel.org/pub/linux/kernel/v4.x/${_srcname}.tar.xz" | |
"https://www.kernel.org/pub/linux/kernel/v4.x/${_srcname}.tar.sign" | |
"https://www.kernel.org/pub/linux/kernel/v4.x/patch-${pkgver}.xz" | |
"https://www.kernel.org/pub/linux/kernel/v4.x/patch-${pkgver}.sign" | |
'cm32181.patch' | |
'Makefile' | |
'dkms.conf') | |
sha256sums=('5a26478906d5005f4f809402e981518d2b8844949199f60c4b6e1f986ca2a769' | |
'SKIP' | |
'f3070554bd5f1640085cc35ae2f4bc23a94f9cf47b562140e5c2ec9a16d6b52e' | |
'SKIP' | |
'2cca3174f11e12d5d5becd16c346c1d0c98d9e89264e52fda15ccadb5521bf41' | |
'39d7b30315ddb4ddf95a5e0bf051766b44323535b79c8507f7e150cb7bdbc200' | |
'4e3f04d8c3ba06fe9ba2318af5c5665e8c54e8313f4bca44d1bbe0d440dd9a4f') | |
validpgpkeys=('ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds | |
'647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman | |
) | |
prepare() { | |
cd "${srcdir}/${_srcname}" | |
patch -Np1 -i "${srcdir}/patch-${pkgver}" | |
patch -Np1 -i "${srcdir}/cm32181.patch" | |
} | |
package() { | |
cd "${srcdir}" | |
install -dm755 "${pkgdir}"/usr/src/${_pkgbase}-${pkgver} | |
install -Dm644 -t "${pkgdir}/usr/src/${_pkgbase}-${pkgver}" \ | |
"${_srcname}/drivers/iio/light/cm32181.c" \ | |
Makefile dkms.conf | |
sed -e "s/@_PKGBASE@/${_pkgbase}/" \ | |
-e "s/@PKGVER@/${pkgver}/" \ | |
-i "${pkgdir}"/usr/src/${_pkgbase}-${pkgver}/dkms.conf | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment