Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp2426451ybc; Wed, 13 Nov 2019 14:18:13 -0800 (PST) X-Google-Smtp-Source: APXvYqyieBOXRbo6CsgJsvPbplIPPONItqjbNC8KjkOpGZrs4RlfoNoNPz96BEt3VvN8WyjX3OGS X-Received: by 2002:a50:fc18:: with SMTP id i24mr6312680edr.41.1573683493622; Wed, 13 Nov 2019 14:18:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573683493; cv=none; d=google.com; s=arc-20160816; b=CCRB3aRcpqJT/Oy9Szk+cRFbaPnutjUBx/6nTlwdy5Pdn5E64qIROuXN8ajw2yTAfJ MSy0/KQ7qQ+ogOVSRNLJ7Bh0lV9o86W6E5m3x96LX9bHA1X8QA0uOasYVHiKik9tA9ZF uW7ed2/xhmSMbkqKBSz350+FzfOrfsCPPnH4HxGwcoitQE4jA/GLRxLKN9ubhZnhXX56 n5oQPF6G1cT0IMp2KcOMORro7wAiW95NBvrFkKml2KCm4Go3QPUeowvtRQ9NoQT+/p9a NgzcHhuNYZUWcF1SBHPZqEWULwirbcnJIDkPSuQrooVOzXc4kakZNKlUsa+44cswMjwq z+qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:user-agent:subject:from :to:cc:references:in-reply-to:content-transfer-encoding:mime-version :dkim-signature; bh=fDby5Bt9hQRFpOQ8L7uLl9tin5U1B4T6WhIUp8rSetg=; b=VnJVSo5mY5pKN7uHZUXXdm7eSVFO2dx6oJtVuZXS/BS36Sxje0YWRZRoleXg2xgfeQ f//NpxhY+nPTfStG0DMpSgEmme6ln+oo7rBOZbftrIFjjlxDjntvkINHPZQvxKHzP3ne 8L/Dl2MFXUYaMBEjdK9nkh/098BMbdPvapkzggWTNsCOM4bxgBKdC6Kvikh2z5jq4OKV d4OtaR4xHXPAWc+iss2iF/RX7wLsp1+6o137Wa0JK29q3k3dMcm+s85NkcYrPmkc9Oz/ JbtCMYwlAlaualIM+5fQ872zlLM/Nre3qsG9XYGXMjGPwACj+70Of+oqDTMm0PgponAH assA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ntlvFKWn; 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 k35si2479699edb.84.2019.11.13.14.17.48; Wed, 13 Nov 2019 14:18:13 -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=ntlvFKWn; 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 S1727041AbfKMWPa (ORCPT + 99 others); Wed, 13 Nov 2019 17:15:30 -0500 Received: from mail.kernel.org ([198.145.29.99]:49434 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726189AbfKMWPa (ORCPT ); Wed, 13 Nov 2019 17:15:30 -0500 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 5CAD9206E3; Wed, 13 Nov 2019 22:15:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573683330; bh=CoxUo/aSepDBO7izp9qrDJUrGpD/En80chyDGPOhMV0=; h=In-Reply-To:References:Cc:To:From:Subject:Date:From; b=ntlvFKWnLpHku9jHgRoJH4W5VoSQD0haBcfRADrXRuOXVDhDhoYY5H7aZFLkmFMNp gf+lIRnxVJbdsyZkEdW+9mJcbWOrKAPubzNP+ll1w+Ac0HmwWDMd7w/klUgoD1IU+4 wJDt0ef0I6Yzu6Y/XPgImpAeBs6I/4E0A7osNS8A= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <20191025111338.27324-2-chunyan.zhang@unisoc.com> References: <20191025111338.27324-1-chunyan.zhang@unisoc.com> <20191025111338.27324-2-chunyan.zhang@unisoc.com> Cc: linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Orson Zhai , Baolin Wang , Chunyan Zhang , Xiaolong Zhang , Chunyan Zhang To: Chunyan Zhang , Mark Rutland , Michael Turquette , Rob Herring From: Stephen Boyd Subject: Re: [PATCH 1/5] clk: sprd: add gate for pll clocks User-Agent: alot/0.8.1 Date: Wed, 13 Nov 2019 14:15:28 -0800 Message-Id: <20191113221530.5CAD9206E3@mail.kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Chunyan Zhang (2019-10-25 04:13:34) > diff --git a/drivers/clk/sprd/gate.c b/drivers/clk/sprd/gate.c > index f59d1936b412..d8b480f852f3 100644 > --- a/drivers/clk/sprd/gate.c > +++ b/drivers/clk/sprd/gate.c > @@ -109,3 +120,11 @@ const struct clk_ops sprd_sc_gate_ops =3D { > }; > EXPORT_SYMBOL_GPL(sprd_sc_gate_ops); > =20 > +#define sprd_pll_sc_gate_unprepare sprd_sc_gate_disable Why is there a redefine? Just use the function where it is. > + > +const struct clk_ops sprd_pll_sc_gate_ops =3D { > + .unprepare =3D sprd_pll_sc_gate_unprepare, > + .prepare =3D sprd_pll_sc_gate_prepare, > + .is_enabled =3D sprd_gate_is_enabled, > +}; > +EXPORT_SYMBOL_GPL(sprd_pll_sc_gate_ops); > diff --git a/drivers/clk/sprd/gate.h b/drivers/clk/sprd/gate.h > index dc352ea55e1f..598ce607ca0a 100644 > --- a/drivers/clk/sprd/gate.h > +++ b/drivers/clk/sprd/gate.h > @@ -14,16 +14,19 @@ struct sprd_gate { > u32 enable_mask; > u16 flags; > u16 sc_offset; > + u32 udelay; Does the delay need to be 32 bits wide? Maybe a u8 or u16 will work? Otherwise, make it an unsigned long please because the bit width doesn't matter.