Re: RFC: Change returning type from Pinmux APIs

Kalowsky, Daniel <daniel.kalowsky@...>

Short version +1

-----Original Message-----
From: Andre Guedes [mailto:andre.guedes(a)]
Sent: Tuesday, March 15, 2016 2:58 PM
To: devel(a)
Subject: [devel] RFC: Change returning type from Pinmux APIs

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.
Another case of history and not properly updating the API after it has changed. Nice find.

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.




Join to automatically receive all group messages.