pine64-pinephone: add sensorfw configs (MR 2518)

sensorfw is used by Waydroid (via waydroid-sensord) and the Glacier UI
for rotation and other sensors
This commit is contained in:
Bart Ribbers 2021-09-14 10:51:10 +02:00 committed by Clayton Craft
parent 8a8512ee95
commit f366f7cfb3
No known key found for this signature in database
GPG key ID: 4A4CED6D7EDF950A
3 changed files with 58 additions and 7 deletions

View file

@ -6,7 +6,7 @@
# Co-Maintainer: Dylan Van Assche <me@dylanvanassche.be>
pkgname=device-pine64-pinephone
pkgver=0.36
pkgrel=1
pkgrel=2
pkgdesc="PINE64 PinePhone"
url="https://postmarketos.org"
license="MIT"
@ -19,6 +19,7 @@ subpackages="
$pkgname-plasma-mobile:plasma_mobile
$pkgname-upower
$pkgname-vccq-mod:vccq_mod
$pkgname-sensorfw
"
depends="
alsa-ucm-conf>=1.2.6.2
@ -43,21 +44,23 @@ source="
60-flashlight.rules
70-wifi-pm.rules
90-modem-eg25.rules
UPower.conf
deviceinfo
gpsd_device-hook.sh
gpsd_pinephone.initd
hwtest.ini
kirigami-lowpower.sh
modemmanager.conf
pinephone-vccq-mod.dts
pulse-pinephone.conf
sensorfw/90-pinephone.conf
sensorfw/primaryuse.conf
setup-modem.sh
uboot-script.cmd
uboot-user.cmd
ucm/HiFi.conf
ucm/PinePhone.conf
ucm/VoiceCall.conf
UPower.conf
pinephone-vccq-mod.dts
pulse-pinephone.conf
"
# workaround to purge the -elogind subpackage that was previously
# created/installed
@ -187,6 +190,15 @@ vccq_mod() {
install -Dm644 "$srcdir"/pinephone-vccq-mod.dtbo \
"$subpkgdir"/boot/pinephone-vccq-mod.dtbo
}
sensorfw() {
install_if="$pkgname=$pkgver-r$pkgrel sensorfw"
install -Dm644 -t "$subpkgdir"/etc/sensorfw \
"$srcdir"/primaryuse.conf
install -Dm644 -t "$subpkgdir"/etc/sensorfw/sensord.conf.d \
"$srcdir"/90-pinephone.conf
}
sha512sums="
5736444fd38ab4351d148ae96c479085f469bd1e51a692fb1827f8ac921a584389f7696985e1fba21c2deac88709910531f4ece282f45ff54e590c2b54b84ba3 00_alsa_pinephone_dshare.conf
b53cc6f2531854cc9c1e4c334185a20551d64c8675ee8a8eaa03b99d80808fad421a0f6e99e5be212a974d88c85f461a71ba59ac59c29f298c82f211e3be1ef4 10-pinephone-proximity.rules
@ -194,19 +206,21 @@ bac664c504d9a3adc6e3d25f24ac63cf7c449a82374544a5b56c259dc25af580897b9dc992865ac8
9170da7ac869254644f2fc8d914102f2c16e917dbeb53e33b96c76936711d0540f55fa5c2526d73d5fe244500bc2728bc9d629e2524cf52c573d11e833aee666 60-flashlight.rules
8b6fa7b12c15f439c561901f3ffe24a1ef2a0c343401c0a79281060854ab29e08a1fb5e7adae8684b12aa9f535ed99e2dad993dce9724822cb0fbf2497dd86e5 70-wifi-pm.rules
7dc2b7c20b4a2b15f597a6417bd01797643dad84a3683b0dee648e030fb6326e9d020307643fdcdf1bb43fc44af9975697e417003bd359610bae2d8ce614fc00 90-modem-eg25.rules
ed0e03f7e1c0348c06be9a7922414469245604ce813bbf0c8910ef211cb993bbb0d0d4615c9c961d50712415f85d6b73e0cf02780ac784666aac56e4889341e4 UPower.conf
24f7167d47664d9b9a85d044a731f5ef90e73f2d0f92b8164d19d79b090192cac902d38b3604c1f99d24e1fb1b91bd15c4340dad5cb37cfcc9f037871ad2d501 deviceinfo
ccbc83b84b5028bc2c8e526759004ce71b50b2675ecffee98f5676c70a3332197a231ff9d2fd46444dd3c0a637ec08ce6125b18240fe6bfc13f624a15192e648 gpsd_device-hook.sh
1017fc3f325227da58c77abdc59e9735288d91a7ccc63ec784fe0241c523786b617a11ce8045dab2a74ca12a7dd70aaa334af91836418db1e96a3266fecaa4fd gpsd_pinephone.initd
3dd6d612c381cb0002049d1974d8fb5aa5a53a1eb4d6bcbf62eb2ad52cfdc45f0f6ad24a699716d3513b0371aa1316f25dc72afc10d7176cc3b99d0965c3f030 hwtest.ini
6bc22b369b2d9058b702ac7a7862abaefaf8179b43491868bdb008d181b59104f1ded89db1da51a810e1ccdc803a579b924a438674283a65afc3a9c4d2894caf kirigami-lowpower.sh
c5006c38828eb519917d57756f7831c4552feffef2d4922a384073f6a551535f615ad397d784e313818e0b943e1f6212bcca0aff9ce37da60b29547b1631f24b modemmanager.conf
d66ecef1fa5481ff138fe4e12b194903ceacab9d0649e716049f32e56ec6d9be09b97e2ff769ebc5c9fbced542986b9214f47ed14511ad761d80a41b19e02df7 pinephone-vccq-mod.dts
9c472065b19141dd4c7555869b955de2e679b36e597f9fa3bdac18d0e9460986b0e2fffe1e04751301305f1b6474c1375803afb7d6212eeae91b4905d0bf8ff8 pulse-pinephone.conf
967e3a43c7e91ed37fc932a7c580cd168ca11d8ec7f60ff60ece7f286e5144f27faead95162fa7d571a2317ed0da970fd86f5bc9ed0235a25c0be9182d42d64d 90-pinephone.conf
8e362f48fc5db58dc37d035f80f5ab0b09a20c82e6859e9662affdc192e2aa0bc7a259a9b0c63db330b3873d8b1f22af3f9193a0b7d79068354d1a788391376c primaryuse.conf
420ee1d7522d4d56c2909580fd6ba7580483ca5455b13eb6d22e700063ce0c1a5c6d2f5b161dfce0d777636fe9a712aa82f38a0585f2feabea3785b02bae7515 setup-modem.sh
c085a92af68fa3b1e1cd0c407a3782e66e7eeb3321a95ca3decedf46a68e012e272d1aac9aa690812529d6c35c558b198d94775fc6dfafc8b09eef0c56a50e28 uboot-script.cmd
f28902517bebe16f7ddbdbf9f4c52d5c97319e3b5ba7326ba96ed0e094d3d2a39c87061326893cdc34336bbfd56de084b2f217918ebba7ca6a080088cd0bd409 uboot-user.cmd
f963898fa2ce66bc830e56feeec6ffc9888834e14cc1591d72908ef45ad82532bc3ef5fb32413e07b6722749c9d03e7cf92f06f1fcb859c38b9297cf58e5cedd HiFi.conf
4b0c51ab169aebe8177c5c43eba41afa90370098a5a54e710d17e97ec1651869a20cb5d780a6132028c864916609e3b4f4a13158835310d0441bdb4915872372 PinePhone.conf
e093f71c37370927468de35a987150a3db3e1cc1c76c144bf58918a09c688c3da84303b5533241e691a6aa0758589e2a6498b1097974117782e909f0bbc6bf71 VoiceCall.conf
ed0e03f7e1c0348c06be9a7922414469245604ce813bbf0c8910ef211cb993bbb0d0d4615c9c961d50712415f85d6b73e0cf02780ac784666aac56e4889341e4 UPower.conf
d66ecef1fa5481ff138fe4e12b194903ceacab9d0649e716049f32e56ec6d9be09b97e2ff769ebc5c9fbced542986b9214f47ed14511ad761d80a41b19e02df7 pinephone-vccq-mod.dts
9c472065b19141dd4c7555869b955de2e679b36e597f9fa3bdac18d0e9460986b0e2fffe1e04751301305f1b6474c1375803afb7d6212eeae91b4905d0bf8ff8 pulse-pinephone.conf
"

View file

@ -0,0 +1,30 @@
[accelerometer]
input_match=mpu6050
intervals = "200=>2000"
default_interval=500
transformation_matrix = "0,1,0,-1,0,0,0,0,-1"
[als]
input_match=stk3310
intervals = "200=>2000"
default_interval=500
[gyroscope]
input_match=mpu6050
intervals = "200=>2000"
default_interval=500
transformation_matrix = "0,1,0,-1,0,0,0,0,-1"
[magnetometer]
input_match=lis3mdl
intervals = "200=>2000"
default_interval=500
[lis3mdl]
scale = 1.0
[proximity]
input_match=stk3310
intervals = "200=>2000"
default_interval=500
threshold=19

View file

@ -0,0 +1,7 @@
[plugins]
accelerometeradaptor = iiosensorsadaptor
orientationadaptor = iiosensorsadaptor
alsadaptor = iiosensorsadaptor
magnetometeradaptor = iiosensorsadaptor
gyroscopeadaptor = iiosensorsadaptor
proximityadaptor = iiosensorsadaptor