zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
10.61k stars 6.5k forks source link

Unable to find detailed documentation on pinmux driver development #34262

Closed Berte-Yu closed 3 years ago

Berte-Yu commented 3 years ago

I‘m porting zephyr to a new soc(cortex-m3),

When developing the pinmux driver, the detailed documentation cannot be found..

mnkp commented 3 years ago

The existing pinmux driver is going to be deprecated. I think the best option for now when adding a new SoC to Zephyr is to keep pinmux driver private to the soc. I.e. place it in soc/<arch>/<family>/ and do not provide the public pinmux driver. You can take Atmel SAM family as an example. The pinmux driver is located in soc/arm/atmel_sam/common/soc_gpio.c. It's used by all Atmel SAM drivers but there is no Atmel SAM pinmux driver in drirvers/pinmux/.

Berte-Yu commented 3 years ago

Thanks, I have ported the pinmax driver。