Received: by 2002:ab2:7855:0:b0:1f9:5764:f03e with SMTP id m21csp316079lqp; Wed, 22 May 2024 05:44:25 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWEqldgVOEBV9MAixp1AM6WlE+41AtYhj2n6nOykHlY0GqQNVT3IccrRd7yY7v0NRzUaNyfSKasXE5KGQGPF2U5TAv9OHA1H1sFK6N+Xw== X-Google-Smtp-Source: AGHT+IGakhTAIIGqo2QYsTS50VLhksXcXqqCcjXpxoRIFV4KLH4ho6bS25qVscTV+uSIE0eNhINp X-Received: by 2002:a05:6214:5bc7:b0:6ab:714c:6457 with SMTP id 6a1803df08f44-6ab80907108mr20370906d6.59.1716381865037; Wed, 22 May 2024 05:44:25 -0700 (PDT) Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 6a1803df08f44-6a15f2b6bf4si42655046d6.371.2024.05.22.05.44.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 May 2024 05:44:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-186238-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-186238-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-186238-linux.lists.archive=gmail.com@vger.kernel.org" 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id B464C1C219FA for ; Wed, 22 May 2024 12:44:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id ACFE013D8B5; Wed, 22 May 2024 12:44:17 +0000 (UTC) Received: from mail-yw1-f173.google.com (mail-yw1-f173.google.com [209.85.128.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6D6AB13D61A; Wed, 22 May 2024 12:44:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716381857; cv=none; b=n/XfuQkTD+D3w6P6db/UeRqfbgwgkjqAx90oFO9lFiw4yjbTg8WFYRfBTpAq5if4T0japOjJezrUt2xMhWzf81LaRFwWkffAvcgXOVUY9hH9IPQXLMM23d+YNr8HFrbbjUeNO2NUhP6jYpJI1EWfk6UCIkUGh+ccbqDFRBduz48= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716381857; c=relaxed/simple; bh=EiN3xmZjGrf5FqymJCw/lgKqJlb1gSHhBc32BLRhF+4=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=d1nwMOHDC5eht+6JrSTfdPo69rxELhszc/7gpaJ0mIwfGlw8ZS3tWBAw/i6BsTZdcfg5ELtpSJ/oHQ1lQfKhEFkUI88GRr1xaORFIkTW4/7eclWJTsx+0qpGYtFIjetqnB0faufJY4CmWrl5lJJLCKHvjZLr/0ikeAOUblKXYac= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux-m68k.org; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.128.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux-m68k.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-yw1-f173.google.com with SMTP id 00721157ae682-61bed5ce32fso49441197b3.2; Wed, 22 May 2024 05:44:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716381854; x=1716986654; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ucyg8fHsLLOL6udU8E/THdPub1Fnu5dEytzsH3zIgzA=; b=ncEdHAjYyOPW0qzn9rnx5BGxQfyyFPqKXwLI5YvVq73qb23lpwZdxcELmEGsvU2mp/ LSFtlpv6qj3m28pkgsODWiHhxqfWVw6e4f86rZzJtzbTEBk5WQpHrBAguk7zIyP6/kUF dsAIPoQJXaDb6Cg10WlPXVGLn/JtVVLlKGjZ5ovDT1GRg3AIJ/aVv0EGu1jovtBu/enp c6fduWgOWnt1qe9KWspOvP3QyGnTt2i2pY7cJGw1lWSQMNIZVstf8ndZ2wVH71lRb2H/ L0o47y/9LsrnkkOsSKytj9Qq+cfQtp4gaXzTCvTdm8nA1RNZqWdGw+4PDCj+NZXycDIL jqVw== X-Forwarded-Encrypted: i=1; AJvYcCVnot/pfevaC6sYL71I+MVybTTna3KlGJZ1HppwYbHRICdVuVIvjmfjTGkgmoAQpiQFURgmuUA8e8vu5Y1N9RrX8aEpqa2kZT0RRwGUZOON1niE4ljf+VR3b/vEPakuBipG3R9YHNFNmWOhJONBmGhgNDPZPU5hVQ+OCq0PdpBaTNzC/q2ydLFmVrnWmbRAjcFj3OznJkJ60gtrrjApPL1NHcNPndptlQ== X-Gm-Message-State: AOJu0YwgFD29V2RIsQDjh1SJRovoPkEXwaLefZigSXmaO+oJDgGUm8bw +9Y02ZP0kC8MkZqtSdI+eiSfVRHZqcb1fKc2YOamynTiVLdEUZYEZWt5Xdro X-Received: by 2002:a05:690c:d8e:b0:615:1527:aa2 with SMTP id 00721157ae682-627e46a4cffmr24420637b3.10.1716381853792; Wed, 22 May 2024 05:44:13 -0700 (PDT) Received: from mail-yw1-f181.google.com (mail-yw1-f181.google.com. [209.85.128.181]) by smtp.gmail.com with ESMTPSA id 00721157ae682-6209e234816sm58227207b3.26.2024.05.22.05.44.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 22 May 2024 05:44:13 -0700 (PDT) Received: by mail-yw1-f181.google.com with SMTP id 00721157ae682-61bed5ce32fso49440817b3.2; Wed, 22 May 2024 05:44:13 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCXJVethaYJIkPOBPh3rUVXpB63vbNer/Phn3no1JpS4xWF41o0+QIJkm2kJg+OAa5Ico/hmWwRPmZLKxhGsKGwHHZyv+q1ITXp8FCI0qr5cYV9S+OHTqCD8S5epFRrLU28slvUVyR1DUgUhmgl0G1bv9FWEwYssww0q2DAnYZCzpz8hfPyCuweu/FdKDYdfoxTTBhG4MGUCyOhu49NIBSP0fnaS6IYANQ== X-Received: by 2002:a81:7186:0:b0:61d:fd3e:abe5 with SMTP id 00721157ae682-627e48a417dmr17328727b3.52.1716381853122; Wed, 22 May 2024 05:44:13 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240423175900.702640-1-prabhakar.mahadev-lad.rj@bp.renesas.com> <20240423175900.702640-9-prabhakar.mahadev-lad.rj@bp.renesas.com> In-Reply-To: <20240423175900.702640-9-prabhakar.mahadev-lad.rj@bp.renesas.com> From: Geert Uytterhoeven Date: Wed, 22 May 2024 14:44:00 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 08/13] pinctrl: renesas: pinctrl-rzg2l: Add function pointers for reading/writing OEN register To: Prabhakar Cc: Linus Walleij , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Magnus Damm , linux-renesas-soc@vger.kernel.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Biju Das , Fabrizio Castro , Lad Prabhakar Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Prabhakar, On Tue, Apr 23, 2024 at 7:59=E2=80=AFPM Prabhakar wrote: > From: Lad Prabhakar > > This patch introduces function pointers, read_oen() and write_oen(), in t= he > struct rzg2l_pinctrl_data to facilitate reading and writing to the PFC_OE= N > register. On the RZ/V2H(P) SoC, unlocking the PWPR.REGWE_B bit before > writing to the PFC_OEN register is necessary, and the PFC_OEN register ha= s > more bits compared to the RZ/G2L family. To handle these differences > between RZ/G2L and RZ/V2H(P) and to reuse the existing code for RZ/V2H(P)= , > these function pointers are introduced. > > Additionally, this patch populates these function pointers with appropria= te > data for existing SoCs. > > Signed-off-by: Lad Prabhakar > --- > RFC->v2 > - No change Thanks for the update! > --- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c > +++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c > @@ -261,6 +261,8 @@ struct rzg2l_pinctrl_data { > void (*pwpr_pfc_unlock)(struct rzg2l_pinctrl *pctrl); > void (*pwpr_pfc_lock)(struct rzg2l_pinctrl *pctrl); > void (*pmc_writeb)(struct rzg2l_pinctrl *pctrl, u8 val, void __io= mem *addr); > + u32 (*read_oen)(struct rzg2l_pinctrl *pctrl, u32 caps, u32 offset= , u8 pin); > + int (*write_oen)(struct rzg2l_pinctrl *pctrl, u32 caps, u32 offse= t, u8 pin, u8 oen); Please use consistent naming: "pmc_writeb" uses _ ordering, "read_oen" uses _ ordering. The rest LGTM. Gr{oetje,eeting}s, Geert --=20 Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k= org In personal conversations with technical people, I call myself a hacker. Bu= t when I'm talking to journalists I just say "programmer" or something like t= hat. -- Linus Torvalds