Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp1312124lqb; Thu, 30 May 2024 06:56:00 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU8ec96kDdLXFqJY+yNOR47Cl6icTcB8TJblE+Yedk4gon7A4dsCh8d2Ng+E5dwSoXGkqU5MyHSPX5HZctVmgXe6o/W78IvcVSlkOxvnw== X-Google-Smtp-Source: AGHT+IF4qzaTBenU7LTfi4umWg13r5iwZsbBvkrF7W2FRwCvANUh5k7XZxQFiMLCtKJbdl2oZHN4 X-Received: by 2002:a50:bb22:0:b0:578:6198:d6fa with SMTP id 4fb4d7f45d1cf-57a17792432mr1295258a12.2.1717077359701; Thu, 30 May 2024 06:55:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717077359; cv=pass; d=google.com; s=arc-20160816; b=pwy7gA7dhJQ9Rbox7iMN9h7UxrcNT8DXmvBgSGfWTbOMkylqF5Gv+gM9RE3E6TnJKG mNl5umxz75FVsJVqXO+XaQlsg/RRnj1glnhp2CRUqQ8m4Ug9jdRZifPkBJathph40ZTj PPoz9Kmm/uJ1my0KK5zmTBwrcHpjz+AjBxVgIOUwvckdhvOyVWzwTcfGWLzVUs3gE73I JKz++0wP7YN7bumo9uOlONPpBpLZuv9jFwfFtDYixiqeLqTv5AKxQG+Y/ZI5nnDgSez2 kk1OYyYLzaXo23LBwxssDuBAJjfSAFpktw7J5t9VLp+RWEKzrl7w/C8nc9IQPEVUyQQz Tlfg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:organization:from:references:cc:to:content-language :subject:user-agent:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:date:message-id; bh=bB3LdN7uLbB+kmOPRUeKbkYd/8clxCl3wnOzFvapBqE=; fh=a58Tnsyf5y6Jr2nmv0IcASgWgyuqrPtvyAlHBBWzNg4=; b=0XCmZSgzVujZriYJJ/QY/9RuxqINzUyVpLk+iz369qXfudBXh00tGlvLi08gNGdYfP 5rlrJnLnROi1fs+ZY/ZnfpehEt3ZmcS3cS0TsiIJZsFUlaKDGBg7/VDwr8dZn0mKj9z9 oJKCAk3zBbjcHRx+sigGqgx2exA4JNRb3kWyuc42EaCDLX8cVqW6NfIIdBYOus/W2t+a UgTUcFXOmOeCJkH1D46pUJjZzxKPHsXDfNZcG91TMCrdysiNJ+OfC38K5yzHpRrA6Ixd ZGCYV7BX7kY3e2mHpT4CkX9U7s8AnfpWOQVNzcMI+jB3KI5du8loUucEkESiMVFWdRS1 enwQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=bp.renesas.com dmarc=pass fromdomain=bp.renesas.com); spf=pass (google.com: domain of linux-kernel+bounces-195471-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195471-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=renesas.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-578524d513asi7463548a12.687.2024.05.30.06.55.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 06:55:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-195471-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=bp.renesas.com dmarc=pass fromdomain=bp.renesas.com); spf=pass (google.com: domain of linux-kernel+bounces-195471-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195471-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=renesas.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 4178F1F23685 for ; Thu, 30 May 2024 13:55:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0B9601DA53; Thu, 30 May 2024 13:55:51 +0000 (UTC) Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 54229171B6; Thu, 30 May 2024 13:55:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.160.252.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717077350; cv=none; b=MZZ5Ml58Z8LxNJfkmJflLBvn9S806m9t2dxTgSsm+5KcVpizXJL7QLsZoAOvGlRaE0ZEvy/rx5DmY7YQsI92/l789Bz2w2tSH5z4ogaecGgV/dNlrxxlCkt50EACwFuRPpFjpl4nygWI5aZKnsrRhiLnP4Mtu0ocPNJwrq87dZU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717077350; c=relaxed/simple; bh=R2T6febTmbLJBN50SoMzp5xW9MDsIkxEZ0Ij0wYsPTQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=CQGPErvssDYZep9PiCbIHu4aK12o3paSdRop9TzSuwdJ+iRLnKlSpGAuQVn4lcgJM/FqZaWtcZO3gftVcJocMWL5TlwyljaWS3EiuwI4Pbruu2pRivqw8dMHDRO06AEUo9WLFDOA/eOoKr/4EyJI27bASTLLgatn/E5IP/cD+Bk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=bp.renesas.com; spf=pass smtp.mailfrom=bp.renesas.com; arc=none smtp.client-ip=210.160.252.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=bp.renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bp.renesas.com X-IronPort-AV: E=Sophos;i="6.08,201,1712588400"; d="asc'?scan'208";a="206182912" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 30 May 2024 22:55:45 +0900 Received: from [10.226.92.220] (unknown [10.226.92.220]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 098AB44211B1; Thu, 30 May 2024 22:55:41 +0900 (JST) Message-ID: <77a16dba-5d62-4086-adf0-fcc2eb276795@bp.renesas.com> Date: Thu, 30 May 2024 14:55:40 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/9] pinctrl: renesas: rzg2l: Refactor pin to OEN bit translation Content-Language: en-GB To: Geert Uytterhoeven Cc: Magnus Damm , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Linus Walleij , linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, "Lad, Prabhakar" References: <20240524094603.988-1-paul.barker.ct@bp.renesas.com> <20240524094603.988-3-paul.barker.ct@bp.renesas.com> From: Paul Barker Organization: Renesas Electronics Corporation In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------oqLi0t6XyYUW8ytuM6iJgUPP" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------oqLi0t6XyYUW8ytuM6iJgUPP Content-Type: multipart/mixed; boundary="------------80sRyUscXVq85KVUgtJxjQK7"; protected-headers="v1" From: Paul Barker To: Geert Uytterhoeven Cc: Magnus Damm , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Linus Walleij , linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, "Lad, Prabhakar" Message-ID: <77a16dba-5d62-4086-adf0-fcc2eb276795@bp.renesas.com> Subject: Re: [PATCH 2/9] pinctrl: renesas: rzg2l: Refactor pin to OEN bit translation References: <20240524094603.988-1-paul.barker.ct@bp.renesas.com> <20240524094603.988-3-paul.barker.ct@bp.renesas.com> In-Reply-To: --------------80sRyUscXVq85KVUgtJxjQK7 Content-Type: multipart/mixed; boundary="------------eHgISoLx04v0zomq5F9VvJi0" --------------eHgISoLx04v0zomq5F9VvJi0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 30/05/2024 13:51, Geert Uytterhoeven wrote: > Hi Paul, >=20 > On Fri, May 24, 2024 at 11:46=E2=80=AFAM Paul Barker > wrote: >> We currently support setting OEN (Output ENable) bits only for the >> RZ/G3S SoC and so the functions rzg2l_oen_is_supported() and >> rzg2l_pin_to_oen_bit() are hardcoded for the RZ/G3S. To prepare for >> supporting OEN on SoCs in the RZ/G2L family, we need to make this code= >> more flexible. >> >> So, the rzg2l_oen_is_supported() and rzg2l_pin_to_oen_bit() functions >> are replaced with a single translation function which is called via a >> pin_to_oen_bit function pointer and returns an error code if OEN is no= t >> supported for the given pin. >> >> Signed-off-by: Paul Barker >=20 > Thanks for your patch! >=20 >> --- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c >> +++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c >> @@ -256,6 +256,8 @@ struct rzg2l_pinctrl_data { >> const struct rzg2l_hwcfg *hwcfg; >> const struct rzg2l_variable_pin_cfg *variable_pin_cfg; >> unsigned int n_variable_pin_cfg; >> + int (*pin_to_oen_bit)(const struct rzg2l_hwcfg *hwcfg, >> + u32 caps, u32 offset, u8 pin); >> }; >=20 > This definitely needs synchronization with Prabhakar, as he introduces > a different set of function pointers to distinguish RZ/G2L (G3S) and > RZ/V2H. We really like to end up with something that is consistent, > and works for all. Apologies that we missed this conflict! We will have to use Prabhakar's approach. The methods for RZ/G2L & RZ/G3S are similar enough to share read/write functions and just have separate functions for determining which bit to set, but for RZ/V2H we're writing to a completely different register. So, please proceed with Prabhakar's patches. I'll rebase this series on top of his and re-work the relevant bits. Thanks, --=20 Paul Barker --------------eHgISoLx04v0zomq5F9VvJi0 Content-Type: application/pgp-keys; name="OpenPGP_0x27F4B3459F002257.asc" Content-Disposition: attachment; filename="OpenPGP_0x27F4B3459F002257.asc" Content-Description: OpenPGP public key Content-Transfer-Encoding: quoted-printable -----BEGIN PGP PUBLIC KEY BLOCK----- xsFNBGS4BNsBEADEc28TO+aryCgRIuhxWAviuJl+f2TcZ1JeeaMzRLgSXKuXzkiI g6JIVfNvThjwJaBmb7+/5+D7kDLJuutu9MFfOzTS0QOQWppwIPgbfktvMvwwsq3m 7e9Qb+S1LVeV0/ldZfuzgzAzHFDwmzryfIyt2JEbsBsGTq/QE+7hvLAe8R9xofIn z6/IndiiTYhNCNf06nFPR4Y5ZDZPGb9aw5Jisqh+OSxtc0BFHDSV8/35yWM/JLQ1 Ja8AOHw1kP9KO+iE9rHMt0+7lH3mN1GBabxH26EdgFfPShsi14qmziLOuUlGLuwO ApIYqvdtCs+zlMA8PsiJIMuxizZ6qCLur3r2b+/YXoJjuFDcax9M+Pr0D7rZX0Hk 6PW3dtvDQHfspwLY0FIlXbbtCfCqGLe47VaS7lvG0XeMlo3dUEsf707Q2h0+G1tm wyeuWSPEzZQq/KI7JIFlxr3N/3VCdGa9qVf/40QF0BXPfJdcwTEzmPlYetRgA11W bglw8DxWBv24a2gWeUkwBWFScR3QV4FAwVjmlCqrkw9dy/JtrFf4pwDoqSFUcofB 95u6qlz/PC+ho9uvUo5uIwJyz3J5BIgfkMAPYcHNZZ5QrpI3mdwf66im1TOKKTuf 3Sz/GKc14qAIQhxuUWrgAKTexBJYJmzDT0Mj4ISjlr9K6VXrQwTuj2zC4QARAQAB zStQYXVsIEJhcmtlciA8cG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qYHffuzuEy7tbrMvjdra VN9Rqtp7PSuRTbO3jAhm0Oe4lDCAK4zyZfjwiZGxnj9s1dyEbxYB2GhTOgkiX/96 Nw+m/ShaKqTM7o3pNUEs9J3oHeGZFCCaZBv97ctqrYhnNB4kzCxAaZ6K9HAAmcKe WT2q4JdYzwB6vEeHnvxl7M0Dj9pUTMujW77Qh5IkUQLYZ2XQYnKAV2WI90B0R1p9 bXP+jqqkaNCrxKHV1tYOB6037CziGcZmiDneiTlM765MTLJLlHNqlXxDCzRwEazU y9dNzITjVT0qhc6th8/vqN9dqvQaAGa13u86Gbv4XPYdE+5MXPM/fTgkKaPBYcIV QMvLfoZxyaTk4nzNbBxwwEEHrvTcWDdWxGNtkWRZw0+U5JpXCOi9kBCtFrJ701UG UFs56zWndQUS/2xDyGk8GObGBSRLCwsXsKsF6hSX5aKXHyrAAxEUEscRaAmzd6O3 ZyZGVsEsOuGCLkekUMF/5dwOhEDXrY42VR/ZxdDTY99dznQkwTt4o7FOmkY=3D =3DsIIN -----END PGP PUBLIC KEY BLOCK----- --------------eHgISoLx04v0zomq5F9VvJi0-- --------------80sRyUscXVq85KVUgtJxjQK7-- --------------oqLi0t6XyYUW8ytuM6iJgUPP Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature.asc" -----BEGIN PGP SIGNATURE----- wnsEABYIACMWIQSiu8gv1Xr0fIw/aoLbaV4Vf/JGvQUCZliFXAUDAAAAAAAKCRDbaV4Vf/JGvUqD AQD+BiWIpoKdWhUVJuVTpF1xxSJlJH8hT7zBGd/uUWIfawD/TsajZsJu+ExiHlafRJAEDaLS5Eu9 QAzHeZrzIF7yLgk= =LIBw -----END PGP SIGNATURE----- --------------oqLi0t6XyYUW8ytuM6iJgUPP--