diff --git a/device/community/device-wileyfox-crackling/10-crackling-proximity.rules b/device/community/device-wileyfox-crackling/10-crackling-proximity.rules new file mode 100644 index 000000000..e116a3399 --- /dev/null +++ b/device/community/device-wileyfox-crackling/10-crackling-proximity.rules @@ -0,0 +1,11 @@ +# iio-sensor-proxy +# Set PROXIMITY_NEAR_LEVEL for iio-sensor-proxy to pick up the proximity sensor + +# This is a temporary workaround until the next kernel release where the value +# is provided via DT. +# See https://lore.kernel.org/linux-iio/20211125125646.54831-1-nikita@trvn.ru/ +# for related kernel changes. + +# Set the sensor type for all the types we recognise +ACTION=="add", SUBSYSTEM=="iio", TEST=="in_proximity_raw", ENV{PROXIMITY_NEAR_LEVEL}="75" + diff --git a/device/community/device-wileyfox-crackling/APKBUILD b/device/community/device-wileyfox-crackling/APKBUILD index 57805607a..04908407a 100644 --- a/device/community/device-wileyfox-crackling/APKBUILD +++ b/device/community/device-wileyfox-crackling/APKBUILD @@ -3,7 +3,7 @@ # Co-Maintainer: Minecrell pkgname=device-wileyfox-crackling pkgdesc="Wileyfox Swift" -pkgver=6 +pkgver=7 pkgrel=0 url="https://postmarketos.org" license="MIT" @@ -12,7 +12,10 @@ options="!check !archcheck" depends="postmarketos-base mkbootimg linux-postmarketos-qcom-msm8916 soc-qcom-msm8916 soc-qcom-msm8916-rproc" makedepends="devicepkg-dev" -source="deviceinfo" +source=" + deviceinfo + 10-crackling-proximity.rules + " subpackages=" $pkgname-nonfree-firmware:nonfree_firmware " @@ -28,6 +31,9 @@ build() { package() { devicepkg_package $startdir $pkgname + + install -D -m644 "$srcdir"/10-crackling-proximity.rules \ + "$pkgdir"/usr/lib/udev/rules.d/10-crackling-proximity.rules } nonfree_firmware() { @@ -39,4 +45,5 @@ nonfree_firmware() { sha512sums=" e30325a138f70c3e3aa5e9ebceec6f032f2641c06c00ce5b55b9e3024b7c2d8dc35e75d0dc77d24c61810bcf864e34004d96a22a69808949f01db513fa85d776 deviceinfo +a845e860cf43e58818bbffda62a9514e9a24527e14c485dd10944587b29dbf5864a1d3ec17d219c342512fac4bd6c25f5f0f4efb8883b8f383a79846759318ee 10-crackling-proximity.rules "