diff options
author | Alisher Alikhodjaev <alisher@google.com> | 2021-03-04 11:37:25 -0800 |
---|---|---|
committer | Alisher Alikhodjaev <alisher@google.com> | 2021-03-04 11:37:25 -0800 |
commit | 992a91de71f29b480cfdcbe2f4986f18e56ffbc0 (patch) | |
tree | 603b8fb84819de8ab6fe6e96bc2502bebb188d38 | |
parent | 0ba27cc9f8a6b2e6ecba2e9c5fb4cf57c46d8b0a (diff) | |
download | nfc-992a91de71f29b480cfdcbe2f4986f18e56ffbc0.tar.gz |
nfc: add configuration for out of tree build
The nfc and ese drivers are built as modules
fixes for st21nfc.c are required to build it on LLVM
Bug: 168350321
Signed-off-by: Alisher Alikhodjaev <alisher@google.com>
Change-Id: Ifa88b8e243de20c6afda8a1350a4c79c417df4cf
-rw-r--r-- | Kconfig | 28 | ||||
-rw-r--r-- | Makefile | 18 | ||||
-rw-r--r-- | st21nfc.c | 4 |
3 files changed, 48 insertions, 2 deletions
@@ -0,0 +1,28 @@ +# SPDX-License-Identifier: GPL-2.0-only +# +# Near Field Communication (NFC) devices +# + +config NFC_ST21NFC + tristate "ST Microelectronics ST21NFC NFC Controller Driver" + depends on I2C + help + ST Microelectronics ST21NFC Near Field Communication controller support. + +config NFC_ST21NFC_NO_CRYSTAL + bool "ST Microelectronics ST21NFC NFC Controller Driver, no external crystal" + depends on NFC_ST21NFC + help + ST Microelectronics ST21NFC Near Field Communication controller support. + +config ESE_ST54 + tristate "ST Microelectronics ST54 family ESE driver" + depends on SPI + help + ST Microelectronics ST54 ESE Near Field Communication controller support. + +config ESE_ST33 + tristate "ST Microelectronics ST33 ESE driver" + depends on SPI + help + ST Microelectronics ST33 ESE Near Field Communication controller support. diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..8ffee38 --- /dev/null +++ b/Makefile @@ -0,0 +1,18 @@ +# SPDX-License-Identifier: GPL-2.0 +# +# Makefile for nfc devices +# + +obj-$(CONFIG_NFC_ST21NFC) += st21nfc.o +obj-$(CONFIG_ESE_ST54) += ese/ + +KERNEL_SRC ?= /lib/modules/$(shell uname -r)/build +M ?= $(shell pwd) + +KBUILD_OPTIONS += CONFIG_NFC_ST21NFC=m CONFIG_NFC_ST21NFC_NO_CRYSTAL=y \ + CONFIG_ESE_ST54=m CONFIG_ESE_ST33=m + +ccflags-y := -I$(KERNEL_SRC)/../google-modules/nfc + +modules modules_install clean: + $(MAKE) -C $(KERNEL_SRC) M=$(M) $(KBUILD_OPTIONS) W=1 $(@) @@ -359,7 +359,7 @@ static void st21nfc_power_stats_idle_signal(struct st21nfc_device *st21nfc_dev) } } -void st21nfc_pstate_wq(struct work_struct *work) +static void st21nfc_pstate_wq(struct work_struct *work) { struct st21nfc_device *st21nfc_dev = container_of(work, struct st21nfc_device, @@ -395,7 +395,7 @@ static void st21nfc_power_stats_filter( if (count != HEADER_LENGTH) { dev_err(&st21nfc_dev->client->dev, - "%s Warning: expect previous one was idle data\n"); + "Warning: expect previous one was idle data\n"); st21nfc_dev->pw_states_err.header_payload++; return; } |