]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
dm: core: Add a flag to control sequence numbering
authorSimon Glass <sjg@chromium.org>
Sun, 25 Jan 2015 15:27:05 +0000 (08:27 -0700)
committerSimon Glass <sjg@chromium.org>
Fri, 30 Jan 2015 00:09:55 +0000 (17:09 -0700)
commit9cc36a2b89ebe5148d69d521745c1e1d26365c3a
treeb7c92e1a8f9f9a2a87c3fd12735ff5bc3d5a502d
parentb367053102e597eb21b0a5e86c63e8d10f368cb0
dm: core: Add a flag to control sequence numbering

At present we try to use the 'reg' property and device tree aliases to give
devices a sequence number. The 'reg' property is often actually a memory
address, so the sequence numbers thus-obtained are not useful. It would be
better if the devices were just sequentially numbered in that case. In fact
neither I2C nor SPI use this feature, so drop it.

Some devices need us to look up an alias to number them within the uclass.
Add a flag to control this, so it is not done unless it is needed.

Adjust the tests to test this new behaviour.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
doc/driver-model/README.txt
drivers/core/device.c
drivers/i2c/i2c-uclass.c
drivers/serial/serial-uclass.c
drivers/spi/spi-uclass.c
include/dm/uclass.h
test/dm/bus.c
test/dm/test-fdt.c
test/dm/test.dts