Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp571015imm; Thu, 26 Jul 2018 08:21:09 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfNvNV9FtdWgekwtZLmW3wyF7MU7m7oEm2YLQncX7yh3PMJD8l5WKlx3Fzh+FXms5v9zG1n X-Received: by 2002:a17:902:48c8:: with SMTP id u8-v6mr2403671plh.152.1532618469521; Thu, 26 Jul 2018 08:21:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532618469; cv=none; d=google.com; s=arc-20160816; b=LMXgt3a7Z6WnIySgBNCQYZ9fyTMezXo4QjJX3WtdA0HKJxadVLUbGrlyn6OZaosYOn Qb4ihgRuHjX0sz6TjLtNyt3NjXoZUQkpHfPiFKNe5dJBQlZ6vGCC1XYz+V+FEX/ajvOi O4FLhE29lN5dIhY3GZUtXYkZ8CupFmwa3fRyZS66CqMepTuOYkF461XrXZmO96xMyyxL cETE3w5QJts9RHtZ/XyvI7swywrAQ2xtfkvfOtQ2GQz07J3WAtblQ+nafbY/RZouAxlx QmimG52U1BvUNDJ0Rhq8l4av534vPGoCLiej6gMLablX3i4yc5mbQOQJEl3rUdusQ0fL FaWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:subject:user-agent:message-id :references:cc:in-reply-to:from:to:content-transfer-encoding :mime-version:dkim-signature:arc-authentication-results; bh=gKMw+m46IAIUWEI7v07yQVzDT4Z7YjHBdVgVYim/B4k=; b=gQRUDttMjs1bRyhD8/ez6h5K9yHs7oZq4IXCbMdL1Sa+K/FtNrhmwgqa90Ua5y/ZmQ IA4RGFyGyMuQq8MiU1rE/bdMv9+J975g/pzRxNOiNtVvWiuleQYrvJurPc/u1aIPsUxF 7VZM+3HHqb6lN63ACHbj22nWd7pPPwTobyPEbjUGRzsRmfePHjBGzwxUpfkIONKID7AJ UMKJeJwi9FzDC3+TVqUbpuP7CIrDNVTuhvaedZCkSvDsnKfOdZ6VY/ifwXDez1GFe05O VPrnC4NYpgKBmC7k0Dkn30YpFKSYpMFAUTDOd0ah6xABRQdd7/JxeXu6YuKxPDNTn6Ka oyow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=OTomFv3t; 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 s2-v6si1353194pgc.447.2018.07.26.08.20.54; Thu, 26 Jul 2018 08:21:09 -0700 (PDT) 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=OTomFv3t; 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 S1731429AbeGZQhX (ORCPT + 99 others); Thu, 26 Jul 2018 12:37:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:34652 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729801AbeGZQhX (ORCPT ); Thu, 26 Jul 2018 12:37:23 -0400 Received: from localhost (unknown [104.132.1.75]) (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 ADAD52064D; Thu, 26 Jul 2018 15:20:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1532618403; bh=HY1O496iqHIl19/nXjgQbEAnRufG84YZKXnnEp9nMNI=; h=To:From:In-Reply-To:Cc:References:Subject:Date:From; b=OTomFv3t/81eZKza9YvimAwmwNUP+VjSyWdImmDsQjXRHBK664ED0IPZbBW4u0kkd mZ5oj0289I7nDomCHYYcOv361kJEPe74irspgbmk0pUIU8aQ9mKN7qBJuZA0KRawle M3YMl+gUVXlCH/3lNLPGwLyLijL+Eb75uIGKp2QQ= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable To: Jerome Brunet , Neil Armstrong , Yixun Lan From: Stephen Boyd In-Reply-To: <20180712211244.11428-3-yixun.lan@amlogic.com> Cc: Yixun Lan , Kevin Hilman , Carlo Caione , Michael Turquette , Rob Herring , Miquel Raynal , Boris Brezillon , Martin Blumenstingl , Liang Yang , Qiufang Dai , Jian Hu , linux-clk@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20180712211244.11428-1-yixun.lan@amlogic.com> <20180712211244.11428-3-yixun.lan@amlogic.com> Message-ID: <153261840298.48062.2497103873681297587@swboyd.mtv.corp.google.com> User-Agent: alot/0.7 Subject: Re: [PATCH v3 2/2] clk: meson: add sub MMC clock controller driver Date: Thu, 26 Jul 2018 08:20:02 -0700 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Yixun Lan (2018-07-12 14:12:44) > diff --git a/drivers/clk/meson/mmc-clkc.c b/drivers/clk/meson/mmc-clkc.c > new file mode 100644 > index 000000000000..36c4c7cd69a6 > --- /dev/null > +++ b/drivers/clk/meson/mmc-clkc.c > @@ -0,0 +1,367 @@ > +// 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 > + */ > + > +#include Is this include used? > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include "clkc.h" > + > + > +static struct clk_regmap * > +mmc_clkc_register_other_clk(struct device *dev, struct regmap *map, > + char *suffix, char *parent_suffix, > + unsigned long flags, > + const struct clk_ops *ops, void *data) > +{ > + struct clk_init_data init; > + struct clk_regmap *clk; > + char *parent; > + > + parent =3D kasprintf(GFP_KERNEL, "%s#%s", dev_name(dev), parent_s= uffix); > + if (!parent) > + return ERR_PTR(-ENOMEM); > + > + init.ops =3D ops; > + init.flags =3D flags; > + init.parent_names =3D (const char* const []){ parent, }; Can't this just be &parent? > + init.num_parents =3D 1; > + > + clk =3D mmc_clkc_register_clk(dev, map, &init, suffix, data); > + if (IS_ERR(clk)) > + dev_err(dev, "Core %s clock registration failed\n", suffi= x); > + > + kfree(parent); > + 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 *mux, *div, *core, *rx, *tx; > + > + data =3D (struct mmc_clkc_data *)of_device_get_match_data(dev); This cast is unnecessary. Pleas remove.