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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 58841ECAAA1 for ; Thu, 27 Oct 2022 23:47:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Message-Id:Date:To:Cc:From:Subject: References:In-Reply-To:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=4Bfqzt8+UA3X0iE57iHEfXOkpRc9Pt8pVtDwWioU8so=; b=cX2wYp4Hj4FaCn kkOWrf/2ftmOk6v9kJ3MZXlXTC8kbDdJ4BVmrUn33paQxhKeBI7/s1fAYUWalhZLskS05OwnqvtiA nrpRipc22hSFs3DG6JHpDvXp8Oy+chcKTPl1StogncMmZ6DVPhg8JNOwY4piQme2UskGuenGn8jZY wvrcDKCtGjiKg9t731IDwYQMskiy843kvBB1MQ7aaqpzFbimZcQ2rmweYkhxXSAKo5pKFkeDNmWEh 7ArworlkEOpxuwEEcKxGLFwUrkIBf+gOCTG6yQ6aYqVmrdi6fWMP1PbZBWNWwwQ9YVxSZEgLHZoTY e2qv0aCaVFS65W95XhiA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ooCZx-00FFq3-F9; Thu, 27 Oct 2022 23:46:29 +0000 Received: from sin.source.kernel.org ([145.40.73.55]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ooCZu-00FFpT-LV; Thu, 27 Oct 2022 23:46:28 +0000 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 sin.source.kernel.org (Postfix) with ESMTPS id D0913CE2907; 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== MIME-Version: 1.0 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221027_164626_897185_E963DCD8 X-CRM114-Status: GOOD ( 11.88 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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-mtk.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_clk_divider *mcds, int num, [..] > +int mtk_reset_controller_register(struct device *dev, const char *name) > +{ > + struct auxiliary_device *adev; > + int ret; > + > + adev = mtk_reset_adev_alloc(dev, name); > + if (IS_ERR(adev)) > + return PTR_ERR(adev); > + > + ret = auxiliary_device_add(adev); > + if (ret) { > + auxiliary_device_uninit(adev); > + return ret; > + } > + > + return devm_add_action_or_reset(dev, mtk_reset_unregister_adev, adev); Can we have devm_auxiliary_device_add() that sets the parent and registers the device? _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel