From f05c398607d7c0b3b8bf7d8dbab792a27ad66fcb Mon Sep 17 00:00:00 2001 From: "anil.hiranniah" Date: Sat, 27 Mar 2021 10:33:22 +0530 Subject: Add Nfc hal support for SNXXX Move existing NFC hal to pn8x/ Add NFC hal for snxxx in snxxx/ Move existing extns/intf to intf/ Update Android.bp files to build hals for pn8x and snxxx BYPASS_INCLUSIVE_LANGUAGE_REASON=keep legacy configuration naming Bug: 188034640 Test: NFC On/Off, CTS, VTS, CE, Tag read Merged-In: Iec29b1eb038f6f524777fdf22a1a48180f0a8b00 Change-Id: Iec29b1eb038f6f524777fdf22a1a48180f0a8b00 --- intf/nxpnfc/1.0/Android.bp | 16 ++++++++++ intf/nxpnfc/1.0/INxpNfc.hal | 33 +++++++++++++++++++ intf/nxpnfc/1.0/manifest.xml | 14 ++++++++ intf/nxpnfc/1.0/types.hal | 20 ++++++++++++ intf/nxpnfc/2.0/Android.bp | 17 ++++++++++ intf/nxpnfc/2.0/INxpNfc.hal | 76 ++++++++++++++++++++++++++++++++++++++++++++ intf/nxpnfc/2.0/manifest.xml | 14 ++++++++ intf/nxpnfc/2.0/types.hal | 27 ++++++++++++++++ intf/nxpnfc/Android.bp | 3 ++ intf/nxpnfc/current.txt | 4 +++ 10 files changed, 224 insertions(+) create mode 100644 intf/nxpnfc/1.0/Android.bp create mode 100755 intf/nxpnfc/1.0/INxpNfc.hal create mode 100644 intf/nxpnfc/1.0/manifest.xml create mode 100644 intf/nxpnfc/1.0/types.hal create mode 100644 intf/nxpnfc/2.0/Android.bp create mode 100644 intf/nxpnfc/2.0/INxpNfc.hal create mode 100644 intf/nxpnfc/2.0/manifest.xml create mode 100644 intf/nxpnfc/2.0/types.hal create mode 100644 intf/nxpnfc/Android.bp create mode 100644 intf/nxpnfc/current.txt (limited to 'intf') diff --git a/intf/nxpnfc/1.0/Android.bp b/intf/nxpnfc/1.0/Android.bp new file mode 100644 index 0000000..29e30fa --- /dev/null +++ b/intf/nxpnfc/1.0/Android.bp @@ -0,0 +1,16 @@ +// This file is autogenerated by hidl-gen -Landroidbp. + +hidl_interface { + name: "vendor.nxp.nxpnfc@1.0", + root: "vendor.nxp.nxpnfc", + srcs: [ + "types.hal", + "INxpNfc.hal", + ], + interfaces: [ + "android.hidl.base@1.0", + ], + types: [ + ], + gen_java: true, +} diff --git a/intf/nxpnfc/1.0/INxpNfc.hal b/intf/nxpnfc/1.0/INxpNfc.hal new file mode 100755 index 0000000..d5f3569 --- /dev/null +++ b/intf/nxpnfc/1.0/INxpNfc.hal @@ -0,0 +1,33 @@ +/****************************************************************************** + * + * Copyright 2018 NXP + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ******************************************************************************/ +package vendor.nxp.nxpnfc@1.0; + +interface INxpNfc { + /* + * Performs an General Input Output operations. + * + * Based on the ioctlType, input data bytes are processed and + * Output data bytes are generated. + * @param ioctlType contains type of functionality as below + * HAL_NFC_IOCTL_SPI_DWP_SYNC to synchronize access to eSE + * HAL_NFC_INHIBIT_PWR_CNTRL to disable eSE power + * HAL_NFC_SET_SPM_PWR to toggle eSE power + * @return output data as stream of bytes + */ + ioctl(uint64_t ioctlType,NfcData inputData) generates(NfcData outputData); +}; diff --git a/intf/nxpnfc/1.0/manifest.xml b/intf/nxpnfc/1.0/manifest.xml new file mode 100644 index 0000000..ceabdbd --- /dev/null +++ b/intf/nxpnfc/1.0/manifest.xml @@ -0,0 +1,14 @@ + + + android.hardware.nfc + hwbinder + + 1.0 + + + vendor.nxp.nxpnfc + hwbinder + + 1.0 + + diff --git a/intf/nxpnfc/1.0/types.hal b/intf/nxpnfc/1.0/types.hal new file mode 100644 index 0000000..e89d3da --- /dev/null +++ b/intf/nxpnfc/1.0/types.hal @@ -0,0 +1,20 @@ +/****************************************************************************** + * + * Copyright 2018 NXP + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ******************************************************************************/ +package vendor.nxp.nxpnfc@1.0; + +typedef vec NfcData; diff --git a/intf/nxpnfc/2.0/Android.bp b/intf/nxpnfc/2.0/Android.bp new file mode 100644 index 0000000..3d20456 --- /dev/null +++ b/intf/nxpnfc/2.0/Android.bp @@ -0,0 +1,17 @@ +// This file is autogenerated by hidl-gen -Landroidbp. + +hidl_interface { + name: "vendor.nxp.nxpnfc@2.0", + root: "vendor.nxp.nxpnfc", + srcs: [ + "types.hal", + "INxpNfc.hal", + ], + interfaces: [ + "android.hidl.base@1.0", + ], + types: [ + ], + gen_java: true, +} + diff --git a/intf/nxpnfc/2.0/INxpNfc.hal b/intf/nxpnfc/2.0/INxpNfc.hal new file mode 100644 index 0000000..6191631 --- /dev/null +++ b/intf/nxpnfc/2.0/INxpNfc.hal @@ -0,0 +1,76 @@ +/****************************************************************************** + * + * Copyright 2020 NXP + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ******************************************************************************/ +package vendor.nxp.nxpnfc@2.0; + +interface INxpNfc { + /* + * Gets vendor params values whose Key has been provided. + * + * @param string + * @return output data as string + */ + getVendorParam(string key) generates (string value); + + /* + * Saves the vendor params provided as key-value pair + * + * @param string key string value + * @return status as a boolean, true if success, false if failed + */ + setVendorParam(string key, string value) generates (bool status); + + /* + * reset the ese based on resettype + * + * @param uint64_t to specify resetType + * @return status as a boolean, true if success, false if failed + */ + resetEse(uint64_t resetType) generates (bool status); + + /* + * updates ese with current state and notifies upper layer + * + * @param input current ese state to set + * @return status as a boolean, true if success, false if failed + */ + setEseUpdateState(NxpNfcHalEseState eSEState) generates (bool status); + + /* + * Sets Transit config value + * + * @param string transit config value + * @return status as a boolean, true if success, false if failed + */ + setNxpTransitConfig(string transitConfValue) generates (bool status); + + /* + * api to check jcop update is required or not + * + * @param none + * @return status as a boolean, true if JCOP update required, false if not required. + */ + isJcopUpdateRequired() generates (bool status); + + /* + * api to check LS update is required or not + * + * @param none + * @return status as a boolean, true if LS update required, false if not required. + */ + isLsUpdateRequired() generates (bool status); +}; diff --git a/intf/nxpnfc/2.0/manifest.xml b/intf/nxpnfc/2.0/manifest.xml new file mode 100644 index 0000000..1d11297 --- /dev/null +++ b/intf/nxpnfc/2.0/manifest.xml @@ -0,0 +1,14 @@ + + + android.hardware.nfc + hwbinder + + 1.0 + + + vendor.nxp.nxpnfc + hwbinder + + 2.0 + + diff --git a/intf/nxpnfc/2.0/types.hal b/intf/nxpnfc/2.0/types.hal new file mode 100644 index 0000000..070707e --- /dev/null +++ b/intf/nxpnfc/2.0/types.hal @@ -0,0 +1,27 @@ +/****************************************************************************** + * + * Copyright 2020 NXP + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ******************************************************************************/ +package vendor.nxp.nxpnfc@2.0; + +enum NxpNfcHalEseState : uint64_t { + HAL_NFC_ESE_UPDATE_COMPLETED = 0, + HAL_NFC_ESE_UPDATE_STARTED, + HAL_NFC_ESE_JCOP_UPDATE_REQUIRED, + HAL_NFC_ESE_JCOP_UPDATE_COMPLETED, + HAL_NFC_ESE_LS_UPDATE_REQUIRED, + HAL_NFC_ESE_LS_UPDATE_COMPLETED +}; diff --git a/intf/nxpnfc/Android.bp b/intf/nxpnfc/Android.bp new file mode 100644 index 0000000..65946cf --- /dev/null +++ b/intf/nxpnfc/Android.bp @@ -0,0 +1,3 @@ +hidl_package_root { + name: "vendor.nxp.nxpnfc", +} diff --git a/intf/nxpnfc/current.txt b/intf/nxpnfc/current.txt new file mode 100644 index 0000000..b622f1e --- /dev/null +++ b/intf/nxpnfc/current.txt @@ -0,0 +1,4 @@ +d2024b1ac380c4beb387466cc7646c09dcfae5e2900c5bebbff111912a5352de vendor.nxp.nxpnfc@1.0::types +ee94d45f490daf851d9a5ef6a5098bff4656694fa51cf9817fbddabc74702a46 vendor.nxp.nxpnfc@1.0::INxpNfc +bfa8ad7d3002a8d50529ca97882ef39ecb58630fffcb38dda0874bb9fd1cecd5 vendor.nxp.nxpnfc@2.0::types +e65f51748c114bd4dfe57dac4c2bd690000c770e76c52df76e234faec500a248 vendor.nxp.nxpnfc@2.0::INxpNfc -- cgit v1.2.3