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 12C34C433F5 for ; Tue, 14 Dec 2021 07:07:58 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5873882FD0; Tue, 14 Dec 2021 08:07:56 +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="mdwaCmpC"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 52F3E83012; Tue, 14 Dec 2021 08:07:55 +0100 (CET) Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) (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 CFCEA82849 for ; Tue, 14 Dec 2021 08:07:51 +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-x62d.google.com with SMTP id v19so12925554plo.7 for ; Mon, 13 Dec 2021 23:07:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to; bh=EdtZRreLHjGOMYGvS3qebJ0jlGYcXUIhZmLf37s8IT8=; b=mdwaCmpCAIMR9T1XCVTsKlZSoaFz5xtR/iH+meG7XcHBsx1IL4ynE8H04vMpzAothT Ev5jBkoNTwcHZP6v9e/iP0i2NA6c3eKicw85J56cniOYRuF/oSQiVGLZr5+BUhU+DxA2 zdtLKETxxtHQAiQvQwhoE86Nw17o9m1DtRlnSYSllmUgGPVqtI46a8GGRcY/Df/vgNtr EPCjynQ4szB99CWUPVaFfyb/NVaS8loPy8q6BquuA/CFBLEMmmhzAFeiM3LqMhFkqNhY nuvbGT1jz4gEQJOwchaY3doyGSwnMbaxOE8/LhQbC5EhW38ImHDS6VzWwWdwQU/D+nNh SgDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to; bh=EdtZRreLHjGOMYGvS3qebJ0jlGYcXUIhZmLf37s8IT8=; b=0wJnAGcl+RKOGcNmrNvzylPZQhYd5NW1YjNcrzu7TEalkDteuP8qRYJKWiYFsAMePv qXtCMEWgFqGRIZit0lfaitLoPn8cs5me6i/tq+0JEcev4knxCWzRZP+iezjVvrnZFYZz 2GaAn4U0LD2obN7YmQx3CmFk6hV2/gy+IetyaJbHyBl/DX6ZPFSqLe2WX9SRcl19WzNM XpZqXHC/RFbEiv0FVI7KRibA4n/BkYXasvL04qwHNhQWLUSn8YfqGQ4j7cT5AUoxkm0o SsVlR67O40r4d/xYuNzMV9hLCUB8Wf/0KfWf/IIyyGNSXcTY298t8JDSPTa+NzSaqGmB sDPw== X-Gm-Message-State: AOAM531XzOalRoNFchsOrt7PawzQsPFFNWF4WHiuTIAbVtNEAAA4GZOs JE+6dbyr5pc3VGrjofdRA95x+w== X-Google-Smtp-Source: ABdhPJze+6YkrIQP8T7vW//KufhJyr0uVHj6q4SeuW0x55QG6fpQyfjJV2avJlSXXfYL/YlNrObKDw== X-Received: by 2002:a17:90a:ce14:: with SMTP id f20mr3652044pju.121.1639465670144; Mon, 13 Dec 2021 23:07:50 -0800 (PST) Received: from laputa ([2400:4050:c3e1:100:8d4a:ac59:26ea:d2bb]) by smtp.gmail.com with ESMTPSA id v19sm1245251pju.32.2021.12.13.23.07.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Dec 2021 23:07:49 -0800 (PST) Date: Tue, 14 Dec 2021 16:07:45 +0900 From: AKASHI Takahiro To: Simon Glass Cc: xypron.glpk@gmx.de, agraf@csgraf.de, ilias.apalodimas@linaro.org, masami.hiramatsu@linaro.org, u-boot@lists.denx.de Subject: Re: [RFC v2 11/20] dm: add event notification Message-ID: <20211214070745.GC49357@laputa> Mail-Followup-To: AKASHI Takahiro , Simon Glass , xypron.glpk@gmx.de, agraf@csgraf.de, ilias.apalodimas@linaro.org, masami.hiramatsu@linaro.org, u-boot@lists.denx.de References: <20211210064947.73361-1-takahiro.akashi@linaro.org> <20211210064947.73361-12-takahiro.akashi@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.38 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.2 at phobos.denx.de X-Virus-Status: Clean On Mon, Dec 13, 2021 at 05:51:46AM -0700, Simon Glass wrote: > Hi Takahiro, > > On Fri, 10 Dec 2021 at 00:00, AKASHI Takahiro > wrote: > > > > From: Simon Glass > > > > This is a draft implementation of event notification mechanism from Simon. > > Under this scheme, any U-Boot subsystem can register some kind of callback > > function to a particular event (more event types will be added later) and > > that function will be invoked once the event is fired. > > > > As a first user, UEFI subsystem makes use of PROBE and REMOVE events so > > that we will be able to automatically create/remove efi_disk objects > > relying on associated block devices (UCLASS_BLK). > > > > To run the test: > > ./u-boot -T -c "ut common test_event_probe" > > > > Signed-off-by: Simon Glass > > [add REMOVE event; fix checkpatch warnings] > > Signed-off-by: AKASHI Takahiro > > --- > > common/Kconfig | 11 ++++ > > common/Makefile | 2 + > > common/board_f.c | 2 + > > common/event.c | 103 +++++++++++++++++++++++++++++ > > common/log.c | 1 + > > drivers/core/device-remove.c | 9 +++ > > drivers/core/device.c | 9 +++ > > include/asm-generic/global_data.h | 3 + > > include/dm/device-internal.h | 10 +++ > > include/event.h | 105 ++++++++++++++++++++++++++++++ > > include/event_internal.h | 34 ++++++++++ > > include/log.h | 2 + > > test/common/Makefile | 1 + > > test/common/event.c | 87 +++++++++++++++++++++++++ > > test/test-main.c | 5 ++ > > 15 files changed, 384 insertions(+) > > create mode 100644 common/event.c > > create mode 100644 include/event.h > > create mode 100644 include/event_internal.h > > create mode 100644 test/common/event.c > > Should we split this into a few patches for submission? Also needs docs. I assumed that you were going to maintain this specific patch. -Takahiro Akashi > Regards, > Simon