[U-Boot] [PATCH v4 04/29] dm: core: Add a clarifying comment on struct udevice's seq member

Simon Glass sjg at chromium.org
Tue Oct 14 07:41:51 CEST 2014


The sequence number is unique within the uclass, so state this clearly.

Signed-off-by: Simon Glass <sjg at chromium.org>
Acked-by: Jagannadha Sutradharudu Teki <jagannadh.teki at gmail.com>
---

Changes in v4: None
Changes in v3:
- Add new patch to add a clarifying comment on struct udevice's seq member

Changes in v2: None

 doc/driver-model/README.txt | 4 +++-
 include/dm/device.h         | 3 ++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/doc/driver-model/README.txt b/doc/driver-model/README.txt
index c435cdc..8dfcf75 100644
--- a/doc/driver-model/README.txt
+++ b/doc/driver-model/README.txt
@@ -359,7 +359,9 @@ Device Sequence Numbers
 U-Boot numbers devices from 0 in many situations, such as in the command
 line for I2C and SPI buses, and the device names for serial ports (serial0,
 serial1, ...). Driver model supports this numbering and permits devices
-to be locating by their 'sequence'.
+to be locating by their 'sequence'. This numbering unique identifies a
+device in its uclass, so no two devices within a particular uclass can have
+the same sequence number.
 
 Sequence numbers start from 0 but gaps are permitted. For example, a board
 may have I2C buses 0, 1, 4, 5 but no 2 or 3. The choice of how devices are
diff --git a/include/dm/device.h b/include/dm/device.h
index c24707e..b8d4e7a 100644
--- a/include/dm/device.h
+++ b/include/dm/device.h
@@ -57,7 +57,8 @@ struct driver_info;
  * @sibling_node: Next device in list of all devices
  * @flags: Flags for this device DM_FLAG_...
  * @req_seq: Requested sequence number for this device (-1 = any)
- * @seq: Allocated sequence number for this device (-1 = none)
+ * @seq: Allocated sequence number for this device (-1 = none). This is set up
+ * when the device is probed and will be unique within the device's uclass.
  */
 struct udevice {
 	struct driver *driver;
-- 
2.1.0.rc2.206.gedb03e5



More information about the U-Boot mailing list