From patchwork Wed Feb 2 01:08:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 539310 Delivered-To: patch@linaro.org Received: by 2002:ac0:f7d2:0:0:0:0:0 with SMTP id i18csp1192188imr; Tue, 1 Feb 2022 17:12:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJyGSE7L+mBE/iFME4qPgpdrZ3cXyFGW0PjygI8K7ROlLzbRX5WxL5heifUAt0KuXTJfcrCD X-Received: by 2002:a17:906:4dd7:: with SMTP id f23mr23259704ejw.385.1643764329988; Tue, 01 Feb 2022 17:12:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643764329; cv=none; d=google.com; s=arc-20160816; b=gmymLLQa+IGtNc1Epo2uetHOOmVHyVyh5hrcUixHOYnwMw1VXEpfqKttMO9wX5jfmU vt6+Y9QXtW8nTS5tXCFOPGpMsqleqksXw29KrXI1ArxBmv50L1J3Y3ZdamgEBvA8vDNL cnwxnoSwHUVEwju+uPsQvlxagz7QE08Y9fJPGNlfhP9kBEOzwh/5cD2N9TUuPzIyOOEy 6U3gZbrZ+vIKIfARhdmI46pOK7kNmXNpvWycLu5N9aZWf8yPBxSpGNMMzuN0M3O4zO2d UeQwDMBK/b8fnA56CpoBA+xDlvUGrutPDG1Mh9nsjj29A4BEbfgZmTQpeyVL1BHgSjJ1 kXdA== 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=ejw1is40U/7Wle0HW1PbG5bf3qWO0fEgyim5vk1bu2U=; b=Zt9iTMEtIltdI1THMdrPVnJA9li9LqUg6yfu5gf501scj9f4hckHaiJ48wkWueDDR/ OpR7fCutkONpibpHUo9Mpclf1M4I22bp/xuikHh4foucqTe1LGNFg80jl2vJGm5xfNOC 6YYVg6I09D1rywjrd9s7Wb9N9SMuZ+IL7hFeMpJlV5ueDyP4qR+TwtPn1GBffGeXeTIA amzhcKXooz1bNXjU/o22qk7iBQalOICFFwZJpagAj9zYM8F6bH0sJaM5iCli53R2eW/+ CjV7jUqdGyzT9LcRpqlsnJE2p851tADF8aRTj1hlC4ReRBl7RW3Qcgie+J/y6p/TUdpq OZ9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="X9cU8g/3"; 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 y19si10363857ejk.1004.2022.02.01.17.12.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Feb 2022 17:12:09 -0800 (PST) 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="X9cU8g/3"; 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 9AFBC838DC; Wed, 2 Feb 2022 02:10: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="X9cU8g/3"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E3117838C1; Wed, 2 Feb 2022 02:10:14 +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=ham autolearn_force=no version=3.4.2 Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) (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 1E7C0838B7 for ; Wed, 2 Feb 2022 02:10:05 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=takahiro.akashi@linaro.org Received: by mail-pf1-x429.google.com with SMTP id e28so17418028pfj.5 for ; Tue, 01 Feb 2022 17:10:05 -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=X9cU8g/3BVeHLrcCOPCr7pDOrOnFVj+ZA32m55rVgcnRuBevaNqUCrlF7JQCIYUoox cnKeF53/pMVSMgeztA0PPHwbJY1P5hnUU3iG4LD5tJotXXrC3PQKNsREhxJRa7Eu8Q3a D4Pmp8feY9X22vhNQO4h5q2pj7efBrS6eLFJbpwFE5ZN+dMGcjUTq9gkwTMSHtsRO4Jy TcOD1XdR63bkjh84FWjbXXvSZrAbYJjvTiVtW7Iu1QIywVwETLlE7YLuulE9S+54p2+W WtfIw677OG07pVPQSU9Znx+Oo8t4ZJzD0omt7dgPH3Q/aiwOFlHgYhjvZ8g40ciRADJE TTng== 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=WygMzvoQk+Bhd9TI1uVtsYoIqsQP5vbrBr2Fh31SsWBDW/FYGNi1EocNWmcSoX9GKw y+pM4sd25V33Z4jRZs3u0tH4OQEH4C1vAd2QGUsSWWaEJYWRyveDknpCcRDshE1sNBYR 51zT4QieVjsFxMqfcGX19MCUr8xSYxQnQ5sfqL+w8PzTcA3NYJQfGhVoDk9tE9Lk6sAG pj9uS+IZbl6XlLAK56NYBPYBZlg3NXaCRFFpzvwcY7LZWEQmQskzTOpKs594v/+vG05n W50H5ZriOnJrLr5No5Thz/JAf/UVg6YjThuTquvf14vrdt+yfaGO3txVkzMeweXGCAWy CrYg== X-Gm-Message-State: AOAM530D7zqJEHhZnXv3mbyyFqK0wKn6CCbzQe3Q6asE2HaZfL/CPo7s DtMAI6/AiifrjDMi2AuPLDmHrQ== X-Received: by 2002:a05:6a00:894:: with SMTP id q20mr10818595pfj.79.1643764203505; Tue, 01 Feb 2022 17:10:03 -0800 (PST) Received: from localhost.localdomain ([2400:4050:c3e1:100:314e:b83b:fa90:7f2e]) by smtp.gmail.com with ESMTPSA id f5sm10761429pfc.0.2022.02.01.17.10.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Feb 2022 17:10:03 -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 10/19] dm: tag: add some document Date: Wed, 2 Feb 2022 10:08:44 +0900 Message-Id: <20220202010853.40405-11-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220202010853.40405-1-takahiro.akashi@linaro.org> References: <20220202010853.40405-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 --- 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 ----------------