From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 57EB0C433F5 for ; Wed, 2 Feb 2022 01:12:04 +0000 (UTC) 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) 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-Google-Smtp-Source: ABdhPJwJ3IBVmZOeJCGARO4UYpm8CyYSyOmd47m9P6/aNYJTVemnoKM99Y5dA17l+jQFHvGQtSvR7g== 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 Content-Transfer-Encoding: 8bit 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 ---------------- -- 2.33.0