From mboxrd@z Thu Jan 1 00:00:00 1970 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 6B213C433F5 for ; Fri, 3 Dec 2021 08:19:01 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2F63D80FCC; Fri, 3 Dec 2021 09:18:58 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org 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=kernel.org header.i=@kernel.org header.b="FYkO3w9h"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6745680202; Fri, 3 Dec 2021 09:18:56 +0100 (CET) Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id EEBFD80FD9 for ; Fri, 3 Dec 2021 09:18:52 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=kristo@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id D8ABC62936; Fri, 3 Dec 2021 08:18:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 44BB1C53FC7; Fri, 3 Dec 2021 08:18:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1638519530; bh=Bvum6N+HiteEpvOB9tbrlmG1EGTxcUZC6hhNCXwZ7BE=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=FYkO3w9hcS6YSnX2bzdRrag4efZOOgLTirpZGVLAYNDX/7YC9h7dMECN2ERreZJdE 2CKvDhLb7IOypLk5pjzXn05+pMjDyNiRXo9X18UfeOWaMyG2zkWzKe592MhpPm+PSf 02FGuMd+PQfIPH1FBWuGXcfXsEYhiAhARE5sZBZ+z0GG2iMwYf6OgHZ7GF9ZEkFxME h+7flOSsyxM6JVaGraGvUGtaL+RjIBx5lnxBQTQl0BIG5S53IKJqisIpYsOpKSkz1g SFSKqUxqeOVLFjy6WZ1HeX5gLtcZuYYoBdFK3lT2AlBdsXkSbJNOEfvAfZsvQh9vND qChB0QKPoGhiA== Subject: Re: [PATCH 1/2] clk: cdce9xx: Convert .of_xlate to .request To: Sean Anderson , Tom Rini Cc: u-boot@lists.denx.de, Lukasz Majewski References: <20211201194403.2172991-1-seanga2@gmail.com> <20211201200810.GK1220664@bill-the-cat> <2034c66c-c39b-481a-3e7f-435208cab3ff@gmail.com> From: Tero Kristo Message-ID: <650db70d-5ae9-aaa8-6a51-ad3d0cb4f5ad@kernel.org> Date: Fri, 3 Dec 2021 10:18:46 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <2034c66c-c39b-481a-3e7f-435208cab3ff@gmail.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.38 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 01/12/2021 22:10, Sean Anderson wrote: > On 12/1/21 3:08 PM, Tom Rini wrote: >> On Wed, Dec 01, 2021 at 02:44:02PM -0500, Sean Anderson wrote: >> >>> This xlate function just performs some checking. We can do this in >>> request() instead and use the default xlate. >>> >>> Signed-off-by: Sean Anderson Hi Sean, Did you compile this? I see... >>> --- >>> >>>   drivers/clk/clk-cdce9xx.c | 12 +++--------- >>>   1 file changed, 3 insertions(+), 9 deletions(-) >>> >>> diff --git a/drivers/clk/clk-cdce9xx.c b/drivers/clk/clk-cdce9xx.c >>> index 6634b7b799..c15e9f210e 100644 >>> --- a/drivers/clk/clk-cdce9xx.c >>> +++ b/drivers/clk/clk-cdce9xx.c >>> @@ -86,19 +86,13 @@ static int cdce9xx_reg_write(struct udevice *dev, >>> u8 addr, u8 val) >>>       return ret; >>>   } >>> -static int cdce9xx_clk_of_xlate(struct clk *clk, >>> -                struct ofnode_phandle_args *args) >>> +static int cdce9xx_clk_of_request(struct clk *clk) cdce9xx_clk_of_request here... >>>   { >>>       struct cdce9xx_clk_data *data = dev_get_priv(clk->dev); >>> -    if (args->args_count != 1) >>> +    if (clk->id > data->chip->num_outputs) >>>           return -EINVAL; >>> -    if (args->args[0] > data->chip->num_outputs) >>> -        return -EINVAL; >>> - >>> -    clk->id = args->args[0]; >>> - >>>       return 0; >>>   } >>> @@ -241,7 +235,7 @@ static const struct udevice_id >>> cdce9xx_clk_of_match[] = { >>>   }; >>>   static const struct clk_ops cdce9xx_clk_ops = { >>> -    .of_xlate = cdce9xx_clk_of_xlate, >>> +    .request = cdce9xx_clk_request, but cdce9xx_clk_request here. Other than that, looks fine to me. -Tero >>>       .get_rate = cdce9xx_clk_get_rate, >>>       .set_rate = cdce9xx_clk_set_rate, >>>   }; >> >> Adding Tero... >> > > Thanks. Perhaps .mailmap should be updated? > > --Sean