Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1253813imu; Wed, 9 Jan 2019 14:37:07 -0800 (PST) X-Google-Smtp-Source: ALg8bN5u8rnMCi2hX5Nrot6CcizE6PBoz4CsRUCqAEACUxrbpf1QfmpXSEP84p65Hd1ghoDd/m17 X-Received: by 2002:a63:24c2:: with SMTP id k185mr6857715pgk.406.1547073427739; Wed, 09 Jan 2019 14:37:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547073427; cv=none; d=google.com; s=arc-20160816; b=g+K5uTQVBWSP65JBCEmSAxFk0PUxEwgZW/IFJgKx6rLdkmXbUXD2e+vKCcBAK68oPg M99etaUTozEYJ0EC9IEG/DRrXyUYu8z9zpayPhS0iqFYT4fuqBDjzhfnXUmHaVxMOUx9 7xj47/bHXrUON/wH9TqSwnLc36yWW2uByWNjYmxw6VbXah0ozDSrkCEMApyZhWmrey8i qRAqsYXF4OH5jyf7cSe0pU0l8grl7W/72d0aimYBxcu4tYe2ltCnkrdWzNEKaV93u3jy sy/DD41tviWK9sRGE8O65CQneZkQZHZLz2ks3XxtftwGdjWwHbK4Zw8uKvmML/GdT06O +DWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:message-id:references:user-agent :from:in-reply-to:to:cc:subject:content-transfer-encoding :mime-version:dkim-signature; bh=EJyPD2OPnvBGEGMumgnxaeyA0ZfGF+FI7jo0NBqQHSE=; b=x+xzoHfxi/pLoDyplKRwNbEBgiwDntaa2iwMz9dSgJztodwRl6UgdoxmYxSJv0kJYv ZktUnKkSYMxCI3AnLZ2ZNSIqdHRnfi76sb1VddZSw4J0kQ2LBZBBwQIqI71yiOulKcoP 5AZNlGuNzapD3AzgxUn/7j20uIAB5AGRZW1sKvECVir0RRYyflw33bjBgazp2TFUqX3F Fg9v4u+WtMhW65aTGtxPDkxBtBA2AsJKXe06y5nAwsSrMVmTaByat6A3flHsWPJj36Wd /tbW3K7KjjIldzPHIfV71gvj6GYitT8y3herH02ArjoajG/CPKVklfzP01RlyhoLPGqV Ooeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=RzUey9Nk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f24si10891882pgj.315.2019.01.09.14.36.49; Wed, 09 Jan 2019 14:37:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=RzUey9Nk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1727024AbfAIUs7 (ORCPT + 99 others); Wed, 9 Jan 2019 15:48:59 -0500 Received: from mail.kernel.org ([198.145.29.99]:54718 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726422AbfAIUs7 (ORCPT ); Wed, 9 Jan 2019 15:48:59 -0500 Received: from localhost (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 0549D206B7; Wed, 9 Jan 2019 20:48:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1547066938; bh=cb0SYlVzLEaJ/SdiLk39dlCFU+6Ho8pDktRsskgpI9o=; h=Subject:Cc:To:In-Reply-To:From:References:Date:From; b=RzUey9NkunWOHBzLzzBYeFXcQ6tvuKr3e1L5WoqF9VG2Gajz1G/JZN6yxYhI0yGxn dQokodwVbFtGDELH7FgVJlGXhcfm8Ih48iKGOovTtnFyC77ohAbPPjWWnF5n1h2nnT PsnhuhCaSvtcuHMEEuTRQC/KP5zzLp+HuYJOnKvI= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: Re: [PATCH v8 4/4] clk: meson: add sub MMC clock controller driver Cc: Yixun Lan , Jianxin Pan , Kevin Hilman , Carlo Caione , Michael Turquette , Rob Herring , Miquel Raynal , Boris Brezillon , Martin Blumenstingl , Liang Yang , Jian Hu , Qiufang Dai , Hanjie Lin , Victor Wan , linux-clk@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org To: Jerome Brunet , Jianxin Pan , Neil Armstrong In-Reply-To: <1545063850-21504-5-git-send-email-jianxin.pan@amlogic.com> From: Stephen Boyd User-Agent: alot/0.8 References: <1545063850-21504-1-git-send-email-jianxin.pan@amlogic.com> <1545063850-21504-5-git-send-email-jianxin.pan@amlogic.com> Message-ID: <154706693724.15366.10802936604309826132@swboyd.mtv.corp.google.com> Date: Wed, 09 Jan 2019 12:48:57 -0800 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Jianxin Pan (2018-12-17 08:24:10) > diff --git a/drivers/clk/meson/mmc-clkc.c b/drivers/clk/meson/mmc-clkc.c > new file mode 100644 > index 0000000..2582a98 > --- /dev/null > +++ b/drivers/clk/meson/mmc-clkc.c > @@ -0,0 +1,304 @@ > +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) > +/* > + * Amlogic Meson MMC Sub Clock Controller Driver > + * > + * Copyright (c) 2017 Baylibre SAS. > + * Author: Jerome Brunet > + * > + * Copyright (c) 2018 Amlogic, inc. > + * Author: Yixun Lan > + * Author: Jianxin Pan > + */ > + > +#include Do you need this include? > +#include > +#include > +#include > +#include > +#include > +#include Is this used? > +#include [...] > + init.num_parents =3D 1; > + > + clk =3D mmc_clkc_register_clk(dev, map, &init, suffix, data); > + if (IS_ERR(clk)) > + dev_err(dev, "%s clock registration failed\n", suffix); > + > + return clk; > +} > + > +static int mmc_clkc_probe(struct platform_device *pdev) > +{ > + struct clk_hw_onecell_data *onecell_data; > + struct device *dev =3D &pdev->dev; > + struct mmc_clkc_data *data; > + struct regmap *map; > + struct clk_regmap *clk, *core; > + struct meson_sclk_div_data *div_data; > + > + /*cast to drop the const in match->data*/ > + data =3D (struct mmc_clkc_data *)of_device_get_match_data(dev); Is that necessary? Maybe the users of this should take a const argument and copy things? > + if (!data) > + return -ENODEV; > + > + map =3D syscon_node_to_regmap(dev->of_node); > + if (IS_ERR(map)) { > + dev_err(dev, "could not find mmc clock controller\n"); > + return PTR_ERR(map); > + } > + > + onecell_data =3D devm_kzalloc(dev, sizeof(*onecell_data) + > + sizeof(*onecell_data->hws) * MMC_MAX_= CLKS, struct_size()?