Skip to content
Snippets Groups Projects
Verified Commit e48b7f07 authored by Barnabás Czémán's avatar Barnabás Czémán Committed by Alexey Minnekhanov
Browse files

motorola-{ali,ocean,potter}: remove individual device pacakges (MR 6041)

Remove individual device packages, these devices are supported by
the generic device package.
parent 255cd5b6
No related branches found
No related tags found
No related merge requests found
Showing
with 0 additions and 5736 deletions
# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-motorola-ali
pkgdesc="Motorola Moto G6"
pkgver=3
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
options="!check !archcheck"
depends="
firmware-motorola-ali
firmware-qcom-adreno-a530
linux-postmarketos-qcom-msm8953
lk2nd-msm8953
mkbootimg
msm-firmware-loader
postmarketos-base
"
makedepends="devicepkg-dev"
source="deviceinfo modules-initfs"
build() {
devicepkg_build $startdir $pkgname
}
package() {
devicepkg_package $startdir $pkgname
}
sha512sums="
705416801d6633e09aa79438175065aff5c50277c9359cdd1d9399ad80eb9b46f3c98e78d60098c4788212188be2b22072cfd5e703da988d6686d8c96f51eb78 deviceinfo
097ac4b7c82a984d3e71309b015ba161ab5d851cc3a7bac11afced39d762112d1ad1df64a26c9128a4d3f8338ecbd75820170f873ac28a4684c2d6b83562a8a7 modules-initfs
"
# Reference: <https://postmarketos.org/deviceinfo>
# Please use double quotes only. You can source this file in shell scripts.
deviceinfo_format_version="0"
deviceinfo_name="Motorola Moto G6"
deviceinfo_manufacturer="Motorola"
deviceinfo_codename="motorola-ali"
deviceinfo_year="2018"
deviceinfo_arch="aarch64"
deviceinfo_dtb="qcom/sdm450-motorola-ali"
deviceinfo_append_dtb="true"
# Device related
deviceinfo_gpu_accelerated="true"
deviceinfo_chassis="handset"
deviceinfo_keyboard="false"
deviceinfo_external_storage="false"
deviceinfo_screen_width="1080"
deviceinfo_screen_height="2160"
# Bootloader related
deviceinfo_flash_method="fastboot"
deviceinfo_generate_bootimg="true"
deviceinfo_bootimg_qcdt="false"
deviceinfo_bootimg_dtb_second="false"
deviceinfo_flash_offset_base="0x80000000"
deviceinfo_flash_offset_kernel="0x00008000"
deviceinfo_flash_offset_ramdisk="0x01000000"
deviceinfo_flash_offset_second="0x00f00000"
deviceinfo_flash_offset_tags="0x00000100"
deviceinfo_flash_pagesize="2048"
# lk2nd does not support GPT for subpartitions/SD cards yet
deviceinfo_partition_type="msdos"
edt_ft5x06
msm
panel-motorola-ali-boe
panel-motorola-ali-tianma
# Maintainer: Ultracoolguy <ultracoolguy@disroot.org>
# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-motorola-ocean
pkgdesc="Motorola Moto G7 Power"
pkgver=2
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
options="!check !archcheck"
depends="
firmware-motorola-ocean
firmware-qcom-adreno-a530
linux-postmarketos-qcom-msm8953
lk2nd-msm8953
mkbootimg
msm-firmware-loader
postmarketos-base
soc-qcom-msm8916
"
makedepends="devicepkg-dev"
source="deviceinfo modules-initfs"
build() {
devicepkg_build $startdir $pkgname
}
package() {
devicepkg_package $startdir $pkgname
}
sha512sums="
9dfe084b5394dc7bf1617f0396c5d853965a3bddaba438644d29e5fbbe95d6b704b98b89a0d7f233f6b677bb3e68b016eb55732ed9e22e56f93a32586f306663 deviceinfo
f627d473ccfc01f39ed7b1345c2795af0cd358b4738d202e53fbae07c605d239f9139b034c5a29411bafe368b92a44c756e2bd029246b385d6397f519af8ff7c modules-initfs
"
# Reference: <https://postmarketos.org/deviceinfo>
# Please use double quotes only. You can source this file in shell scripts.
deviceinfo_format_version="0"
deviceinfo_name="Motorola Moto G7 Power"
deviceinfo_manufacturer="Motorola"
deviceinfo_codename="motorola-ocean"
deviceinfo_year="2019"
deviceinfo_arch="aarch64"
deviceinfo_dtb="qcom/sdm632-motorola-ocean"
deviceinfo_append_dtb="true"
# Device related
deviceinfo_gpu_accelerated="true"
deviceinfo_chassis="handset"
deviceinfo_keyboard="false"
deviceinfo_external_storage="true"
deviceinfo_screen_width="720"
deviceinfo_screen_height="1520"
# Bootloader related
deviceinfo_flash_method="fastboot"
deviceinfo_kernel_cmdline="console=ttyMSM0,115200"
deviceinfo_generate_bootimg="true"
deviceinfo_generate_extlinux_config="true"
deviceinfo_bootimg_qcdt="false"
deviceinfo_bootimg_dtb_second="false"
deviceinfo_flash_offset_base="0x80000000"
deviceinfo_flash_offset_kernel="0x00008000"
deviceinfo_flash_offset_ramdisk="0x01000000"
deviceinfo_flash_offset_second="0x00f00000"
deviceinfo_flash_offset_tags="0x00000100"
deviceinfo_flash_pagesize="2048"
# lk2nd does not support GPT for subpartitions/SD cards yet
deviceinfo_partition_type="msdos"
msm
# Maintainer: Sireesh Kodali <scarface@disroot.org>
# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-motorola-potter
pkgdesc="Motorola Moto G5 Plus"
pkgver=3
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
options="!check !archcheck"
depends="
firmware-qcom-adreno-a530
firmware-motorola-potter
linux-postmarketos-qcom-msm8953
lk2nd-msm8953
mkbootimg
msm-firmware-loader
postmarketos-base
soc-qcom-msm8953
soc-qcom-msm8953-modem
tqftpserv
"
makedepends="devicepkg-dev"
subpackages="$pkgname-openrc"
source="deviceinfo modules-initfs"
build() {
devicepkg_build $startdir $pkgname
}
package() {
devicepkg_package $startdir $pkgname
}
openrc() {
depends="tqftpserv-openrc"
install_if="$pkgname=$pkgver-r$pkgrel openrc"
mkdir "$subpkgdir"
}
sha512sums="
c8c4c5ec686dfab80cc077632ed8e125c31fffe23a34536991acba40f1ce1083da451ea9c988309f63b0f488e0b4745e6815cb7b14ea4d2f0fbd61decc4e4f39 deviceinfo
93c77bfcde005c021ac9b671f9671923339f855e45d4fce8b2caea4748eccc08c8ec65bdfc85fef4900c974860613e8d62e6fe0ea95741ec1ab08c814148472b modules-initfs
"
# Reference: <https://postmarketos.org/deviceinfo>
# Please use double quotes only. You can source this file in shell scripts.
deviceinfo_format_version="0"
deviceinfo_name="Motorola Moto G5 Plus"
deviceinfo_manufacturer="Motorola"
deviceinfo_codename="motorola-potter"
deviceinfo_year="2017"
deviceinfo_dtb="qcom/msm8953-motorola-potter"
deviceinfo_append_dtb="true"
deviceinfo_arch="aarch64"
# Device related
deviceinfo_gpu_accelerated="true"
deviceinfo_chassis="handset"
deviceinfo_keyboard="false"
deviceinfo_external_storage="true"
deviceinfo_screen_width="1080"
deviceinfo_screen_height="1920"
deviceinfo_getty="ttyMSM0;115200"
# Bootloader related
deviceinfo_flash_method="fastboot"
deviceinfo_kernel_cmdline="earlycon console=ttyMSM0,115200"
deviceinfo_generate_bootimg="true"
deviceinfo_generate_extlinux_config="true"
deviceinfo_flash_offset_base="0x80000000"
deviceinfo_flash_offset_kernel="0x00008000"
deviceinfo_flash_offset_ramdisk="0x01000000"
deviceinfo_flash_offset_second="0x00f00000"
deviceinfo_flash_offset_tags="0x00000100"
deviceinfo_flash_pagesize="2048"
deviceinfo_flash_sparse="true"
# lk2nd does not support GPT for subpartitions/SD cards yet
deviceinfo_partition_type="msdos"
msm
panel_boe_bs052fhm_a00_6c01
panel_tianma_tl052vdxp02
rmi_core
rmi_i2c
pkgname=firmware-motorola-ali
pkgver=1
pkgrel=2
pkgdesc="Firmware for Motorola Moto G6"
url="https://github.com/julianbraha/firmware-motorola-ali"
arch="aarch64"
license="proprietary"
_repository="firmware-blobs"
_commit="153ba76124497fb7ce22d87a90149a15bcf67942"
source="$pkgname-$_commit.tar.gz::https://github.com/moto-g6-mainlining/firmware-blobs/archive/$_commit.tar.gz"
options="!strip !check !archcheck !spdx !tracedeps"
builddir="$srcdir/$_repository-$_commit"
_fwdir="/lib/firmware"
package() {
# GPU Firmware files
install -Dm644 a506_zap.b02 -t "$pkgdir/$_fwdir/qcom/msm8953/motorola/ali"
install -Dm644 a506_zap.mdt -t "$pkgdir/$_fwdir/qcom/msm8953/motorola/ali"
# WLAN Firmware
install -Dm644 wlan/prima/WCNSS_qcom_wlan_nv.bin -t "$pkgdir/$_fwdir/postmarketos/wlan/prima"
}
sha512sums="
269ac182806e9128557ac614142bfd6a2feab2cc3d2555268064df7ad1880de0d5e85b781a34ca57693d9c32ffe7d31da7fd34f9fd6364bc2b7cc2fdb90edc80 firmware-motorola-ali-153ba76124497fb7ce22d87a90149a15bcf67942.tar.gz
"
pkgname=firmware-motorola-ocean
pkgver=5
pkgrel=0
pkgdesc="Firmware for Motorola Moto G7 Power"
url="https://gitlab.com/Ultra-azu/firmware-motorola-ocean"
arch="aarch64"
license="proprietary"
options="!check !strip !archcheck !tracedeps pmb:cross-native"
_commit="787dcae00d0866079c6f55dc3ddf6592279b0661"
source="
https://gitlab.com/Ultra-azu/firmware-motorola-ocean/-/archive/$_commit/firmware-motorola-ocean-$_commit.tar.gz
moto-modem-rfs-setup.initd
$pkgname-openrc.post-install
"
subpackages="$pkgname-openrc"
builddir="$srcdir/$pkgname-$_commit/lib/firmware/postmarketos"
_fwdir="/lib/firmware"
package() {
install -Dm755 $srcdir/moto-modem-rfs-setup.initd "$pkgdir"/etc/init.d/moto-modem-rfs-setup
install -Dm644 a506_zap.b02 -t "$pkgdir/$_fwdir/qcom/msm8953/motorola/ocean"
install -Dm644 a506_zap.mdt -t "$pkgdir/$_fwdir/qcom/msm8953/motorola/ocean"
install -Dm644 wlan/prima/WCNSS_qcom_cfg.ini -t "$pkgdir/$_fwdir/postmarketos/wlan/prima"
install -Dm644 wlan/prima/WCNSS_qcom_wlan_nv.bin -t "$pkgdir/$_fwdir/postmarketos/wlan/prima"
}
openrc() {
install="$subpkgname.post-install"
default_openrc
}
sha512sums="
fd0888bb6a0beeca961d9aabd0e60be64dfd841c3c89c7cdb8e7c1284347c4f56b2bad6a73aebc81e86625a4b548b5d2417ca31de6803ea5b3b58c7c1d97be51 firmware-motorola-ocean-787dcae00d0866079c6f55dc3ddf6592279b0661.tar.gz
d4fd0f3406c9f004e9cae7bc500c5713aab75f102f8e3ea1af820865f01eb03def01cd9ed3e8a184c7dfc22ab419628fad17957a3782885d96eb36e94461e842 moto-modem-rfs-setup.initd
784ac120a2231cfbee153fb8b2634af4ab5091eaa8fe207e66b47641d7531591ee3849e610bb66c7177822c86556f78d51c17ba8e4f3da2f946c4b8c5eaaf310 firmware-motorola-ocean-openrc.post-install
"
#!/bin/sh
rc-update add moto-modem-rfs-setup boot
#!/sbin/openrc-run
description="Setup modem firmware for tqftpserv"
depend() {
before tqftpserv
}
start()
{
MODEM_FIRMWARE_DIR="/lib/firmware/postmarketos/persist"
# The firmware present here is unique to each device
# Using the firmware of one device on another can will simply fail
# This is needed because motorola devices derive IMEI and other unique
# IDs from these files
# See also: https://forum.xda-developers.com/g5-plus/how-to/fix-persist-resolve-imei0-explanation-t3825147
if [ ! -d $MODEM_FIRMWARE_DIR ]; then
# Make a copy of the firmware if its not already made
# Use the copy instead of the original, because if due to some error
# somehow the firmware gets corrupted, the original firmware will
# still be available on the 'persist' partition
PERSIST_PATH="/tmp/persist"
PERSIST_DEV="/dev/disk/by-partlabel/persist"
mkdir -p $PERSIST_PATH
mount $PERSIST_DEV -o ro,noatime $PERSIST_PATH
mkdir $MODEM_FIRMWARE_DIR
cp -R "$PERSIST_PATH"/rfs/msm/mpss/ "$MODEM_FIRMWARE_DIR"/readwrite
umount $PERSIST_DEV
rmdir $PERSIST_PATH
fi
ln -s "$MODEM_FIRMWARE_DIR"/readwrite/ /tmp/tqftpserv
}
# Maintainer: Sireesh Kodali <scarface@disroot.org>
pkgname=firmware-motorola-potter
pkgver=2
pkgrel=3
pkgdesc="Firmware for Motorola Moto G5 Plus"
url="https://github.com/scarface-one/firmware-motorola-potter"
arch="aarch64"
license="proprietary"
options="!check !strip !archcheck !tracedeps"
_commit="cce83e64585c036facd4cef39f47bc23d18ba2e9"
builddir="$srcdir/$pkgname-$_commit/lib/firmware/postmarketos"
subpackages="$pkgname-openrc"
_fwdir="/lib/firmware"
source="
$pkgname-$_commit.tar.gz::$url/archive/$_commit.tar.gz
moto-modem-rfs-setup.openrc
"
package() {
# GPU Firmware files
install -Dm644 a506_zap.b02 -t "$pkgdir/$_fwdir/qcom/msm8953/motorola/potter"
install -Dm644 a506_zap.mdt -t "$pkgdir/$_fwdir/qcom/msm8953/motorola/potter"
# WLAN Firmware
install -Dm644 wlan/prima/WCNSS_qcom_wlan_nv.bin -t "$pkgdir/$_fwdir/postmarketos/wlan/prima"
}
openrc() {
install_if="$pkgname=$pkgver-r$pkgrel openrc"
install="$subpkgname.post-install $subpkgname.post-upgrade"
install -Dm755 $srcdir/moto-modem-rfs-setup.openrc "$subpkgdir"/etc/init.d/moto-modem-rfs-setup
}
sha512sums="
5a35ff1b567b672585f761eddbc772163f52b312c1e94410eff4b1d333852857a2f87769a45f47f7bcff373bdd5b062c3d16110e0211d85f83a7b4c6c78f6d3c firmware-motorola-potter-cce83e64585c036facd4cef39f47bc23d18ba2e9.tar.gz
d4fd0f3406c9f004e9cae7bc500c5713aab75f102f8e3ea1af820865f01eb03def01cd9ed3e8a184c7dfc22ab419628fad17957a3782885d96eb36e94461e842 moto-modem-rfs-setup.openrc
"
#!/bin/sh
rc-update add moto-modem-rfs-setup boot
./firmware-motorola-potter-openrc.post-install
\ No newline at end of file
#!/sbin/openrc-run
description="Setup modem firmware for tqftpserv"
depend() {
before tqftpserv
}
start()
{
MODEM_FIRMWARE_DIR="/lib/firmware/postmarketos/persist"
# The firmware present here is unique to each device
# Using the firmware of one device on another can will simply fail
# This is needed because motorola devices derive IMEI and other unique
# IDs from these files
# See also: https://forum.xda-developers.com/g5-plus/how-to/fix-persist-resolve-imei0-explanation-t3825147
if [ ! -d $MODEM_FIRMWARE_DIR ]; then
# Make a copy of the firmware if its not already made
# Use the copy instead of the original, because if due to some error
# somehow the firmware gets corrupted, the original firmware will
# still be available on the 'persist' partition
PERSIST_PATH="/tmp/persist"
PERSIST_DEV="/dev/disk/by-partlabel/persist"
mkdir -p $PERSIST_PATH
mount $PERSIST_DEV -o ro,noatime $PERSIST_PATH
mkdir $MODEM_FIRMWARE_DIR
cp -R "$PERSIST_PATH"/rfs/msm/mpss/ "$MODEM_FIRMWARE_DIR"/readwrite
umount $PERSIST_DEV
rmdir $PERSIST_PATH
fi
ln -s "$MODEM_FIRMWARE_DIR"/readwrite/ /tmp/tqftpserv
}
diff --git a/drivers/input/misc/vl53L0/inc/stmvl53l0-cci.h b/drivers/input/misc/vl53L0/inc/stmvl53l0-cci.h
new file mode 100644
index 0000000..d8c3b77
--- /dev/null
+++ b/drivers/input/misc/vl53L0/inc/stmvl53l0-cci.h
@@ -0,0 +1,65 @@
+/*
+ * stmvl53l0-cci.h - Linux kernel modules for STM VL53L0 FlightSense TOF sensor
+ *
+ * Copyright (C) 2015 STMicroelectronics Imaging Division
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * Defines
+ */
+#ifndef STMVL53L0_CCI_H
+#define STMVL53L0_CCI_H
+#include <linux/types.h>
+
+#include <soc/qcom/camera2.h>
+#include "msm_camera_i2c.h"
+#include "msm_camera_dt_util.h"
+#include "msm_camera_io_util.h"
+#include "msm_cci.h"
+
+#define MSM_TOF_MAX_VREGS (10)
+
+struct msm_tof_vreg {
+ struct camera_vreg_t *cam_vreg;
+ void *data[MSM_TOF_MAX_VREGS];
+ int num_vreg;
+};
+
+struct cci_data {
+ struct msm_camera_i2c_client g_client;
+ struct msm_camera_i2c_client *client;
+ struct platform_device *pdev;
+ enum msm_camera_device_type_t device_type;
+ enum cci_i2c_master_t cci_master;
+ struct msm_tof_vreg vreg_cfg;
+ struct msm_sd_subdev msm_sd;
+ struct v4l2_subdev sdev;
+ struct v4l2_subdev_ops *subdev_ops;
+ char subdev_initialized;
+ uint32_t subdev_id;
+ uint8_t power_up;
+ uint32_t lowv;
+ uint32_t highv;
+ uint32_t xtalk;
+ struct msm_camera_gpio_conf gconf;
+ struct msm_pinctrl_info pinctrl_info;
+};
+int stmvl53l0_init_cci(void);
+void stmvl53l0_exit_cci(void *);
+int stmvl53l0_power_down_cci(void *);
+int stmvl53l0_power_up_cci(void *, unsigned int *);
+
+#endif /* STMVL53L0_CCI_H */
diff --git a/drivers/input/misc/vl53L0/inc/stmvl53l0-i2c.h b/drivers/input/misc/vl53L0/inc/stmvl53l0-i2c.h
new file mode 100644
index 0000000..a75a9e5
--- /dev/null
+++ b/drivers/input/misc/vl53L0/inc/stmvl53l0-i2c.h
@@ -0,0 +1,47 @@
+/*
+ * stmvl53l0-i2c.h - Linux kernel modules for STM VL53L0 FlightSense TOF sensor
+ *
+ * Copyright (C) 2015 STMicroelectronics Imaging Division
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * Defines
+ */
+#ifndef STMVL53L0_I2C_H
+#define STMVL53L0_I2C_H
+#include <linux/types.h>
+#include <soc/qcom/camera2.h>
+#include "msm_camera_i2c.h"
+#include "msm_camera_dt_util.h"
+#include "msm_camera_io_util.h"
+#include "msm_cci.h"
+
+struct i2c_data {
+ struct i2c_client *client;
+ struct regulator *vana;
+ uint8_t power_up;
+ uint32_t lowv;
+ uint32_t highv;
+ uint32_t xtalk;
+ struct msm_camera_gpio_conf gconf;
+ struct msm_pinctrl_info pinctrl_info;
+};
+int stmvl53l0_init_i2c(void);
+void stmvl53l0_exit_i2c(void *);
+int stmvl53l0_power_up_i2c(void *, unsigned int *);
+int stmvl53l0_power_down_i2c(void *);
+
+#endif /* STMVL53L0_I2C_H */
diff --git a/drivers/input/misc/vl53L0/inc/stmvl53l0.h b/drivers/input/misc/vl53L0/inc/stmvl53l0.h
new file mode 100644
index 0000000..4ae84c9
--- /dev/null
+++ b/drivers/input/misc/vl53L0/inc/stmvl53l0.h
@@ -0,0 +1,201 @@
+/*
+ * stmvl53l0.h - Linux kernel modules for STM VL53L0 FlightSense TOF sensor
+ *
+ * Copyright (C) 2015 STMicroelectronics Imaging Division
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*
+ * Defines
+ */
+#ifndef STMVL53L0_H
+#define STMVL53L0_H
+
+#include <linux/types.h>
+#include <linux/mutex.h>
+#include <linux/workqueue.h>
+#include <linux/miscdevice.h>
+
+#define STMVL53L0_DRV_NAME "stmvl53l0"
+#define STMVL53L0_SLAVE_ADDR (0x52>>1)
+
+#define DRIVER_VERSION "1.1.18"
+#define DRIVER_VERSION_NUM 18
+#define I2C_M_WR 0x00
+/* #define INT_POLLING_DELAY 20 */
+
+/* if don't want to have output from vl6180_dbgmsg, comment out #DEBUG macro */
+/*#define DEBUG*/
+/* #define vl6180_dbgmsg(str, args...) pr_debug("%s: " str, __func__, ##args) */
+#define vl53l0_dbgmsg_en(str, args...) \
+ pr_debug("%s: " str, __func__, ##args)
+
+#define vl53l0_dbgmsg(str, args...) \
+ pr_debug("%s: " str, __func__, ##args)
+/* #define vl6180_errmsg(str, args...) pr_err("%s: " str, __func__, ##args) */
+#define vl53l0_errmsg(str, args...) \
+ printk(KERN_ERR "%s: " str, __func__, ##args)
+
+#define VL53L0_VDD_MIN 2850000
+#define VL53L0_VDD_MAX 2850000
+/*driver working mode*/
+#define OFF_MODE 0
+#define CAM_MODE 1
+#define SAR_MODE 2
+#define SUPER_MODE 3
+#define XTALKCAL_MODE 4
+#define OFFSETCAL_MODE 5
+
+/*user actions*/
+#define CAM_ON 0
+#define CAM_OFF 1
+#define SAR_ON 2
+#define SAR_OFF 3
+#define XTALKCAL_ON 4
+#define OFFSETCAL_ON 5
+#define CAL_OFF 6
+#define RESET 7
+/*parameter types*/
+#define OFFSET_PAR 0
+#define XTALKRATE_PAR 1
+#define XTALKENABLE_PAR 2
+#define SIGMAVAL_PRA 3
+#define SIGMACTL_PRA 4
+#define WRAPAROUNDCTL_PRA 5
+#define INTERMEASUREMENTPERIOD_PAR 6
+#define MEASUREMENTTIMINGBUDGET_PAR 7
+#define SGLVAL_PRA 8
+#define SGLCTL_PRA 9
+#define CUTV_PRA 10
+#define DRVV_PRA 11
+#define PLLPRE_PRA 12
+#define PLLFINAL_PRA 13
+#define CCI_BUS 0
+#define I2C_BUS 1
+
+
+/*
+ * IOCTL register data structs
+ */
+struct stmvl53l0_register {
+ uint32_t is_read; /*1: read 0: #define write*/
+ uint32_t reg_index;
+ uint32_t reg_bytes;
+ uint32_t reg_data;
+ int32_t status;
+};
+
+/*
+ * IOCTL parameter structs
+ */
+struct stmvl53l0_parameter {
+ uint32_t is_read; /*1: Get 0: Set*/
+ uint32_t name;
+ int32_t value;
+ int32_t status;
+};
+
+/*
+ * driver data structs
+ */
+struct stmvl53l0_data {
+ /* embed ST VL53L0 Dev data as "dev_data" */
+ VL53L0_DevData_t Data;
+ /* i2c device address user specific field */
+ uint8_t I2cDevAddr;
+ uint8_t comms_type;
+ uint16_t comms_speed_khz;
+
+ struct cci_data cci_client_object;
+ struct i2c_data i2c_client_object;
+ void *client_object;
+ struct mutex update_lock;
+ struct delayed_work dwork; /* for PS work handler */
+ struct delayed_work initwork;
+ struct delayed_work resetwork;
+ struct delayed_work checkwork;
+ struct input_dev *input_dev_ps;
+ struct kobject *range_kobj;
+
+ const char *dev_name;
+
+ /* misc device */
+ struct miscdevice miscdev;
+
+ int irq;
+ unsigned int reset;
+
+ /* control flag from HAL */
+ unsigned int enable_ps_sensor;
+
+ /* PS parameters */
+ unsigned int ps_is_singleshot;
+ unsigned int ps_is_started;
+ unsigned int ps_data; /* to store PS data */
+
+ /* Range Data */
+ VL53L0_RangingMeasurementData_t rangeData;
+ int offset;
+ int xtalk;
+
+ /* delay time in miniseconds*/
+ unsigned int delay_ms;
+
+ struct mutex work_mutex;
+ /* Debug */
+ unsigned int enableDebug;
+ uint8_t interrupt_received;
+ int d_mode;
+ uint8_t w_mode;
+ /*for SAR mode indicate low range interrupt*/
+ uint8_t lowint;
+ uint8_t bus_type;
+ uint32_t lowv;
+ uint32_t highv;
+ wait_queue_head_t range_data_wait;
+ uint8_t d_ready;
+ uint8_t cut_v;
+ unsigned int xtalkCalDistance;
+ unsigned int offsetCalDistance;
+ unsigned int xtalkcalval;
+ VL53L0_GpioFunctionality gpio_function;
+ uint8_t c_suspend;
+ uint8_t c_stopped;
+ uint32_t refSpadCount;
+ uint8_t isApertureSpads;
+ uint8_t VhvSettings;
+ uint8_t PhaseCal;
+ uint8_t pll_p;
+ uint8_t pll_f;
+};
+
+/*
+ * funtion pointer structs
+ */
+struct stmvl53l0_module_fn_t {
+ int (*init)(void);
+ void (*deinit)(void *);
+ int (*power_up)(void *, unsigned int *);
+ int (*power_down)(void *);
+};
+
+struct stmvl53l0_data *stmvl53l0_getobject(void);
+int stmvl53l0_setup(struct stmvl53l0_data *data, uint8_t type);
+int stmvl53l0_checkmoduleid(struct stmvl53l0_data *data,
+ void *client, uint8_t type);
+int stmvl53l0_livechecking(struct stmvl53l0_data *data);
+void i2c_setclient(void *client, uint8_t type);
+
+#endif /* STMVL53L0_H */
# Maintainer: Uclydde <julianbraha@gmail.com>
# Reference: <https://postmarketos.org/vendorkernel>
pkgname=linux-motorola-ali
pkgver=3.18.140
pkgrel=4
pkgdesc="Motorola Moto G6 kernel fork"
arch="armv7"
_carch="arm"
_flavor="motorola-ali"
url="https://kernel.org"
license="GPL-2.0-only"
options="!strip !check !tracedeps pmb:cross-native"
makedepends="perl sed installkernel bash gmp-dev bc linux-headers elfutils-dev devicepkg-dev openssl-dev"
# Source
_repository="kernel-msm"
_commit="974646412f6e865f6847a7c6b72528f3a14bdb56"
_config="config-$_flavor.$arch"
source="
$pkgname-$_commit.tar.gz::https://github.com/Uclydde/$_repository/archive/$_commit.tar.gz
$_config
04_fix_stmvl53l0_headers.patch
fix_focaltech_recursive_dependency.patch
fix_mdp_ctrl_off.patch
fix_fb.patch
fix_fb_h.patch
fix_mdss_overlay.patch
gcc10-extern_YYLOC_global_declaration.patch
"
builddir="$srcdir/$_repository-$_commit"
_outdir="out"
prepare() {
default_prepare
REPLACE_GCCH=0
. downstreamkernel_prepare
}
build() {
unset LDFLAGS
make O="$_outdir" ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
}
package() {
downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor" "$_outdir"
}
sha512sums="9ce6156aa8fd62ba1dff15413b526a870f45368d72774690f43229de82935acc52fcc58467e9bb72cca889ce03f6978ef1be454fd671c0fe845341c09d51d648 linux-motorola-ali-974646412f6e865f6847a7c6b72528f3a14bdb56.tar.gz
af7ebc73c1d99a2fc6b47f6a9710f5016f59c997841148b99f19159b9f7628947176dca37c60a4d13df9329241cefad0dcec88f5620b66bb55bc2e496975012b config-motorola-ali.armv7
1a128e1483459144726458175314c58528e6b1f1a85e5f4230fa0461b0c3dd650037567f672c220a95618f9df023a82a35f010e8e8b784e349806516c1daaf7e 04_fix_stmvl53l0_headers.patch
e2cf5b20831c05881780b7db1f40135ca7c8e0d2a4f7a8afa4eee16c7eae1711f2f02f72266309d52cb4437e9580ed58472e768c266f1283994ab1098861e9fc fix_focaltech_recursive_dependency.patch
3ccfaf591befba3b67d24134a516352173767cac0479d3011f077866e02a792f3581e50d05110375a8f84876213823d37d3791c4cb82f19f212bc4bee57934c8 fix_mdp_ctrl_off.patch
cb7edd7bf9642400276ccb1ddf38cc4ed6fd934c0f0fbc43839903dfd9a3d433121d7624f53be309a10e1703024079d25b369016ccadc870dfd31d988dc22b77 fix_fb.patch
3532faa75cbdbe034082420491abbf61c4a0a744b5d5c676ee9e1de971655dfac77129932baf78ad45ff0f01c3fa139253d1a3ff8461671536a9aebc5d16586a fix_fb_h.patch
eb183307dd0b79407c0b6c92cdc9898d2834a8309938e1af14708e94a375c1c68b5f63c0096bae7e29f28d9191dd73c33d0bbf0686fb722daa37bcabc92dea3f fix_mdss_overlay.patch
2b48f1bf0e3f70703d2cdafc47d5e615cc7c56c70bec56b2e3297d3fa4a7a1321d649a8679614553dde8fe52ff1051dae38d5990e3744c9ca986d92187dcdbeb gcc10-extern_YYLOC_global_declaration.patch"
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment