From patchwork Thu Feb 10 08:11:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 1590904 X-Patchwork-Delegate: xypron.glpk@gmx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=ZCbku4qh; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4JvTzs5wwmz9s5B for ; Thu, 10 Feb 2022 19:14:17 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A42768321B; Thu, 10 Feb 2022 09:13:20 +0100 (CET) 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="ZCbku4qh"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B96F883836; Thu, 10 Feb 2022 09:13:16 +0100 (CET) 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=unavailable autolearn_force=no version=3.4.2 Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) (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 0A35C8366F for ; Thu, 10 Feb 2022 09:12:50 +0100 (CET) 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-pl1-x635.google.com with SMTP id 10so1200862plj.1 for ; Thu, 10 Feb 2022 00:12:49 -0800 (PST) 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=ejw1is40U/7Wle0HW1PbG5bf3qWO0fEgyim5vk1bu2U=; b=ZCbku4qhtNLte97dUEeWbjzyKHU/41WuwdkkqqgULiUJIHH71Jz8n0VasNpQLzICJ4 cfOMSm9EEQHNHZ+6/KpTEqvlja69UEIhgJYBup0Rc0Q9BbD8pl2CqU2NCaq5k24svAT9 ajJSGypOvAEmhsGPaa1EEouXFiGzaMlg/tMUI5dpov3Q4aiU+bB+TlalMnlWx+vkW7pj 76kPDHscZC6hcxS9SLZPgMnHIPlNxzW8IOUKpxsNgDYDz11lIvaGhZHz2fa4HSfQnSpY cWA0ZTbR1uwyMYsO1t1ldjD8UAjRoty8QInVNJANxZjIwbx/6equJpezaCeG+i1a2bdu sAcQ== 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=ejw1is40U/7Wle0HW1PbG5bf3qWO0fEgyim5vk1bu2U=; b=2h0cVXn7Le+QtTVec5OO7MlQ+wIZQo9WwDa/F3kAcbIy3cWWpB004w9vrXn6IWBKRW mFZc8JSlGhSPO+Gf6YNXsD0agTQ08ihkEcDWiwhYv1pRGsM4LFNZlRgFdJow5U541Rdu y7kiam99L+LEMeKlkeVsJ7fLbKxiE64vHIrsxR+4a6oBayxuKrQt1LvjJTboD8riBIKC 7MbvM5sZGUKeWGhaxosnp9pUSuaNlVyCk2gQ2SPHa8l7f2jZQ+sWM8ykOvcjC/30NjXi aDSN5sqjr22b68rN3uV6Ij7dhlMywAGpcUC5lf658TO59fpnmsZUggK1mLEwMHROc2CK KBoA== X-Gm-Message-State: AOAM5315ZzacR6Q53Ghk1poGVxD2UBg/LBttafRqJVcrdkza7DUMGzoj k2J4XKY2Rhaw2j35gC/ZDRDlHutGpfZzMw== X-Google-Smtp-Source: ABdhPJyz0V6XHz3qMlqftmQ0crUc/BwAXrU6Y2jv0ZVIW3Zlou8i0O54W2BIeDZDfmyX2NsKTF1Skg== X-Received: by 2002:a17:90b:1e0e:: with SMTP id pg14mr1598553pjb.4.1644480768212; Thu, 10 Feb 2022 00:12:48 -0800 (PST) Received: from localhost.localdomain ([2400:4050:c3e1:100:412e:384:fab9:f24]) by smtp.gmail.com with ESMTPSA id lk8sm1529208pjb.40.2022.02.10.00.12.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Feb 2022 00:12:47 -0800 (PST) From: AKASHI Takahiro To: lukma@denx.de, peng.fan@nxp.com, jh80.chung@samsung.com, bmeng.cn@gmail.com, peng.ma@nxp.com, sr@denx.de, 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 v2 10/20] dm: tag: add some document Date: Thu, 10 Feb 2022 17:11:14 +0900 Message-Id: <20220210081124.86612-11-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220210081124.86612-1-takahiro.akashi@linaro.org> References: <20220210081124.86612-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 ----------------