Hello @zblocker
Linux is constantly improving the kernel versions. Kernel versions that are bigger as 6.1 don't support anymore the GPIO toggling via file access. Since together with new Raspberry pi OS (bookworm) they deploy the kernel version 6.6 this can lead to errors while executing the PN7150/PN7160 examples.
User can see the errors in log connected to i2c_read and i2c_write failures. The reason for this is that GPIO access in /system/class/gpio/ don't exist anymore and this due to that system is not toggling VEN, DWNL_REQ, IRQ pins. Since those pins are important for communication and resetting the device we can't work without them.
In the attached zip you can find the changes we did to address this issue. We change the file GPIO access with gpiod.h library that is becoming the standard for GPIO handling in Linux (https://libgpiod.readthedocs.io/en/latest/index.html).
User need to do following things to make this code working:
Follow steps in PN7160 Linux porting guide to download the code
Apply 64-bit patch in case 64-bit OS is used
Replace the Makefile.am with the one in zip
Replace NfccAltTransport.h and NfccAltTransport.cc in src/nfcandroid_nfc_hidlimpl/halimpl/tml/transport with the two files in the attached zip
Run following two commands
sudo apt-get install gpiod
sudo apt-get install libgpiod-dev
Follow the installation guide to build the example
Run the examples
Be aware that this code is just a test code and it was not scanned with Black Duck scan so can't be shared outside NXP, but you can use it to guide the customer to solve the problem. We are already working with R&D to release this to GitHub. This zip shall not be used in release, since we didn't do any verification/validation. The only test we did is basic sanity check to see if functionality is working.