Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp991905lqb; Wed, 29 May 2024 18:01:57 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV9pD/1idtptVRKYhNpbIvJSsJPkx/fhqoU7y53hO8mgeMCedA4f6jOf629rRqmPAzrUM+dkT/6kd1Cg5JI9+o3lwHt+llr/jOqwiLJ3Q== X-Google-Smtp-Source: AGHT+IHbyEYScsHuO3nHfGEMlARHCAbY2VAQizAk9V0jGxgrnn8xHsqrFcYmoVUG1XgnbgdBkYhP X-Received: by 2002:a17:906:4455:b0:a65:ec91:c965 with SMTP id a640c23a62f3a-a65f0949991mr31387266b.10.1717030917063; Wed, 29 May 2024 18:01:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717030917; cv=pass; d=google.com; s=arc-20160816; b=G9JJ3AO//wv8uiP4zlX6FoM+JId5PyGrNxbuJgVSgJay+l+G3b2IlIbZoMrFx8ql+c gf3bBSEQ1sIg6IQ+HE75sl3SMpBVPpOJquzK5YgxsQY6kwqz50Tpx6COd/KcfJ1jyitH JJcflhYd6c/iOcwYmi8zGP9QL588U9FHQVbaN4OyENUQBHUdUm1k7eJjk6B91OAzsbyb KrVJ4vkYaS4TDMbxygxgkOCrIV84G2PM/FrWzWALUVN7gx3Ex3YBlvzUnPN/F6m8Rr04 MeNnKvNCkLxJvjmGN26xkqaAA4H6gH+FyjMW6rZzvFdaLhENNtAnURTf1+D8m48/Ee5g pPsA== 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=JNjZH8fTul5crwKCiRpcjnx8ROQ4H7+57NqhwEEs4kI=; fh=dybPlOHN70iV8F6tETuoWhx/5frE+jhpRq5Awtl/9kA=; b=pfviUuEzxTEfqnqSykPYvrlALSV29hR/GCEYeAHUOBAtlOElCriCWw9a8OlhiqvZS0 ESFnUpEbayQV5M1uOMb6d9g3mj4N9M/rELTwQq0fXx8UdrxlZLc7mLGl3qtyYBsPi2/Z qDMWnHwfdOIDs6dfBGX+w8SuT6kAMqE7FUrQX2FMgDM+dzoZnzdq7qNKP8ohIHVudoZl S6HCNReyPR0H4EEb26wvl0FSUOvz8RoG0rfUlZ0j8ImcP0+aJ8A6JR68deeJS2JLOhEh 9cPtdN0Z7KpwKxNtChmNYHzBfooLyvdZ5Xg5eywG+MvKOrs0YFK9lmtsZvEoPpJFIqE0 ZROQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UAU4jijR; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-194830-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194830-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a626cd954c9si670754666b.869.2024.05.29.18.01.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 18:01:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-194830-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UAU4jijR; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-194830-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194830-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 am.mirrors.kernel.org (Postfix) with ESMTPS id C87901F21DF0 for ; Thu, 30 May 2024 01:01:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2B9D3E57E; Thu, 30 May 2024 01:01:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="UAU4jijR" 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 5196028FA; Thu, 30 May 2024 01:01:49 +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=1717030910; cv=none; b=WK6983ugcKfnmuxCp5+3Ske+CcxklZKLSDcPS0TeGPFsDgDp/jNRY9qjfn7BDXx6EdNxT7lyu4BYmBXV260Rv/fRLn9Ro6byIsbCXuqwJMAw4ydwmrmYtwVDrCIgMZWEY77LbGEmav0Y7HhJxex5OihMNxdjD+DzHsmNnkCEzKo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717030910; c=relaxed/simple; bh=cJmlKGOTHQ+BuDd8duP8qVpIxhVbfAXEM3GOcqyoUNM=; h=Message-ID:Content-Type:MIME-Version:In-Reply-To:References: Subject:From:Cc:To:Date; b=lDwYSIKU7tQERdAGuJEif7pdJF4t6f4+AwUFmfU4FPrJuJIiKPacG1zMMhYubA6yPmp75oy83kYltUNO1nXuQb6J4oMxZLdXaQv8fDC40ALC7qkvSOaIz2h1xGKy2QaOGeYFC1FrUUoK0wTndpAsorLcDQdPbW1YFvqCgnCrpRg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=UAU4jijR; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id BB83FC113CC; Thu, 30 May 2024 01:01:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717030909; bh=cJmlKGOTHQ+BuDd8duP8qVpIxhVbfAXEM3GOcqyoUNM=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=UAU4jijRZ/Fq/r8kmyA+N+BqLvcBIjDf3ftlLK35kx2DX0kVbKcs2+p+rpGdy95Uy vKiGifkrQ7mrTj9+gzKxHWt9ILNfGCLcQJkW2eSN+n7m8jqWDVOuRzJrAgcWyM7ofr iYNy293DqaDz/XA0Q0oJrDWvOwP55jPNxcXn5KYyOaeAhxjWeYEi//kRwrCD5Cawf6 qPovzCywNwNnJ1hNSU6KXMs9ieNwBYzy3yYWId/d5+cHYXNRXaTaJ9puKJmbMTDbDj 0KPA9h/B+fFTjnr/8PmakSWOJpdvjjF8GIu8v4/EpUhXxCFULUVUxZEv2ZoI+6DZ9Y 9zL1LABWQTbbQ== Message-ID: <68518f93af68cbc0153c8bd765dc885f.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: <20240516150842.705844-9-jbrunet@baylibre.com> References: <20240516150842.705844-1-jbrunet@baylibre.com> <20240516150842.705844-9-jbrunet@baylibre.com> Subject: Re: [RFC PATCH 8/9] clk: meson: add auxiliary reset helper driver From: Stephen Boyd Cc: Jerome Brunet , Jan Dakinevich , linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org To: Jerome Brunet , Neil Armstrong , Philipp Zabel Date: Wed, 29 May 2024 18:01:47 -0700 User-Agent: alot/0.10 Quoting Jerome Brunet (2024-05-16 08:08:38) > Add an helper module to register auxiliary reset drivers from > Amlogic clock controller. >=20 > Signed-off-by: Jerome Brunet > --- > drivers/clk/meson/Kconfig | 5 ++ > drivers/clk/meson/Makefile | 1 + > drivers/clk/meson/meson-clk-rst-aux.c | 84 +++++++++++++++++++++++++++ > drivers/clk/meson/meson-clk-rst-aux.h | 14 +++++ > 4 files changed, 104 insertions(+) > create mode 100644 drivers/clk/meson/meson-clk-rst-aux.c > create mode 100644 drivers/clk/meson/meson-clk-rst-aux.h >=20 > diff --git a/drivers/clk/meson/meson-clk-rst-aux.h b/drivers/clk/meson/me= son-clk-rst-aux.h > new file mode 100644 > index 000000000000..386a55a36cd9 > --- /dev/null > +++ b/drivers/clk/meson/meson-clk-rst-aux.h > @@ -0,0 +1,14 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +/* > + * Copyright (c) 2024 BayLibre, SAS. > + * Author: Jerome Brunet > + */ > + > +#ifndef __MESON_CLK_RST_AUX_H > +#define __MESON_CLK_RST_AUX_H > + > +int devm_meson_clk_rst_aux_register(struct device *dev, > + struct regmap *map, > + const char *adev_name); I'd prefer we move the device creation and registration logic to drivers/reset as well. See commit 098c290a490d ("clock, reset: microchip: move all mpfs reset code to the reset subsystem") for some inspiration. One thing I haven't really thought about too much is if they're two different modules. One for clk and one for reset. If the device registration API is a symbol the clk module depends on then maybe that is better because it means both modules are loaded, avoiding a round-trip through modprobe. It also makes sure that the drivers are either both builtin or both modular.