I am working on Intel Edison with Yocto and kernel 3.10 and I would like to use NFC component NXP pn7120. It needs one I2C and two GPIO.
I added the driver as a kernel module in upstream_to_edison.patch. I added the module in menuconfig but the driver does not seem to be compiled. So, I compiled the driver with a recipe and install .ipk on Intel Edison.
But the main problem is about dts. The component need 2 GPIO and I have to add it to DTS or platform data. NXP gives information about it on page 6 of the attached guide.
So, is driver compilation with upstream_to_edison.patch or with the recipe is the correct way to add a driver to Yocto?
What could I do to add GPIO definitions (like it is shown on page 6 of the attached PDF) to platform data? Or is it possible to modify the device tree?
The right way to compile a driver for Yocto would be to first create a recipe for the driver and then add the recipe to the patch where all the changes are added. To change the GPIO definitions I believe you need to modify both the DTS and Platform Data, however the examples in the guide you posted are for an ARM architecture, I'm not sure if it would change for an x86 architecture, so for this part your best option would be to contact the manufacturer to see if they can provide you a more accurate answer in that regard.
Thanks for your answer.
I made a recipe called "nxp-pn5xx." In which patch could I add the recipe to be visible in menuconfig?
I already used pn5xx with Linux for MIPS architecture, and I just modified DTS. I have to use one method or the other (DTS or platform data). The problem is I don't have a clue how to do it for Intel Edison with Yocto. Do you have any idea ?
The patch would be:
And the line you have to add would look like the following:
IMAGE_INSTALL += "your_package"
Yocto's documentation would be of much help on this regard since it contains detailed information on how to add/create packages to your image. I believe these documentation would help you a lot with your project, in case you are interested in reading it, I would suggest you to start with Yocto's Mega Manual (http://www.yoctoproject.org/docs/1.7.2/mega-manual/mega-manual.html http://www.yoctoproject.org/docs/1.7.2/mega-manual/mega-manual.html)