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 X-Spam-Level: X-Spam-Status: No, score=-1.2 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, UNWANTED_LANGUAGE_BODY autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 57E39C5518B for ; Wed, 22 Apr 2020 18:38:54 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 20B8D2075A for ; Wed, 22 Apr 2020 18:38:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Ra8gCqnO"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="IsPzmCPm" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 20B8D2075A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Message-ID:Date:To: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=4UjXiscrGY3ByK/0X2Fx16n2WeVF6OQlBQ0S5kZH1aE=; b=Ra8gCqnO7gK1F2 dN8zss8Oh9be2AOnliyITEaZgPoEkRGux3eX58iyJCT+8pIXHT8L/WjnKJ3OYQWvM9TuVH1jwBFb+ iAoLeHogsKi4WD0HavoQSr4+D5KkXWk9HqYm+HVJ7HVFKLxplaj+2c+dS9Ex9lGW9Y99TEBG+V7zq zKxNJwbjEJLB9W2Sj4e99vrOETivin0i9yKp8V/qkLS+LQ5VMnqwZGzR8d7hJ+eDQgNvrSFdo3WG3 rF5BJmOqvq5NkefTWvlJGsex9fbza/QWuQEIZ9eTQiJxoAc+tGbFV7d09Doe5Vn2Cix5nRtDghVvP b/mXCJ44uVG02jNOTW1Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jRKGr-0000qI-OW; Wed, 22 Apr 2020 18:38:53 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jRKGo-0000oq-Ie for linux-arm-kernel@lists.infradead.org; Wed, 22 Apr 2020 18:38:51 +0000 Received: from kernel.org (unknown [104.132.0.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2F2232075A; Wed, 22 Apr 2020 18:38:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587580730; bh=4RCEebdN3SKWIn8s+iOr8Vy+art0cBYVk74ItwVQ2+A=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=IsPzmCPmtlUBuzteTciUbcrZ+myoeIhym7uyO31Lm1heXh91RcZXgoFM2GesTo2/x lNfd2eyXs4cvWB3UVN+kaxMPF0qyl1tUL/AUfOgRnGqugkQR2mx1WUiBLT79VZErhA PZFpoXbBaICpEeWotJvbvVzT3gUvp6le2EDMvnzU= MIME-Version: 1.0 In-Reply-To: <1586937773-5836-10-git-send-email-abel.vesa@nxp.com> References: <1586937773-5836-1-git-send-email-abel.vesa@nxp.com> <1586937773-5836-10-git-send-email-abel.vesa@nxp.com> Subject: Re: [PATCH v3 09/13] clk: imx: Add audiomix clock controller support From: Stephen Boyd To: Abel Vesa , Anson Huang , Jacky Bai , Lee Jones , Leonard Crestez , Peng Fan , Philipp Zabel , Sascha Hauer , Shawn Guo Date: Wed, 22 Apr 2020 11:38:49 -0700 Message-ID: <158758072945.163502.17393357985434075011@swboyd.mtv.corp.google.com> User-Agent: alot/0.9 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200422_113850_657481_FA9C6899 X-CRM114-Status: GOOD ( 13.24 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Abel Vesa , Linux Kernel Mailing List , NXP Linux Team , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Quoting Abel Vesa (2020-04-15 01:02:49) > diff --git a/drivers/clk/imx/clk-audiomix.c b/drivers/clk/imx/clk-audiomix.c > new file mode 100644 > index 00000000..aa48b06 > --- /dev/null > +++ b/drivers/clk/imx/clk-audiomix.c > @@ -0,0 +1,175 @@ > +// SPDX-License-Identifier: GPL-2.0-only > +/* > + * Copyright 2019 NXP. > + */ > + > +#include > +#include Include because this is a clk provider. > +#include > +#include > +#include > +#include > +#include > +#include > +#include Is this include used? > +#include > +#include > + > +#include "clk.h" > + > +static int shared_count_pdm; > +static struct clk_hw **hws; > +static struct clk_hw_onecell_data *clk_hw_data; > +static uint32_t audiomix_clk_saved_regs[14]; > +static struct clk *clk_audio_root; > +static struct clk *clk_audio_ahb; > +static struct clk *clk_audio_axi_div; > + > +static const struct imx_pll14xx_rate_table imx_audiomix_sai_pll_tbl[] = { > + PLL_1443X_RATE(650000000U, 325, 3, 2, 0), > +}; > + > +static const struct imx_pll14xx_clk imx_audiomix_sai_pll = { > + .type = PLL_1443X, > + .rate_table = imx_audiomix_sai_pll_tbl, > +}; > + > +static const char * const imx_sai_mclk2_sels[] = {"sai1", "sai2", "sai3", "dummy", > + "sai5", "sai6", "sai7", "dummy", > + "dummy", "dummy", "dummy", > + "dummy", "dummy", "dummy", "dummy"}; > +static const char * const imx_sai1_mclk1_sels[] = {"sai1", "dummy", }; > +static const char * const imx_sai2_mclk1_sels[] = {"sai2", "dummy", }; > +static const char * const imx_sai3_mclk1_sels[] = {"sai3", "dummy", }; > +static const char * const imx_sai5_mclk1_sels[] = {"sai5", "dummy", }; > +static const char * const imx_sai6_mclk1_sels[] = {"sai6", "dummy", }; > +static const char * const imx_sai7_mclk1_sels[] = {"sai7", "dummy", }; > +static const char * const imx_pdm_sels[] = {"pdm", "sai_pll_div2", "dummy", "dummy" }; > +static const char * const imx_sai_pll_ref_sels[] = {"osc_24m", "dummy", "dummy", "dummy", }; > +static const char * const imx_sai_pll_bypass_sels[] = {"sai_pll", "sai_pll_ref_sel", }; > + > +static int imx_audiomix_clk_probe(struct platform_device *pdev) [..] > + > + /* unbypass the pll */ > + clk_hw_set_parent(hws[IMX8MP_CLK_AUDIOMIX_SAI_PLL_BYPASS], > + hws[IMX8MP_CLK_AUDIOMIX_SAI_PLL]); > + > + imx_check_clk_hws(hws, IMX8MP_CLK_AUDIOMIX_END); > + > + of_clk_add_hw_provider(dev->of_node, of_clk_hw_onecell_get, > + clk_hw_data); What if this fails? > + > + return 0; > +} > + > +static const struct of_device_id imx_audiomix_clk_of_match[] = { > + { .compatible = "fsl,imx8mp-audiomix-clk" }, > + { /* Sentinel */ } > +}; > +MODULE_DEVICE_TABLE(of, imx_audiomix_clk_of_match); > + > + Nitpick: Remove double newline? > +static struct platform_driver imx_audiomix_clk_driver = { > + .probe = imx_audiomix_clk_probe, > + .driver = { > + .name = "imx-audiomix-clk", > + .of_match_table = of_match_ptr(imx_audiomix_clk_of_match), Add suppress_bind_attr here so that this can't be removed from userspace? > + }, > +}; > +module_platform_driver(imx_audiomix_clk_driver); _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel