{"id":2216045,"url":"http://patchwork.ozlabs.org/api/patches/2216045/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-gpio/patch/20260325182849.84660-1-biju.das.jz@bp.renesas.com/","project":{"id":42,"url":"http://patchwork.ozlabs.org/api/projects/42/?format=json","name":"Linux GPIO development","link_name":"linux-gpio","list_id":"linux-gpio.vger.kernel.org","list_email":"linux-gpio@vger.kernel.org","web_url":"","scm_url":"","webscm_url":"","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20260325182849.84660-1-biju.das.jz@bp.renesas.com>","list_archive_url":null,"date":"2026-03-25T18:28:47","name":"[v2] pinctrl: renesas: rzg2l: Fix save/restore of {IOLH,IEN,PUPD,SMT} registers","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"3052d8dedc9eb2cda71845664909d29f8cecd0fb","submitter":{"id":87968,"url":"http://patchwork.ozlabs.org/api/people/87968/?format=json","name":"Biju","email":"biju.das.au@gmail.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/linux-gpio/patch/20260325182849.84660-1-biju.das.jz@bp.renesas.com/mbox/","series":[{"id":497483,"url":"http://patchwork.ozlabs.org/api/series/497483/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-gpio/list/?series=497483","date":"2026-03-25T18:28:47","name":"[v2] pinctrl: renesas: rzg2l: Fix save/restore of {IOLH,IEN,PUPD,SMT} registers","version":2,"mbox":"http://patchwork.ozlabs.org/series/497483/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2216045/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2216045/checks/","tags":{},"related":[],"headers":{"Return-Path":"\n <linux-gpio+bounces-34168-incoming=patchwork.ozlabs.org@vger.kernel.org>","X-Original-To":["incoming@patchwork.ozlabs.org","linux-gpio@vger.kernel.org"],"Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=TKD0PHgC;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c15:e001:75::12fc:5321; helo=sin.lore.kernel.org;\n envelope-from=linux-gpio+bounces-34168-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)","smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com\n header.b=\"TKD0PHgC\"","smtp.subspace.kernel.org;\n arc=none smtp.client-ip=209.85.128.51","smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com","smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=gmail.com"],"Received":["from sin.lore.kernel.org (sin.lore.kernel.org\n [IPv6:2600:3c15:e001:75::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fgwRM4xWzz1y1K\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 26 Mar 2026 05:29:19 +1100 (AEDT)","from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sin.lore.kernel.org (Postfix) with ESMTP id 4037E30142A4\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 25 Mar 2026 18:29:00 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 9443A3264E7;\n\tWed, 25 Mar 2026 18:28:59 +0000 (UTC)","from mail-wm1-f51.google.com (mail-wm1-f51.google.com\n [209.85.128.51])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id E73E831B837\n\tfor <linux-gpio@vger.kernel.org>; Wed, 25 Mar 2026 18:28:57 +0000 (UTC)","by mail-wm1-f51.google.com with SMTP id\n 5b1f17b1804b1-486ff201041so1622635e9.1\n        for <linux-gpio@vger.kernel.org>;\n Wed, 25 Mar 2026 11:28:57 -0700 (PDT)","from localhost.localdomain\n ([2a00:23c4:a758:8a01:8138:17e4:88b1:468c])\n        by smtp.gmail.com with ESMTPSA id\n 5b1f17b1804b1-4871e5ec998sm11924135e9.6.2026.03.25.11.28.55\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Wed, 25 Mar 2026 11:28:55 -0700 (PDT)"],"ARC-Seal":"i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1774463339; cv=none;\n b=VWT5CAWptvcx0/OB11vQiWCKNIvKP+DkRRLllg7VdSxdIhjrPCgHT6fHVDmtPCC+XpnkBKYStNaqLclm7YLYUOgqwxhmXuF8fRC3gauHJw1/C2juPV8UJ72wM3jla9oR/haz1FOtnokL51SAVuyMuypr84Ig9rGTosDsy8ZLiiA=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1774463339; c=relaxed/simple;\n\tbh=UL+AURT5jtnyYGqcwNV5lnfBTznUkJN4teJpL2nnBRk=;\n\th=From:To:Cc:Subject:Date:Message-ID:MIME-Version;\n b=fmZvpcDetFWigPrumVkXgoDyQfXcUV2H1Rxf1v4YTTgjsnZ0a8PfMUSBhrJjWrCwT4ayHq+4InyaSJpQ7imckyVJGSZpi4xunetTt4DaKU8WsWjT0f18IgGkppT4oaU7KKgmw7BuHCfl72lb6lmpudxeHX3USJTBdnQPNJKWjPs=","ARC-Authentication-Results":"i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com;\n spf=pass smtp.mailfrom=gmail.com;\n dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com\n header.b=TKD0PHgC; arc=none smtp.client-ip=209.85.128.51","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=gmail.com; s=20251104; t=1774463336; x=1775068136;\n darn=vger.kernel.org;\n        h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n         :to:from:from:to:cc:subject:date:message-id:reply-to;\n        bh=9O2lEmcvtjMRERfz6Xg1r++Ms5MKOHzkz+QJWi+Ruis=;\n        b=TKD0PHgCZzTdw5pkh6lvZevpQA36Og0S0B0by4ekbmE2xZIaB3L6IrJEpZConwpxtb\n         243k7hMvGQHNshLEBqBqGw2PQ6OMGySau/VfyennzjW5+ulrW8eoKparQqW14yXZyH/E\n         GdCYIhXQJAoh4waWFFzgLdOVPwrlUt47/BiAK5mmI0qJuUsxbZIFNo7/WlpBHfpUzfSL\n         6qpaFjdUELbP2M7jXRPATcBJNQn8dDimw4LLvrhtft07ShsMT0avLvYL/wGI0JD++lxI\n         cFpZtWcveDW/gEo9DFxpAMuwnSqVndSChIoGIbttX2H+vM6m+BOrsRtlXzRf+pdETBum\n         /HFw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20251104; t=1774463336; x=1775068136;\n        h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n         :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date\n         :message-id:reply-to;\n        bh=9O2lEmcvtjMRERfz6Xg1r++Ms5MKOHzkz+QJWi+Ruis=;\n        b=GZwuhjpxOLHjoa88IrQ7CdyFUcPqhlbr1bTM5A2uVYtKbFXcTqvCXE2Ki00WgRU3xl\n         /QxAOvpCeq3YesCS/kRxgDsGZf8oNBY/wlZT4KzhC07LEsH86ECqr7yK1Obgpjw2oD04\n         eTXVBnflKurxLVfrPJG6Pjis+d0hOZWQ9kmxRnR0XLF/nj0+3/wrd+Wn03AnfEYJXgMz\n         2FJ6uTAExFf/3cgP9GRHIik3QAghflsNQou6A7SSomcMtlp3yQ1oKQ38x4gX7WWZBJOB\n         qdjwZwJwwkf7AKYijCfraBqJC8OYfqYcvN0CUa+HLA9cGafcq9sqsV2JyyLNj0rwPTrJ\n         UPtQ==","X-Forwarded-Encrypted":"i=1;\n AJvYcCX02w6x3esVfCZ8LPdkdhLWD7K86dUzJDl5m6uiguW5kXSl1MwL+YswoLZ4i3yt5INmYRMCF5MyNtkV@vger.kernel.org","X-Gm-Message-State":"AOJu0YyqsKyZTGlHU0c7XVDFU/NaVvZGOtyqNuGxmL2g2c9qjsclc/2M\n\t7aeldIp+2VoCziSIgZWL6X8PIKg4qwUHydb9QfeF/ijTM1EeCpD4X31F","X-Gm-Gg":"ATEYQzyeMv+91j/1OSlDSp4f/5URENcw5hxwYCbdFy6Xpn7y3KykLQCJLOzpW45E43p\n\tB+yTIyeZFquhgSxYMhAqzkqG+4STjx6p9daN+4yad0WKz+URRtiPutDmDQcvcDW/u7AVSgY5XbO\n\tQ53RMds/LOiAX0Xfn+pNAsTeDFskrxLipPns8oAvFVYyy3Qdf/sokp9u8QcnYhhTfdC2/YGcSku\n\t+8BtoesM2QtDdHNPH+P3/G9n+QWl+RUbn0qytHMf7SlVzUjzTVrPb8YkgzZ9U8rTZwcKXF6VrJB\n\tEZORm/iyf4lzInGriauC6eaGcT3q/ST/vt8nXpDZnYEUFszn67Pycd2JwLrxXxcWT4FOJaxvjE2\n\t7wCMIpD1YsDuKi7M3P9pfL+F9/aKXS9sfPwcrxNy0LTiVMPfJTxFLrZXd5DcgPecIOEmqtwerwm\n\tlBUtJpFzo70qSm4vivRWWH1IQMejgFtnI+Gv7sdp7zH4PYwTecTXF6XswR/UA=","X-Received":"by 2002:a05:600d:1c:b0:485:3fe6:2209 with SMTP id\n 5b1f17b1804b1-48715fd4de3mr56752805e9.11.1774463336200;\n        Wed, 25 Mar 2026 11:28:56 -0700 (PDT)","From":"Biju <biju.das.au@gmail.com>","X-Google-Original-From":"Biju <biju.das.jz@bp.renesas.com>","To":"Geert Uytterhoeven <geert+renesas@glider.be>,\n\tLinus Walleij <linusw@kernel.org>","Cc":"Biju Das <biju.das.jz@bp.renesas.com>,\n\tClaudiu Beznea <claudiu.beznea.uj@bp.renesas.com>,\n\tlinux-renesas-soc@vger.kernel.org,\n\tlinux-gpio@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org,\n\tPrabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>,\n\tBiju Das <biju.das.au@gmail.com>","Subject":"[PATCH v2] pinctrl: renesas: rzg2l: Fix save/restore of\n {IOLH,IEN,PUPD,SMT} registers","Date":"Wed, 25 Mar 2026 18:28:47 +0000","Message-ID":"<20260325182849.84660-1-biju.das.jz@bp.renesas.com>","X-Mailer":"git-send-email 2.43.0","Precedence":"bulk","X-Mailing-List":"linux-gpio@vger.kernel.org","List-Id":"<linux-gpio.vger.kernel.org>","List-Subscribe":"<mailto:linux-gpio+subscribe@vger.kernel.org>","List-Unsubscribe":"<mailto:linux-gpio+unsubscribe@vger.kernel.org>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit"},"content":"From: Biju Das <biju.das.jz@bp.renesas.com>\n\nThe rzg2l_pinctrl_pm_setup_regs() handles save/restore of\n{IOLH,IEN,PUPD,SMT} registers during s2ram, but only for ports where all\npins share the same pincfg. Extend the code to also support ports with\nvariable pincfg per pin, so that {IOLH,IEN,PUPD,SMT} registers are\ncorrectly saved and restored for all pins.\n\nFixes: 254203f9a94c (\"pinctrl: renesas: rzg2l: Add suspend/resume support\")\nSigned-off-by: Biju Das <biju.das.jz@bp.renesas.com>\n---\nv1->v2:\n * Updated commit description\n * Improved the logic.\n---\n drivers/pinctrl/renesas/pinctrl-rzg2l.c | 10 +++++++++-\n 1 file changed, 9 insertions(+), 1 deletion(-)","diff":"diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/renesas/pinctrl-rzg2l.c\nindex 863e779dda02..e20d199833ee 100644\n--- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c\n+++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c\n@@ -3001,9 +3001,12 @@ static void rzg2l_pinctrl_pm_setup_regs(struct rzg2l_pinctrl *pctrl, bool suspen\n {\n \tu32 nports = pctrl->data->n_port_pins / RZG2L_PINS_PER_PORT;\n \tstruct rzg2l_pinctrl_reg_cache *cache = pctrl->cache;\n+\tu32 pin_off = 0;\n \n-\tfor (u32 port = 0; port < nports; port++) {\n+\tfor (u32 port = 0; port < nports; port++, pin_off += RZG2L_PINS_PER_PORT) {\n+\t\tconst struct pinctrl_pin_desc *pin_desc = &pctrl->desc.pins[pin_off];\n \t\tbool has_iolh, has_ien, has_pupd, has_smt;\n+\t\tu64 *pin_data = pin_desc->drv_data;\n \t\tu32 off, caps;\n \t\tu8 pincnt;\n \t\tu64 cfg;\n@@ -3012,6 +3015,11 @@ static void rzg2l_pinctrl_pm_setup_regs(struct rzg2l_pinctrl *pctrl, bool suspen\n \t\toff = RZG2L_PIN_CFG_TO_PORT_OFFSET(cfg);\n \t\tpincnt = hweight8(FIELD_GET(PIN_CFG_PIN_MAP_MASK, cfg));\n \n+\t\tif (cfg & RZG2L_VARIABLE_CFG) {\n+\t\t\tfor (unsigned int i = 1; i < RZG2L_PINS_PER_PORT; i++)\n+\t\t\t\tcfg |= *pin_data++;\n+\t\t}\n+\n \t\tcaps = FIELD_GET(PIN_CFG_MASK, cfg);\n \t\thas_iolh = !!(caps & (PIN_CFG_IOLH_A | PIN_CFG_IOLH_B | PIN_CFG_IOLH_C));\n \t\thas_ien = !!(caps & PIN_CFG_IEN);\n","prefixes":["v2"]}