From patchwork Tue Oct 14 05:41:51 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 399339 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 1AC53140140 for ; Tue, 14 Oct 2014 16:44:25 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5E80CA77EF; Tue, 14 Oct 2014 07:44:08 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5wuPTy++fKM6; Tue, 14 Oct 2014 07:44:08 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A0FFDA75ED; Tue, 14 Oct 2014 07:43:39 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BDF82A7518 for ; Tue, 14 Oct 2014 07:43:17 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8Q0qPL1goWL5 for ; Tue, 14 Oct 2014 07:43:17 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-pd0-f201.google.com (mail-pd0-f201.google.com [209.85.192.201]) by theia.denx.de (Postfix) with ESMTPS id 37348A7487 for ; Tue, 14 Oct 2014 07:43:13 +0200 (CEST) Received: by mail-pd0-f201.google.com with SMTP id y10so1292012pdj.0 for ; Mon, 13 Oct 2014 22:43:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=7VQ89MZrwMYaoNXZ2fBfxlrnkOjf2ZYaNvpvKXTrxik=; b=eIX7qA7f7qDD6RGHH6FWavNTiISWEZapq2VpegOgsd6CLeQ7nhTgxxDTx8C1W5oJUT 2Ms5tEarMV3aoFOj4Xg2KYtpYXT3eMLKTl1MjFF2npY1DO+LXnBfo7j31GE0EDKBlImO bz5L7AtntqF+T3QFlgH+6maCCeCqscPABtw/UPuQpQfCKUJDDUYXWj/JWb3pBUSsPlvD 6Jdt94GndEYOnLbJiQWnSfU1Vk3VE4OqcyngnoPzcIM5LFoN/e1MJ7P6wrmoolzeRKeQ ZMX1et5Heiq2WVN+56V958mSuP/bIreA36brT0wmrxcTCq673H2ety+KPoWDtuyK1TDS w3Lg== X-Gm-Message-State: ALoCoQmgmUCv+gQM667z9/8g04HmE6/U7XqGR3V03ZIg/j0pLtm01arHvZBNTpDmSzqfGZbUWok7 X-Received: by 10.66.90.164 with SMTP id bx4mr2142326pab.2.1413265392468; Mon, 13 Oct 2014 22:43:12 -0700 (PDT) Received: from corpmail-nozzle1-2.hot.corp.google.com ([100.108.1.103]) by gmr-mx.google.com with ESMTPS id n22si808655yhd.1.2014.10.13.22.43.11 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Oct 2014 22:43:12 -0700 (PDT) Received: from kaki.bld.corp.google.com ([172.29.216.32]) by corpmail-nozzle1-2.hot.corp.google.com with ESMTP id A2Luq639.1; Mon, 13 Oct 2014 22:43:12 -0700 Received: by kaki.bld.corp.google.com (Postfix, from userid 121222) id 84AF9220DF3; Mon, 13 Oct 2014 23:43:11 -0600 (MDT) From: Simon Glass To: U-Boot Mailing List Date: Mon, 13 Oct 2014 23:41:51 -0600 Message-Id: <1413265336-9571-5-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 2.1.0.rc2.206.gedb03e5 In-Reply-To: <1413265336-9571-1-git-send-email-sjg@chromium.org> References: <1413265336-9571-1-git-send-email-sjg@chromium.org> Cc: u-boot-review@google.com, Jagannadha Sutradharudu Teki Subject: [U-Boot] [PATCH v4 04/29] dm: core: Add a clarifying comment on struct udevice's seq member X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.13 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de The sequence number is unique within the uclass, so state this clearly. Signed-off-by: Simon Glass Acked-by: Jagannadha Sutradharudu Teki --- 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;