3

I need to install a driver on Ubuntu with this guide but i'm having some trouble with some parts of it.

Below is the definition to be added to the platform definition file:

I'm using Ubuntu 18.04 and dug around where the platform data file might be located and i saw /lib/modules/$(uname -r)/build/include/linux/platform_data/nxp-nci.h. Is this the correct platform definition file?

pn5xx_i2c.h must be included in the platform definition file

since there was a part of the instruction that says "pn5xx_i2c.h file must be copied to include/linux kernel source sub-folder", to do this part i just referenced pn5xx_i2c.h in the nxp-nci.h file by adding:

#include<linux/pn5xx_i2c.h>

Then the declared nfc_board_info structure must be added to the platform using dedicated procedure (platform specific).

From my understanding, I'd have to edit this part of the code:

static struct i2c_board_info __initdata nfc_board_info[] = {
{
I2C_BOARD_INFO("pn547", 0x28),
.platform_data = &nfc_pdata,
},
};

that I added to the nxp-nci.h file and change 0x28 to whatever my platform is.

Assuming I did this part correctly, there should be a /dev/pn544 device node created which i can check by running cd /dev/ and ls. However, there is no pn544 device listed in my /dev folder so there must have been something wrong in one of the processes.

I also tried using device tree as was suggested here but I did not find any .dts files from the /lib/modules/$(uname -r)/build/arch/arm/boot/dts folder. I was also told that it might not be applicable because my PC is not an ARM-based Linux device.

Did I miss a process or could it be an NFC compatibility issue with Ubuntu?

xjm
  • 105

0 Answers0