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 AB3D4C433F5 for ; Wed, 1 Dec 2021 20:08:22 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2190883090; Wed, 1 Dec 2021 21:08:20 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="di0CSqNj"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B146883090; Wed, 1 Dec 2021 21:08:17 +0100 (CET) Received: from mail-qt1-x835.google.com (mail-qt1-x835.google.com [IPv6:2607:f8b0:4864:20::835]) (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 1965981294 for ; Wed, 1 Dec 2021 21:08:14 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qt1-x835.google.com with SMTP id j17so25311884qtx.2 for ; Wed, 01 Dec 2021 12:08:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=qZ6JN7QHDWVDsc48wJwJ+Kg8p0EQadJJQPKyR0RhrdM=; b=di0CSqNjJtctq9MF1I5YAucZI2wT8g1Yq4iZe3tFzhbJKO5eBC4jtAUPufq2p6Qsbi Mb1d7emZlwqtXqiLcBNlr5A9OuZAw7kWSyGwqoCqvFBKhaOeXPv0+3ml/MO+DswWBl1r CC6mr/r4ctzlpkEjwQF+JoPSMC2ZhlAO+vS4Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=qZ6JN7QHDWVDsc48wJwJ+Kg8p0EQadJJQPKyR0RhrdM=; b=tViuRwJhiwhrMH9cX6y6uscA7LaaD0YO6Q0qbgpl0lxNu/f3TcJdfQGTfkkq82+Jho PG7drdjPgjMIGqMde32D5lz1qm+3inJ97hpQuLVCPMTYuK+mq0Jte8KijyaY8dhiUkMI AOfN8TXw5RuLmp94feyaH/saw7scRW7DtosSTqb/T0bQQ70mbNQdy50VplOQ6k3ZXKmn Utbdhlhib2HqSiwNHYf+ISFqI1rIOTfLojbWeyYD13bhw6t0XjGFbA6R4Xoh0oXLlWPa lwsEfQVz0KANvN9QP7AyCba+87dD6sa1s5zhQXwYqf67g1ixlifBMRQ0oWOis0Xh8q5w Sn/Q== X-Gm-Message-State: AOAM530NzK6HKyQmr2tcleRZSu8H24++dQIRve6RpYwgb4SxVceQb0H3 26LJlfsEGHQksptVbzaxND2rsw== X-Google-Smtp-Source: ABdhPJx+cnTsKDTIKfd5CfKZwtI6lzgvt/buV541N+s5sQThm5l/AhNmJE7gTxSgXS1FdqcV9WcB6Q== X-Received: by 2002:a05:622a:453:: with SMTP id o19mr9890027qtx.648.1638389292958; Wed, 01 Dec 2021 12:08:12 -0800 (PST) Received: from bill-the-cat (2603-6081-7b01-cbda-c825-72b9-4e49-4490.res6.spectrum.com. [2603:6081:7b01:cbda:c825:72b9:4e49:4490]) by smtp.gmail.com with ESMTPSA id l10sm431527qkp.3.2021.12.01.12.08.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Dec 2021 12:08:12 -0800 (PST) Date: Wed, 1 Dec 2021 15:08:10 -0500 From: Tom Rini To: Sean Anderson , Tero Kristo Cc: u-boot@lists.denx.de, Lukasz Majewski Subject: Re: [PATCH 1/2] clk: cdce9xx: Convert .of_xlate to .request Message-ID: <20211201200810.GK1220664@bill-the-cat> References: <20211201194403.2172991-1-seanga2@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ZOudaV4lSIjFTlHv" Content-Disposition: inline In-Reply-To: <20211201194403.2172991-1-seanga2@gmail.com> X-Clacks-Overhead: GNU Terry Pratchett 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 --ZOudaV4lSIjFTlHv Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. >=20 > Signed-off-by: Sean Anderson > --- >=20 > drivers/clk/clk-cdce9xx.c | 12 +++--------- > 1 file changed, 3 insertions(+), 9 deletions(-) >=20 > 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; > } > =20 > -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 =3D dev_get_priv(clk->dev); > =20 > - if (args->args_count !=3D 1) > + if (clk->id > data->chip->num_outputs) > return -EINVAL; > =20 > - if (args->args[0] > data->chip->num_outputs) > - return -EINVAL; > - > - clk->id =3D args->args[0]; > - > return 0; > } > =20 > @@ -241,7 +235,7 @@ static const struct udevice_id cdce9xx_clk_of_match[]= =3D { > }; > =20 > static const struct clk_ops cdce9xx_clk_ops =3D { > - .of_xlate =3D cdce9xx_clk_of_xlate, > + .request =3D cdce9xx_clk_request, > .get_rate =3D cdce9xx_clk_get_rate, > .set_rate =3D cdce9xx_clk_set_rate, > }; Adding Tero... --=20 Tom --ZOudaV4lSIjFTlHv Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmGn1iYACgkQFHw5/5Y0 tyz9RQwAkAI9Xvg9OVQXIis0hw8OHj84lXDCsdOJAkwgjvUuj/4CtDsX/+TeMI/g t35DzcUPp0S7nqUQS8Jj62Fr2yzIxuE/sYSZnp/sAZYmqFgpRfO7kYaRCYaRO2Xv i0bHRnmfIk4I7KedAFzX7st63TvwnepmPLhovDKHlWzRT3TadhP0eSNwxxzqw854 EbQOkXowoMzGySfH87jb/BotyhFSzdFXD5zlOF/+sV4PjWtXK77/qxcFLQc242eF 0yqOixeLpghNsZJb5kB2I5jemvRkhl6s17mI2OXFU3/UZ2iowscLUyWZ0qLgVXjm J/0cQ85VMmHxGztnuts19cBZM88cpYfGjJek5SGPWTR7B31EoXnNIVSNcYLIMXVd YVdB+gQw0yDxlW6Oo6nak0+czPCqMp7OxGOpZS1PgmWTrjUnnrkQLlVMk9ieJisV LPAsXiK1zhB0o+8XYmGNRFYNkFDMXDdH8jellCwTcI22roZt2gK6lpbbQAPQjaFx lUvwjFJb =3YWA -----END PGP SIGNATURE----- --ZOudaV4lSIjFTlHv--