From patchwork Fri Apr 15 07:15:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 561938 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp115063map; Fri, 15 Apr 2022 00:16:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhMFhJ+yxhXmU+QrHO0DzcRQMt+LxfKT0lxsXSdwXbY3TGrKcXwGwJIU8stysITzMxhV2K X-Received: by 2002:a17:906:38d9:b0:6e8:3f85:4da3 with SMTP id r25-20020a17090638d900b006e83f854da3mr5459352ejd.196.1650006995791; Fri, 15 Apr 2022 00:16:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650006995; cv=none; d=google.com; s=arc-20160816; b=NxF6JxWtYH/1qgzeoWSKNlLLXcgY4ofi4b0BwlYhu02mEtu/HWc8S/xdiphrOtmwTG +B9iVaPqhsBZLDMrHz+zz7GlUefgoKZFmdI/eqkiS0rn5ELPyHIKTMJtqk30IXifIkNI TXYnjHdUU4LFepx6QaBcF81kJrmBjhTyA8XX72Ni7A88pxkNaBcd2Z6pLsWYE7RBc3HX hRHVi3Ra69DU+ajiXvKHvR4zwU8Czg9n3dt4YWIiB8fVrGuwdWYe8B9znR7L7ji9UwYR ErS1EgleZQCEAmqakJ8Qy8q44UD/j8RwHYmlTeyAHgqJkXhxDDcP6p9p4WXueVGSc6UI D1IA== 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=KBo6iH8HdFc2WC31d5ktVOd0WcWnRyPWwuX5IyoE3pbou877R6j3mJxwJfOVjA1rpZ t+zipXsbNKFdHlj07e03ewH60wWyFoneHViTyXAOHiycx16U89e1qSjg01visAsmuvzs 3a7cF3OgK6jMJDMlWH2y3NS9Tx6HQ5QWPKf30sn4vtbKyJJ4zcdXOhJKReX3PIWSTb9m AD3woToL54MO176OvebDkRLvZMhMPRrwyiw2qy3whH7YoW+m+aTyuhiCXo7301iT+qM/ aVUJ3HDpFWjzc7+89WPh6ubIb6O/1VyG2qOOCbOKpM8M9sclFisz8k1mgvqmienCjimL iTtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nWf4GjsP; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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. [85.214.62.61]) by mx.google.com with ESMTPS id g2-20020a056402180200b0041d799aa068si584067edy.147.2022.04.15.00.16.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 00:16:35 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nWf4GjsP; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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 A9EAC83959; Fri, 15 Apr 2022 09:16:26 +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="nWf4GjsP"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E334983965; Fri, 15 Apr 2022 09:16:23 +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-pf1-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) (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 81C6D8399E for ; Fri, 15 Apr 2022 09:16:20 +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-pf1-x42c.google.com with SMTP id p8so6696719pfh.8 for ; Fri, 15 Apr 2022 00:16:20 -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=nWf4GjsPpno/qcxMfPRVEqN9KRBjfKrybP5zZt3OHyYCzDSQ4GcfBNHf2H7yOXtHDl f9CbSwbdR1Y1IDcwDBi7MEagVRzeZsXoLzHNDEr//t2hy2XBp9KZ2oz07YZdy2JfTZUH 621hcP6SDWqrrU9jwTXcm/mkPyRqLHkCVYzAEpxxb3kE6vSxgZSSIMVYtBWpGR6I00Mb yJmtVHbgkj73F1FuIBChQTi4I0E8zQnS2h43MFUlvtdOfEiOLwYKIdm3P//D06R5QV/8 dTIihwcggqO7RTrMo3S+OY3xj8B49kiUqFu/zy2p3rUtrce4+hv6NjcOGBNHeBK/zrb+ lZ+g== 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=HX8SeIYAFh1WJ/OyUOdvUvJ+EH4U3yf5GDsf03Sdgw9uU4fJVWstslPY7Q+zw8xQp0 S68jtsN+lYEVjCDDX7HhSNUVtKbRi9EposFq5h3V8sIZYPNFfOul8AMPI3fQ4p02fAVM Y54apvJtAga898hTq7+YAdQG0BvEyYFa9GD6qWQ2o0CO8P6S6ms+DyDax8sqYcgDAGhF IEVbB/J1Por6LZgQOxMRitAFuY4eTFZSaAbUlAHztbolKz/ozXtzoXRp8gOv/B7GXJDG 5UW+FrkOYkf9bIKNQDaOtqBIyL1Xz1eQ9EZKSrVNLVOCM/UkKIPnQov2vS57e20q97HM qIVQ== X-Gm-Message-State: AOAM531CJjmDq+s6DkIjONSoByBQdCTgdyDP5zelLoNv5F3Xe+iUzx6A /bIueAYM/gwA8PqhD+DFOFrlug== X-Received: by 2002:a05:6a00:1a06:b0:4fc:d6c5:f3d7 with SMTP id g6-20020a056a001a0600b004fcd6c5f3d7mr7522163pfv.53.1650006978971; Fri, 15 Apr 2022 00:16:18 -0700 (PDT) Received: from localhost.localdomain ([2400:4050:c3e1:100:18f3:1e4:6c4:6ea3]) by smtp.gmail.com with ESMTPSA id p1-20020a17090a0e4100b001ce188720e5sm3566921pja.53.2022.04.15.00.16.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 00:16:18 -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 v4 02/12] dm: tag: add some document Date: Fri, 15 Apr 2022 16:15:36 +0900 Message-Id: <20220415071546.122475-3-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220415071546.122475-1-takahiro.akashi@linaro.org> References: <20220415071546.122475-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 ----------------