RFC: Change returning type from Pinmux APIs


Andre Guedes <andre.guedes@...>
 

Hi all,

While I was working on the errno transition patchset, I realized all driver
APIs (i2c, spi, gpio, etc.) return 'int' type, but pinmux APIs. For the sake
of consistency, I think we should change the returning type from 'uint32_t'
to 'int' in include/pinmux.h APIs.

Besides keeping consistency between all drivers APIs, this change would also
be aligned with the errno.h code transition we're discussing in the other
thread. Pinmux drivers will return negative errno.h codes in case of error
so returning 'int' is more suitable than 'uint32_t'.

I sent a patch [1] as draft so you can have a idea of the changes required
(basically, API and drivers).

This change conflicts with the pinmux patchset from Vinicius. We talked
offline and we are both fine to whatever patch gets merged first.

Regards,

Andre

[1] https://gerrit.zephyrproject.org/r/#/c/881/

Join devel@lists.zephyrproject.org to automatically receive all group messages.