Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp1491016rwi; Thu, 27 Oct 2022 16:57:43 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5ftX2h+cLftHZSArNgoQlOd0dZh/bMYzlgrHe7A2WAvj28kcTMNN7RwkW75JFxKxXlCrF/ X-Received: by 2002:a17:902:ebc7:b0:17e:7378:1da8 with SMTP id p7-20020a170902ebc700b0017e73781da8mr52282813plg.152.1666915063496; Thu, 27 Oct 2022 16:57:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666915063; cv=none; d=google.com; s=arc-20160816; b=ISbIDwt7VIwv1MfnKBQk2CisDJiDysk5ulXrjz/t5uWTJv4JYqSDhIOsfuoWBqCP8A f1Wc4PyRn2dReGeFBJzgs7sABpUf3U538NBqOfzJhcV9rK7eHWIkQrIznLuQLtZazhKt x00XV5W2mT5d3VlSodusjF4+LD2hdiCQwMJoQIAPtdMqW2RckqmziJ65pwTmOBYhAcue 7GevCTo2B1J9zI+x42eNedPJsUAhouNmxuQye+B/9uPkcKCuuRNVWA6qCvKpaCI9nb1k 0x0i28p66oj0K5leKMu6I6DFJKPuFyNjlPqMwQZyFsQdy/ABvoOxtWGzF3g+fOpLXKrO fHEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:user-agent:date:to:cc:from:subject :references:in-reply-to:content-transfer-encoding:mime-version :dkim-signature; bh=paXHZ98aSyfJJ6v60WHxASXnANWrRePFDt5trqmw3pk=; b=K6ymC7GeGO6f8a47lFOurzEfAVmEajfYWVKzoGInoiSAxDp+sLfesIMDKrgbbdlbzr RgFSm/e1vByQmGFGaIu0U5BJQC22LcOilf5SPjgHVf3hJxWVXtgKZIHsusM3KMcol1RD fAIGw8m8fw98TSKCgRMtKdYuZVovTe3KTbG0iyFw88sRol5zl9bHfqmqxxi2oBZ+I13Z 7bIxLvK4O+aPnw9X7K/Bb6oH2QMw0eYRshdNQQd9/OWd4VuC0F/12RNGy1TDLHB+7E0Y fwtRU2QdFQzDg78ayIlooCLNFCm33GuMGW+/WZsFvZLDL57O1ExY3Mu96dYz/VoTp3B8 aUQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oXT8YtNr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o12-20020a1709026b0c00b00186940d7eaasi3065761plk.31.2022.10.27.16.57.31; Thu, 27 Oct 2022 16:57:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oXT8YtNr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235404AbiJ0Xq1 (ORCPT + 99 others); Thu, 27 Oct 2022 19:46:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51352 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234966AbiJ0XqZ (ORCPT ); Thu, 27 Oct 2022 19:46:25 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A68645BC23; Thu, 27 Oct 2022 16:46:24 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 73843B82719; Thu, 27 Oct 2022 23:46:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 14589C433D6; Thu, 27 Oct 2022 23:46:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1666914382; bh=vKyUpa6z1uRmhJcURUFkFkbLGb/GBvfWEJCcrU7tfqo=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=oXT8YtNrSRdfCCoSqjJfjvVD/CTH2tdzsgPEioQDOkJy0Wa41Ye/QlHnbD8jD5pvQ EMNq+ymHApj/JfjgbVPtTdAt3wVL9QWLKOuu4RGnfwTyPRBRy6e7kgX+bsZjrc1BNo 0N1rt2MeucxNHbsQo0Egvw4AFBW5q1dAWqt6XhiWoT3+8Dj/1bElZqIzwTZFWjXlLI U2xBEEAq0H+3fcJBsUPW/+UG3mNYA7Y8EHwRZP3tqNz2r4eJt/U0fiv0O3icebuYFg 4JMc0SvGf6kTBfU5CHDJ4w5DGxjOQU5yVCz8SX8R38gXtmtDfd0v/nFHftkj3ibdpi OrQpBXaRcNU4g== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <20221021104804.21391-3-rex-bc.chen@mediatek.com> References: <20221021104804.21391-1-rex-bc.chen@mediatek.com> <20221021104804.21391-3-rex-bc.chen@mediatek.com> Subject: Re: [PATCH v6 2/3] clk: mediatek: Add auxiliary bus support for sysclk reset From: Stephen Boyd Cc: runyang.chen@mediatek.com, miles.chen@mediatek.com, wenst@chromium.org, angelogioacchino.delregno@collabora.com, nfraprado@collabora.com, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Project_Global_Chrome_Upstream_Group@mediatek.com, Bo-Chen Chen To: Bo-Chen Chen , matthias.bgg@gmail.com, mturquette@baylibre.com, p.zabel@pengutronix.de Date: Thu, 27 Oct 2022 16:46:19 -0700 User-Agent: alot/0.10 Message-Id: <20221027234622.14589C433D6@smtp.kernel.org> X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Bo-Chen Chen (2022-10-21 03:48:03) > diff --git a/drivers/clk/mediatek/clk-mtk.c b/drivers/clk/mediatek/clk-mt= k.c > index 74408849ed86..61b7ee23738a 100644 > --- a/drivers/clk/mediatek/clk-mtk.c > +++ b/drivers/clk/mediatek/clk-mtk.c > @@ -444,6 +444,63 @@ void mtk_clk_unregister_dividers(const struct mtk_cl= k_divider *mcds, int num, [..] > +int mtk_reset_controller_register(struct device *dev, const char *name) > +{ > + struct auxiliary_device *adev; > + int ret; > + > + adev =3D mtk_reset_adev_alloc(dev, name); > + if (IS_ERR(adev)) > + return PTR_ERR(adev); > + > + ret =3D auxiliary_device_add(adev); > + if (ret) { > + auxiliary_device_uninit(adev); > + return ret; > + } > + > + return devm_add_action_or_reset(dev, mtk_reset_unregister_adev, a= dev); Can we have devm_auxiliary_device_add() that sets the parent and registers the device?