Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DF05FC433EF for ; Sat, 15 Jan 2022 17:44:22 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 266D283481; Sat, 15 Jan 2022 18:44:20 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="dVpU8S4+"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E586583461; Sat, 15 Jan 2022 18:44:17 +0100 (CET) Received: from mail-qk1-x732.google.com (mail-qk1-x732.google.com [IPv6:2607:f8b0:4864:20::732]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 34AF583461 for ; Sat, 15 Jan 2022 18:44:10 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qk1-x732.google.com with SMTP id u3so4311020qku.1 for ; Sat, 15 Jan 2022 09:44:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=NxPHfM3qfGlbo3UcBafAdejKC+XDGR4QMXbjJRpxJFA=; b=dVpU8S4+EtG8E4l0tE8jkYxZbk1fVfA9alCs5nntqoLv+8o4V95TBDoesWmEj1xgjl LbRXAZfrcdpDKDXexdkuYguWoH33wvhnSSZcu/kfPxtJhW2FKkvkQFfx9WyHcHQ2e7uP DldEKsVpn9G7vvgxjHLLHk9+rXN+Zcrj/W7Dd6kBKcTxwnAx17J1o3KV4Xu0/EMY0pVj noYzqYwQdiSJKNPjshXqtYhPM91P+WWpV4p3ozFODacaNCfdW4R48YLv36cdJKrR7g0W maPYLRFX+eyedTllWw7+BjxG1KcLJXfJG/kRJc+kvnmYE+okzIB2pxgwCA1Ze2Jr/eHM 8uAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=NxPHfM3qfGlbo3UcBafAdejKC+XDGR4QMXbjJRpxJFA=; b=t1yTwfXJsJkNAhJukYocfh9U8gP3hdnCX9f1GSGAy92kIjPuJomEI8pZ5PJJIk79mQ l9BC++Io5R628gzdDasw0VlryqByfJDeNu4g9m0kiYH7enTHqmil0szutDUoLf1PZm+3 uHZPtcN9iLDG+jgEd+D78EAPYUQMmFefz3H99xN2vNNr8kCFMmp6pKQ5uhwFh3rfrMwY 6kARiJYRAcO7ibj6ygE45rQ+At0OTUzGzvO2ibpXHfotqFGjzatjtBJF35Lom9iC4nfn ILDlrGtqB/THUfAXGstTCQIkrIdATa1UvW/+vhBZloeget+FMOknlc2B1RS/vlXpuYXj XCVA== X-Gm-Message-State: AOAM532A6SfOSDG5iWo/m0zuoJTXueHR9S5KM/sWgoQTXyHC6Ge2YU7M NtO9WlgxXTMzHMF2Q3d6dvM= X-Google-Smtp-Source: ABdhPJx1upr/m68Q+nfuOfxosVxDzCELcv6GH+/Kc673tcOWXFfbIxhVPZuZhJB0gehFQ5zoUDb/Ow== X-Received: by 2002:a37:7d8:: with SMTP id 207mr5085523qkh.575.1642268649002; Sat, 15 Jan 2022 09:44:09 -0800 (PST) Received: from [192.168.1.201] (pool-108-18-137-133.washdc.fios.verizon.net. [108.18.137.133]) by smtp.googlemail.com with ESMTPSA id s10sm5805048qko.104.2022.01.15.09.44.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 15 Jan 2022 09:44:08 -0800 (PST) Subject: Re: [PATCH v4 1/6] clk: actions: Introduce dummy get/set_rate callbacks To: Amit Singh Tomar , u-boot@lists.denx.de Cc: andre.przywara@arm.com, manivannan.sadhasivam@linaro.org, joe.hershberger@ni.com, jh80.chung@samsung.com, Amit Singh Tomar References: <20211128113225.3992-1-atomar25opensource@gmail.com> <20211128113225.3992-2-atomar25opensource@gmail.com> From: Sean Anderson Message-ID: Date: Sat, 15 Jan 2022 12:44:08 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <20211128113225.3992-2-atomar25opensource@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean On 11/28/21 6:32 AM, Amit Singh Tomar wrote: > From: Amit Singh Tomar > > This commit introduces get/set_rate callbacks, these are dummy at > the moment, and can be used to get/set clock for various devices > based on the clk id. > > Signed-off-by: Amit Singh Tomar > --- > Changes since v3: > * No changes. > Changes since v2: > * No changes. > Changes since previous version: > * Removed premature initialization to avoid > compiler warnings. > --- > drivers/clk/owl/clk_owl.c | 26 ++++++++++++++++++++++++++ > 1 file changed, 26 insertions(+) > > diff --git a/drivers/clk/owl/clk_owl.c b/drivers/clk/owl/clk_owl.c > index 96ab7fed1f37..f78e5fa3f08d 100644 > --- a/drivers/clk/owl/clk_owl.c > +++ b/drivers/clk/owl/clk_owl.c > @@ -128,6 +128,30 @@ int owl_clk_disable(struct clk *clk) > return 0; > } > > +static ulong owl_clk_get_rate(struct clk *clk) > +{ > + ulong rate; > + > + switch (clk->id) { > + default: > + return -ENOENT; -ENOSYS please > + } > + > + return rate; > +} > + > +static ulong owl_clk_set_rate(struct clk *clk, ulong rate) > +{ > + ulong new_rate; > + > + switch (clk->id) { > + default: > + return -ENOENT; ditto > + } > + > + return new_rate; > +} > + > static int owl_clk_probe(struct udevice *dev) > { > struct owl_clk_priv *priv = dev_get_priv(dev); > @@ -145,6 +169,8 @@ static int owl_clk_probe(struct udevice *dev) > static const struct clk_ops owl_clk_ops = { > .enable = owl_clk_enable, > .disable = owl_clk_disable, > + .get_rate = owl_clk_get_rate, > + .set_rate = owl_clk_set_rate, > }; > > static const struct udevice_id owl_clk_ids[] = { > With that fixed, Reviewed-by: Sean Anderson