From patchwork Tue Apr 19 01:05:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 563295 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp2860207map; Mon, 18 Apr 2022 18:06:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwZi+Trpty4IvKAF8RzL74ZSu+elL/MRrdD0o7ucyYqJS+oIY/eyFJQIyrvx7U2661xuv1k X-Received: by 2002:a17:907:2d93:b0:6e8:9838:339c with SMTP id gt19-20020a1709072d9300b006e89838339cmr11831807ejc.655.1650330364682; Mon, 18 Apr 2022 18:06:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650330364; cv=none; d=google.com; s=arc-20160816; b=Jmcv/GA/8YMtiWWGEbsbB/dvjMZJZhbOfNlclqkthE/O9jWKQABixpeuURKrJvxqWc TtQlgjDihtIkAo8pBo1XhdB63WVOSVEynxtAGkc1VMvWTeSUD0b+J/QJRJdw6Fv2o/O3 BjE9zCMJGOhsFoeXu63xIWVlSW0R/UTX6x+lY6E/DmOo2qqCTpsYBbUPpdRyG4kstgbP cSQBVA+Awp7WMXBobgFtk9Gu7jshPCeifLIlqVft3lEvUr+UDEEkx1XfsWQ1PKkxLMlO uZRrFk8LCk7/+Pv8FhwRUOcojY1uWUPVsBvHqapbxKxy1a0v9SbfyAGChPExN4yyriWY 5vQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=cX/nLKjs6xoyV+5h4EfvdKOKYkfovrTdR9z7OgzIyt0=; b=DwtV8cy4wkCNbC0x4YI/dAIxMnWDCbjZS/MEy9lxLVSKd/G9TxGV6qW6pd2vGBTCpn YB7/V9Jg9TLrW6GPyv6EJ1NjyLGBtoH/GRmcJi1S25qukOhCXYIVPS1M5ruysMSRVhAP bP+RUQMGmnbMfmMOhu8sP9t9Mj+nNWTe+CkwcAfAR7WSedPBv63ZJNUHGj90X9LzelPS wnhN7wwrpYSd7EiRFK8HFSEgWy0u8ug57ixcNKsj0TasK+5HZQ9kvZQPG7+37zwjbJZW kWAmEXBTEBOvhjJ1iZb//YsNgM43fZEnspIxlrq/VXJ20zxnq8gwi7n18Rg/1qek5Chd tjLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=U0ZJLz8Y; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id z17-20020a1709060f1100b006df9ffbf08dsi6309853eji.365.2022.04.18.18.06.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Apr 2022 18:06:04 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=U0ZJLz8Y; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3D14383B3D; Tue, 19 Apr 2022 03:05:56 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="U0ZJLz8Y"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DEF5C83C5A; Tue, 19 Apr 2022 03:05:48 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pg1-x535.google.com (mail-pg1-x535.google.com [IPv6:2607:f8b0:4864:20::535]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id E5D9283B38 for ; Tue, 19 Apr 2022 03:05:44 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=takahiro.akashi@linaro.org Received: by mail-pg1-x535.google.com with SMTP id k29so21958831pgm.12 for ; Mon, 18 Apr 2022 18:05:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=cX/nLKjs6xoyV+5h4EfvdKOKYkfovrTdR9z7OgzIyt0=; b=U0ZJLz8YRru/MC16ZoU8meNq+tzIjbfs5WiJgIYeeiK9I3p4LP11s7rD64suRGKj2O oons0+bkKDzkYNbJ6hAp2F20IzT4sXfcPnkgusKZESS5sbnheYah0LSkBrZZ+pfdkZKa u0+lr7ZYV2bMkWdOION2YznekrLv5sgcPdmVWVSY/0s4OBgEuaVqEUxcCTZuCzS16EwE HR015POXudRRbiQvOaUAWcOjrY7GwSrsRVp/7JdDGV3j5BE/mRFShp3sU1r3HY9hwvRw C//fjc9z4bvxFGkIC6wc01PUhaBHP6YnFQMde/otUEiucYptt/RxJTFtlboWS51dPi4l 7b8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cX/nLKjs6xoyV+5h4EfvdKOKYkfovrTdR9z7OgzIyt0=; b=zXRpWERO60dLYaa/XRMn3llBlPIWjH5tl1v7sYbpggEJa0RBkHuc5ziwjFZJ0wBtIx VuSXbq31CydyrQUIzAaDoQeGBZ3Fa8BBNft3sqg7PsKc3lMqhftgRWxuwoGxeMrkp8iB 4XZJVB06Leu7p9UwOO1Plax1k5Ab1cPx5Sz0T3JkWWiP+PBcjzkp7ykuBpouzb3sXKTE oc83LGdChAhzvr3pCqKvvgNsogyS+TIhUcNZF1XpcX51uEYRZ8Y/Z6WmBN2to2zJA3S+ ADAlMtUo1sF8nXn3lAe+ELoaseSRirPa9WhXhGhmOzIDW7obsVJmXu5TmAGQBm+8zuj9 eKDA== X-Gm-Message-State: AOAM5319FhwvtmqjvxrBRQSU6gV8Aw9s5VokiJK+tPyn3ydxD4jUlKNC y/HegQ4bx0KGGf1xXscX88SiUg== X-Received: by 2002:a65:5b0b:0:b0:3a8:2190:9a07 with SMTP id y11-20020a655b0b000000b003a821909a07mr10001664pgq.462.1650330343302; Mon, 18 Apr 2022 18:05:43 -0700 (PDT) Received: from localhost.localdomain ([2400:4050:c3e1:100:5858:d3a6:5cad:ceeb]) by smtp.gmail.com with ESMTPSA id k137-20020a633d8f000000b0039800918b00sm14043756pga.77.2022.04.18.18.05.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Apr 2022 18:05:42 -0700 (PDT) From: AKASHI Takahiro To: xypron.glpk@gmx.de, sjg@chromium.org, ilias.apalodimas@linaro.org Cc: masami.hiramatsu@linaro.org, u-boot@lists.denx.de, AKASHI Takahiro Subject: [PATCH v5 02/12] dm: tag: add some document Date: Tue, 19 Apr 2022 10:05:07 +0900 Message-Id: <20220419010517.47175-3-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220419010517.47175-1-takahiro.akashi@linaro.org> References: <20220419010517.47175-1-takahiro.akashi@linaro.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean Some basic stuff about tag support is explained under doc/devlop/driver-model. Signed-off-by: AKASHI Takahiro Reviewed-by: Simon Glass --- doc/develop/driver-model/design.rst | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/doc/develop/driver-model/design.rst b/doc/develop/driver-model/design.rst index b0e6337030a1..3e88dc40e6fd 100644 --- a/doc/develop/driver-model/design.rst +++ b/doc/develop/driver-model/design.rst @@ -1042,6 +1042,26 @@ data structure might be worthwhile in some rare cases, once we understand what the bottlenecks are. +Tag Support +----------- + +It is sometimes useful for a subsystem to associate its own private +data (or object) to a DM device, i.e. struct udevice, to support +additional features. + +Tag support in driver model will give us the ability to do so dynamically +instead of modifying "udevice" data structure. In the initial release, we +will support two type of attributes: +- a pointer with dm_tag_set_ptr(), and +- an unsigned long with dm_tag_set_val() + +For example, UEFI subsystem utilizes the feature to maintain efi_disk +objects depending on linked udevice's lifecycle. + +While the current implementation is quite simple, it will get evolved +as the feature is more extensively used in U-Boot subsystems. + + Changes since v1 ----------------