Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp106753lqm; Tue, 30 Apr 2024 14:32:56 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXn93R/0M/LXlLR1lcYjCkR4ICZ++A8vmo+7+Thah0GcYHN0TSCgv8lNPYwf9dZWuwMckQOiE/WlNrzULWBC0+9rQUL7EU6S9SDEVBTdw== X-Google-Smtp-Source: AGHT+IFtsVxewdLpA679/3NWFjHfwanbVL2coJnK8AdJmycwncyBqyx/Hw+6ieHdNlSG/LWRO//5 X-Received: by 2002:a05:622a:5293:b0:439:fd29:3e9 with SMTP id dr19-20020a05622a529300b00439fd2903e9mr588550qtb.27.1714512776617; Tue, 30 Apr 2024 14:32:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714512776; cv=pass; d=google.com; s=arc-20160816; b=zlJIniOQkqUBBU8nac7EAa560oWQZrmcUUaFjnbfAfYR934t5h3A1JR8ckW+TxKIib MzTx32XaPoALFec7PlryOGbiG33hp/8PEaVgAgFbXnv5EXt2iT+u7N1B/KKb2aIpKpa9 KW/B89FaPhGB6KsLn4uoHLu3aaPUe6LwHYnNU8OeHTH830SXnrEh8cTatIJqFoR9AVIu GK7AHPUARm2q4iRoLAHrVnrTiCgfD7DFjUvm0b3NBvbMCX/MO8hjrXwgmw6aGtpA/+Hg 3hx8WjG4jrgWIK5PkcSpctAAP+XFegIewnejt99tJRNzXIV9kQbkuvqgz9nw0RZrksAk 4sog== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:date:to:cc:from:subject:references:in-reply-to :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:dkim-signature; bh=xhRM2v0UAxB69kaUMrOBydAR9NjuQlaNVhpdvmzP96w=; fh=29fAtjy3d9q+ttmTblWbp4JolbcfzpHYS3Kj3FZF9A0=; b=sJakC8z1jwFGAQx84ABgT0+pU7giZGXDw0yL7UNnEbjJe8ztTABmzvOgD98661jexw Y+O9kVLAi9x14F9cjA2svvVQN0niTHquZLYLGvjCVqbi9QCxJbkJp6c9t/Mt7IUaJrC9 xE0NMd81XW8hpeb2QoerIVlhe9je/HPZRr4clJ6qHJCJiZeBMs7ZvOGhl8KqIeeXgK66 lX6wvuee8h/xACY7CcgrxHpPi6r3+FMS29BJH9borirAiqxKILQ6juPQKYDmgSI8gWXF CnViU4Ei4a/3j/fbuMZLbRvfX6AdWBQQ5YlLzcZrcIxGYqtwo1tb6nqARrbyyX/w7nJc gv/Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=a6jz1MBb; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-164743-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-164743-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id u13-20020ac858cd000000b00439f5181ad9si3686932qta.377.2024.04.30.14.32.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 14:32:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-164743-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=a6jz1MBb; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-164743-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-164743-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 90F1B1C22E2F for ; Tue, 30 Apr 2024 21:32:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 733EA1BED94; Tue, 30 Apr 2024 21:32:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="a6jz1MBb" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 80C2D50287; Tue, 30 Apr 2024 21:32:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714512729; cv=none; b=IAway03HYEIelUf9cUZEJjJpZj4xMU2zBD6FFoqYAT0pCzTEYp+IhzYitAZaKpvhIXGJjv4gcds9AmLT3XWO/wz+1vvrQ5xXEnY05GibnAyqliC4P2O/DsypM+dNG7dUwMHtPHl+XhJFEAq8ml/AuGK8+slKau2eyE4pftUpIlU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714512729; c=relaxed/simple; bh=0XERCxExItXvCPVmz8dhoEKm4od93+XH9ZJUKA96nVo=; h=Message-ID:Content-Type:MIME-Version:In-Reply-To:References: Subject:From:Cc:To:Date; b=Gl1iIab6fwdi8cuL2MuTq+s/UOJlfw9eRoaneJrICLEsr1WjojkCLRSh6Sr9fp6PdG9IY+u4P36jDD5lxV3VwdIQYVFJHssSFHZNJZbY3lo1Sj8vM+jPU9TGkAPityaDr9TnQwm4UHbFYh3Z1DO/bYyk03DUj0TL42RcWLsccqk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=a6jz1MBb; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id E5C3AC2BBFC; Tue, 30 Apr 2024 21:32:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714512729; bh=0XERCxExItXvCPVmz8dhoEKm4od93+XH9ZJUKA96nVo=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=a6jz1MBbBTG6dEOQBfUsybX5JwqSqqyFhDkzQBjD8f8tNWPu/slUJBXK+Gp/9TBrN KWoXkNEHxbnFBfsqrww5JC8m6Gc/IibVzICdzpAwq/3x1Lm3Pad8TYxT66/vqjP2eW ErgUlnk4ifCetqKSqFjHdnNF6TrfRGUV1jlvsoJLIfo9Hak6sRekWAktleNjXt962f Jx06e3h+aMmGFo53Vc0RkR8rg41c+r13Gh3nmo4/UD1bEC8EFXluqvPncvF4SY0hMr nHxiqufOOLfk2sBDSFfSmqrSaIsiDsh18e6Em/5S7ClgJOqXcFuOkQUElwDVHog/0Y ybWFNi85j15NQ== Message-ID: <9f4323025c9d25313ecf26327848fc62.sboyd@kernel.org> Content-Type: text/plain; charset="utf-8" Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <128dc42a50bfe166993205108a5b23cd.sboyd@kernel.org> References: <20240422232404.213174-1-sboyd@kernel.org> <20240422232404.213174-6-sboyd@kernel.org> <128dc42a50bfe166993205108a5b23cd.sboyd@kernel.org> Subject: Re: [PATCH v4 05/10] platform: Add test managed platform_device/driver APIs From: Stephen Boyd Cc: linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, patches@lists.linux.dev, kunit-dev@googlegroups.com, linux-kselftest@vger.kernel.org, devicetree@vger.kernel.org, Brendan Higgins , David Gow , Rae Moar , Greg Kroah-Hartman , Rafael J . Wysocki , Rob Herring , Saravana Kannan , Daniel Latypov , Christian Marangi , Krzysztof Kozlowski , Conor Dooley , Maxime Ripard To: Michael Turquette , Stephen Boyd Date: Tue, 30 Apr 2024 14:32:06 -0700 User-Agent: alot/0.10 Quoting Stephen Boyd (2024-04-24 11:11:21) > Quoting Stephen Boyd (2024-04-22 16:23:58) > > diff --git a/drivers/base/test/platform_kunit.c b/drivers/base/test/pla= tform_kunit.c [...] > > + > > + /* > > + * Wait for the driver to probe (or at least flush out of the d= eferred > > + * workqueue) > > + */ > > + wait_for_device_probe(); >=20 > Should this be removed? I was thinking that this isn't a pure wrapper > around platform_driver_register() because it has this wait call. Maybe > it's better to have some other kunit API that can wait for a specific > device to probe and timeout if it doesn't happen in that amount of time. > That API would use the bus notifiers and look for > BUS_NOTIFY_BOUND_DRIVER. Or maybe that function could setup a completion > that the test can wait on. I have an implementation that does this that I'll send.