
Hi,
since this commit:
commit f62ca2cd2ab8171f603960da9203ceb6ee8a1efd Author: Mario Six mario.six@gdsys.cc Date: Mon Jan 15 11:07:45 2018 +0100
gpio: pca953x_gpio: Make live-tree compatible
I am getting the error message "__of_translate_address: Bad cell count for pcal6524@1"
I don't think the patch
- addr = fdtdec_get_int(gd->fdt_blob, dev_of_offset(dev), "reg", 0); + addr = dev_read_addr(dev);
is correct since it replaces a simple lookup of the value "reg" property with an attempted translation to a CPU address (which fails for I2C)
This does not cause the driver probe to fail since dev_read_addr() returns FDT_ADDR_T_NONE (== -1) and is followed by
if (addr == 0) return -ENODEV;
info->addr = addr;
Although addr is stored in the driver data the only thing it is used for is to build the bank name
snprintf(name, sizeof(name), "gpio@%x_", info->addr);
I'm not even sure that using the value of the "reg" property as before is really a good idea - what happens if we have multiple chips with same address on seperate busses?
Maybe it would be better to use the DT node name? But would that break existing configurations by renaming the device?
Regards,
Martin