Port to Banana PI M4 Board
Closed this issue · 1 comments
Hi Kent,
We are looking for a Golang package to access GPIO on our Banana PI M4 board. Your project seems promising but realize that this is for Raspberry PI board. If we want to use your project for our Banana PI board, what changes do we have to make and where the changes have to be made. Or if you are able to make the changes to it so as to enable support for Banana PI M4 that would be excellent.
Thank you for your help.
David.
The bad news is porting this library to Banana Pi makes no sense to me at all, as the core of the library is specific to the Raspberry Pi. Further, the library depends on one kernel interface that is RPi specific and another that is deprecated.
The good news is that my gpiod library (github.com/warthog618/gpiod) supports the latest Linux kernel GPIO interface and probably supports the Banana Pi already. A pinctrl driver for your board seems to be available (https://github.com/BPI-SINOVOIP/BPI-M4-bsp/tree/master/linux-rtk/drivers/pinctrl/realtek/), so all you need is to build a kernel image that supports the GPIO character device, if you don't have one already, and you should be good to go.
Cheers,
Kent.