i2c: core: improve return value handling of i2c_new_device and i2c_new_dummy
Currently i2c_new_device and i2c_new_dummy return just NULL in error
case although they have more error details internally. Therefore move
the functionality into new functions returning detailed errors and
add wrappers for compatibility with the current API.
This allows to use these functions with detailed error codes within
the i2c core or for API extensions.
Signed-off-by: Heiner Kallweit <firstname.lastname@example.org>
[wsa: rename new functions and fix minor kdoc issues]
Signed-off-by: Wolfram Sang <email@example.com>
Reviewed-by: Peter Rosin <firstname.lastname@example.org>
Reviewed-by: Kieran Bingham <email@example.com>
Reviewed-by: Bartosz Golaszewski <firstname.lastname@example.org>
Signed-off-by: Wolfram Sang <email@example.com>
1 file changed