drivers/i2c/designware/dw_i2c: return enum cb_err from dw_i2c_init
Using enum cb_err as return type instead of int improves the readability of the code. Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: I55e6d93ca141b687871ceaa763bbbbe966c4b4a3 Reviewed-on: https://review.coreboot.org/c/coreboot/+/61511 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Raul Rangel <rrangel@chromium.org> Reviewed-by: Jason Glenesk <jason.glenesk@gmail.com>
This commit is contained in:
@@ -95,11 +95,8 @@ uintptr_t dw_i2c_base_address(unsigned int bus);
|
||||
|
||||
/*
|
||||
* Initialize this bus controller and set the speed
|
||||
* Return value:
|
||||
* -1 = failure
|
||||
* 0 = success
|
||||
*/
|
||||
int dw_i2c_init(unsigned int bus, const struct dw_i2c_bus_config *bcfg);
|
||||
enum cb_err dw_i2c_init(unsigned int bus, const struct dw_i2c_bus_config *bcfg);
|
||||
|
||||
/*
|
||||
* Generate speed config based on clock
|
||||
|
Reference in New Issue
Block a user