Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp879122pxb; Thu, 9 Sep 2021 14:26:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzLu+xGQ0qeAPLUz7riwMDw7TigNfjaw5WKAiQKv+YPXbUjw7FEcAW1jcsC72gI83gB+hJ7 X-Received: by 2002:a17:907:98ce:: with SMTP id kd14mr5643220ejc.440.1631222766447; Thu, 09 Sep 2021 14:26:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631222766; cv=none; d=google.com; s=arc-20160816; b=mIesvNwXcTEtxxd2dNnK6jDsdsBJUoBDOPtiaP1wWpSjsEl+3UYW4Kwcf7YrLqAxiu 3nS/6J6ry+6e9m21M5StjbwP+43fwNBg7wqZrqidqqQe9TBXalB7hUVw1mGqoA5FVk+M wEEZaeT0J7ZpJNFarExf8JX2qa5zKHjb4SXGvpPm0Xw2PFiWuzaSh9utwWn7etxKZjh1 FS8GC/L6i7KN2rishuajj/2gFN8KhL8cJJ52LdWHobmUDK5jVpxKF/SJxK3Hsl2eQECM 0dWW2blL8pJRh2RsAPw2u3aJI8wkVtsn7SL48bwIZcO37oNCRKiUfA3zN5q67oXglKde qKfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:message-id:date:to:cc:from:subject :references:in-reply-to:content-transfer-encoding:mime-version :dkim-signature; bh=OYUm/UJd/f+NOudX7XQfN3vUsB1+lIEDmF2Nxx86FRA=; b=mjdYgaP1GbR0wxFE5TzQmVmKSill0QaqpwGNwHw2wEAfV8yLn/cIBaYdM5PXpdGN2+ 1NQu1mfmR6zoU+SFIZlfAfl4jcXfqSt7GyyjAEa/D2HupeaR964598VxmsHtk3dwE9vy NfPAoYwIepsvS0rBlN2mCHN0AeDYMxOl1VKMPARlgQwUAZyAq627I2/gH2WY+cRwP/dp BPudAtQz/ijC/+U/69AkTVhGhi4bhD5c0oei/Ubt2sTYQpvNtDiJyShDkT2lhUX+kZvy Fm2/QVa+SdksJJN2l2Q8WbXC1xWWi7RjJaOE54qJSxr4DFF1MVhIk36WVzi35XVGM9Ld oPtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YK4RgPSS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id a17si3146970edt.41.2021.09.09.14.25.41; Thu, 09 Sep 2021 14:26:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YK4RgPSS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1346972AbhIIVWk (ORCPT + 99 others); Thu, 9 Sep 2021 17:22:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:33218 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346721AbhIIVWj (ORCPT ); Thu, 9 Sep 2021 17:22:39 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0DE7561131; Thu, 9 Sep 2021 21:21:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631222489; bh=XlELzx+Xv+i7SKcZjmeK0dXvvEjoI3jCo0u0b1yHTk8=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=YK4RgPSScdldRZ8gjAigcUg72GPOoVnJ2r6Mqegrw7YsTOhCzd6lplak2J1Q8ha1z SXZIc3kd7yXjQA5TqE4usb3v/GvfoyixO3qojt/+68YWVUmQKp84edNEUZLaz1hmhx 4NRMQ/byvYIBOCS1l4RELLd2vEakpYood8hQrVRp5FfHHtp9UZtZytheLoerAYmLi1 NGXGlS9kWRAmTJp50FSPMDOYDOmMprnEjwqGzD3cWGivp+r8EVb8xpeGIuPobSGS0p dZrW1urbysjLNLI/lKJzbPcDAuucs2TAoraBQb3WzBF5lwF+CrrK/eq6WYr12GggBw 9CR1cL4nFyi8w== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <20210909073947.17438-3-kavyasree.kotagiri@microchip.com> References: <20210909073947.17438-1-kavyasree.kotagiri@microchip.com> <20210909073947.17438-3-kavyasree.kotagiri@microchip.com> Subject: Re: [PATCH v3 2/3] clk: lan966x: Add lan966x SoC clock driver From: Stephen Boyd Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-clk@vger.kernel.org, UNGLinuxDriver@microchip.com, Eugen.Hristev@microchip.com, Kavyasree.Kotagiri@microchip.com, Manohar.Puri@microchip.com To: Kavyasree Kotagiri , mturquette@baylibre.com, robh+dt@kernel.org Date: Thu, 09 Sep 2021 14:21:27 -0700 Message-ID: <163122248779.1821005.1043993148772937495@swboyd.mtv.corp.google.com> User-Agent: alot/0.9.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Kavyasree Kotagiri (2021-09-09 00:39:46) > diff --git a/drivers/clk/clk-lan966x.c b/drivers/clk/clk-lan966x.c > new file mode 100644 > index 000000000000..4492be90cecf > --- /dev/null > +++ b/drivers/clk/clk-lan966x.c > @@ -0,0 +1,235 @@ > +// SPDX-License-Identifier: GPL-2.0-or-later > +/* > + * Microchip LAN966x SoC Clock driver. > + * > + * Copyright (C) 2021 Microchip Technology, Inc. and its subsidiaries > + * > + * Author: Kavyasree Kotagiri > + */ > + > +#include > +#include > +#include > +#include > +#include > +#include [...] > + > +static int lan966x_clk_probe(struct platform_device *pdev) > +{ > + struct clk_hw_onecell_data *hw_data; > + struct device *dev =3D &pdev->dev; > + const char *parent_names[3]; > + int i, ret; > + > + hw_data =3D devm_kzalloc(dev, sizeof(*hw_data), GFP_KERNEL); > + if (!hw_data) > + return -ENOMEM; > + > + base =3D devm_platform_ioremap_resource(pdev, 0); > + if (IS_ERR(base)) > + return PTR_ERR(base); > + > + init.ops =3D &lan966x_gck_ops; > + init.num_parents =3D 3; > + > + for (i =3D 0; i < init.num_parents; ++i) { > + parent_names[i] =3D of_clk_get_parent_name(pdev->dev.of_n= ode, i); Please use clk_parent_data instead of of_clk_get_parent_name(). > + if (!parent_names[i]) > + return -EINVAL; > + } > + > + init.parent_names =3D parent_names; > + hw_data->num =3D N_CLOCKS; > + > + for (i =3D 0; i < N_CLOCKS; i++) { > + init.name =3D clk_names[i]; > + hw_data->hws[i] =3D lan966x_gck_clk_register(dev, i); > + if (IS_ERR(hw_data->hws[i])) { > + dev_err(dev, "failed to register %s clock\n", > + init.name); > + return ret; return PTR_ERR(hw_data->hws[i]); > + } > + } > + > + return devm_of_clk_add_hw_provider(dev, of_clk_hw_onecell_get, hw= _data); > +} > + > +static const struct of_device_id lan966x_clk_dt_ids[] =3D { > + { .compatible =3D "microchip,lan966x-gck", }, > + { } > +};