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 9B4ADC433F5 for ; Wed, 1 Dec 2021 20:10:41 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 57FB5830C4; Wed, 1 Dec 2021 21:10:39 +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="AESHwvFC"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C29EF830D0; Wed, 1 Dec 2021 21:10:36 +0100 (CET) Received: from mail-qv1-xf2c.google.com (mail-qv1-xf2c.google.com [IPv6:2607:f8b0:4864:20::f2c]) (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 466CC830C0 for ; Wed, 1 Dec 2021 21:10:33 +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-qv1-xf2c.google.com with SMTP id a24so22845664qvb.5 for ; Wed, 01 Dec 2021 12:10:33 -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=P1r57zeYGYXN8JuGvkS9H542uyAUOkBSB1n/jgxuQgY=; b=AESHwvFCG8L9eDd/Y03HhfM6CvEQR8tfTTqxmNBGw2oiOftfLOqIHDNerZ6JjdUGax sxNfPUIGThDaKwunCwKhzOY/1UkT2AqvSEggXlY7ZmfF3y+U8F70RFlezw5MAhmQ97Kz bxCNM069lvjylS5KitAEsaU3JpTrZljF1S459U1qsaD6BcQyYHGXpaWvhVejb6yMSnpK kvwUdcP9kQ7p7OPUFTVO9cNFXPCagZmhNFso2FUeEhDbd74lvyDPL3JXTgTqb9GJYTeu p6efPGc2QKgzuNqZTLeY+h/l9KShGL8VGkacda36rczx0alSHJZesOg8bsy5kxD7/3at r0ng== 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=P1r57zeYGYXN8JuGvkS9H542uyAUOkBSB1n/jgxuQgY=; b=eK5qjnSAa78kpOVW716SCsyaJknYJIfE6DwwOk4wtNEUA0A7RkEllm/MxLEJlRLfPA MNYaNzeUJD2wt3smDGX4GbZ7fcszxaI7LPLCVSf21Ob5py6Ws1VeNfWb2UgbBFap1S9N V3TT3wQAqrzQkoZhzmkFblzpZVLtXxjH0Nj0OasYiTWxbHTyNLaU/1jD0tH0nuoee7bq KDbUS31pq2jf7stzG5syYVeOB8NDEKyNaIJUtYpdl+S3Do41ceQP9k4lIC8gDLRrKwv+ gJLpZtLcWZL+T0AxSlswOR132Vcxmp3bvk0HL3AEQ8sifFp+2mK1/hL0IttXsAVbVhUi Xvtw== X-Gm-Message-State: AOAM530yuENBacK4nC2Rlnz/r1bHrV5YK8y4P4JUqnu6DgZIJOwNyBT7 sYIvnvS645g1HfdE1UNBhns= X-Google-Smtp-Source: ABdhPJzo+wNMXy7r+E0D//7p5vUlH52oLsZGQ7pnlRB+wePksUXwCzfZ1/8EqB3RapoYYrolOQZCOw== X-Received: by 2002:a05:6214:d0e:: with SMTP id 14mr8635478qvh.26.1638389432181; Wed, 01 Dec 2021 12:10:32 -0800 (PST) Received: from [192.168.1.201] (pool-108-18-207-184.washdc.fios.verizon.net. [108.18.207.184]) by smtp.googlemail.com with ESMTPSA id o1sm421301qtw.1.2021.12.01.12.10.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 01 Dec 2021 12:10:31 -0800 (PST) Subject: Re: [PATCH 1/2] clk: cdce9xx: Convert .of_xlate to .request To: Tom Rini , Tero Kristo Cc: u-boot@lists.denx.de, Lukasz Majewski References: <20211201194403.2172991-1-seanga2@gmail.com> <20211201200810.GK1220664@bill-the-cat> From: Sean Anderson Message-ID: <2034c66c-c39b-481a-3e7f-435208cab3ff@gmail.com> Date: Wed, 1 Dec 2021 15:10:30 -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: <20211201200810.GK1220664@bill-the-cat> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.37 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 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 >> --- >> >> 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) >> { >> 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, >> .get_rate = cdce9xx_clk_get_rate, >> .set_rate = cdce9xx_clk_set_rate, >> }; > > Adding Tero... > Thanks. Perhaps .mailmap should be updated? --Sean