mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 23:24:38 +00:00
i2c: mxc_i2c: Use or operation
The operation should be OR, not BIT OR. Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Heiko Schocher <hs@denx.de> Cc: Stefano Babic <sbabic@denx.de>
This commit is contained in:
parent
34b0af8390
commit
fb0128736b
1 changed files with 3 additions and 3 deletions
|
@ -784,9 +784,9 @@ static int mxc_i2c_probe(struct udevice *bus)
|
||||||
ret2 = gpio_request_by_name_nodev(offset_to_ofnode(node),
|
ret2 = gpio_request_by_name_nodev(offset_to_ofnode(node),
|
||||||
"sda-gpios", 0, &i2c_bus->sda_gpio,
|
"sda-gpios", 0, &i2c_bus->sda_gpio,
|
||||||
GPIOD_IS_OUT);
|
GPIOD_IS_OUT);
|
||||||
if (!dm_gpio_is_valid(&i2c_bus->sda_gpio) |
|
if (!dm_gpio_is_valid(&i2c_bus->sda_gpio) ||
|
||||||
!dm_gpio_is_valid(&i2c_bus->scl_gpio) |
|
!dm_gpio_is_valid(&i2c_bus->scl_gpio) ||
|
||||||
ret | ret2) {
|
ret || ret2) {
|
||||||
dev_err(dev, "i2c bus %d at %lu, fail to request scl/sda gpio\n", bus->seq, i2c_bus->base);
|
dev_err(dev, "i2c bus %d at %lu, fail to request scl/sda gpio\n", bus->seq, i2c_bus->base);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue