Initial commit: Linux kernel 4.19 for Unplugged OS

This commit is contained in:
ziv committed 2025-10-06 13:52:42 +00:00
commit d30235b04c
80519 files changed
+35800681

No files matched your search

+29
View File
@@ -0,0 +1,29 @@
config NFC_CHIP_SUPPORT
tristate "NFC driver solution - NFC Controller Driver"
depends on I2C
select NFC_ST54_SPI
help
STMicroelectronics ST21NFC Near Field Communication controller
support. ST21NFC is standalone NFC and ST54 is combined with secure
element. If configures to be y, means devices supports NFC
functionality. If configures to be n, means devices doesn't support
NFC functionality.
config NFC_ST54_SPI
tristate "NFC driver solution - SPI Controller Driver"
depends on SPI && NFC_CHIP_SUPPORT
help
STMicroelectronics ST54 Secure Element controller SPI interface
support. ST21NFC is standalone NFC and ST54 is combined with
secure element. If configures to be y, means devices supports SPI
interface to ST54. If configures to be n, means devices doesn't
support SPI interface (eSE still usable).
config MTK_NFC_CLKBUF_ENABLE
bool "Enable clock buffer for NFC"
help
Enable clock buffer from PMIC for NFC.
This configuration need to be set if support NFC functionality
whether STMicroelectronics solution or not.
If NFC solution is not STMicroelectronics,
this configuration SHOULD be set.
+15
View File
@@ -0,0 +1,15 @@
#
# Copyright (C) 2015 MediaTek Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# 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.
#
obj-$(CONFIG_NFC_CHIP_SUPPORT) += st21nfc/
obj-$(CONFIG_NFC_ST54_SPI) += st54spi.o
@@ -0,0 +1,7 @@
#
# Makefile for ST21NFC
#
ccflags-y += -I$(srctree)/drivers/misc/mediatek/include/mt-plat
obj-y +=st21nfc.o
ccflags-$(CONFIG_NFC_DEBUG) := -DDEBUG
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,61 @@
/*
* Copyright (C) 2016 ST Microelectronics S.A.
* Copyright (C) 2010 Stollmann E+V GmbH
* Copyright (C) 2010 Trusted Logic S.A.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* 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, see <http://www.gnu.org/licenses/>.
*/
#define ST21NFC_MAGIC 0xEA
#define ST21NFC_NAME "st21nfc"
/*
* ST21NFC power control via ioctl
* ST21NFC_GET_WAKEUP : poll gpio-level for Wakeup pin
* PN544_SET_PWR(1): power on
* PN544_SET_PWR(>1): power on with firmware download enabled
*/
#define ST21NFC_GET_WAKEUP _IO(ST21NFC_MAGIC, 0x01)
#define ST21NFC_PULSE_RESET _IO(ST21NFC_MAGIC, 0x02)
#define ST21NFC_SET_POLARITY_RISING _IO(ST21NFC_MAGIC, 0x03)
#define ST21NFC_SET_POLARITY_FALLING _IO(ST21NFC_MAGIC, 0x04)
#define ST21NFC_SET_POLARITY_HIGH _IO(ST21NFC_MAGIC, 0x05)
#define ST21NFC_SET_POLARITY_LOW _IO(ST21NFC_MAGIC, 0x06)
#define ST21NFC_GET_POLARITY _IO(ST21NFC_MAGIC, 0x07)
#define ST21NFC_RECOVERY _IO(ST21NFC_MAGIC, 0x08)
#define ST21NFC_USE_ESE _IOW(ST21NFC_MAGIC, 0x09, unsigned int)
// Keep compatibility with older user applications.
#define ST21NFC_LEGACY_GET_WAKEUP _IOR(ST21NFC_MAGIC, 0x01, unsigned int)
#define ST21NFC_LEGACY_PULSE_RESET _IOR(ST21NFC_MAGIC, 0x02, unsigned int)
#define ST21NFC_LEGACY_SET_POLARITY_RISING _IOR(ST21NFC_MAGIC, 0x03, \
unsigned int)
#define ST21NFC_LEGACY_SET_POLARITY_FALLING _IOR(ST21NFC_MAGIC, 0x04, \
unsigned int)
#define ST21NFC_LEGACY_SET_POLARITY_HIGH _IOR(ST21NFC_MAGIC, 0x05, unsigned int)
#define ST21NFC_LEGACY_SET_POLARITY_LOW _IOR(ST21NFC_MAGIC, 0x06, unsigned int)
#define ST21NFC_LEGACY_GET_POLARITY _IOR(ST21NFC_MAGIC, 0x07, unsigned int)
#define ST21NFC_LEGACY_RECOVERY _IOR(ST21NFC_MAGIC, 0x08, unsigned int)
struct st21nfc_platform_data {
unsigned int irq_gpio;
unsigned int ena_gpio;
unsigned int reset_gpio;
unsigned int polarity_mode;
};
#define ST54SPI_CB_RESET_END 0
#define ST54SPI_CB_RESET_START 1
#define ST54SPI_CB_ESE_NOT_USED 2
#define ST54SPI_CB_ESE_USED 3
void st21nfc_register_st54spi_cb(void (*cb)(int, void *), void *data);
void st21nfc_unregister_st54spi_cb(void);
File diff suppressed because it is too large. Load diff