From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=52.101.125.52 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796296069; b=zXb/KKFLY7cm/UE7zQMLvGOcnMZuBBoU2aNDL1jc+3y2gxytLV9gyHy/dZtUdIr3HAtO 6ENZVbZ2dLp/VMoI+ZEWzaYsXVo3D6tkc0iur/aqK+WSiZBym1R/O/x6MTbCW6noCG4fu iPN6B+YTJi/oNChK0Cnw4sHdnsROJcr/3QTzX9cTYWYiwZBctVejWIraTgipi5iDqNEEA a5R4jlgu4M47g6CSFIEtmPWLNquZfqfjbX0ceh2zncn21zSf+LfGRCaGpNQVsxViutyAI f3yICydZnx/x5SoQz0nnbRVnjS40P8FCAuxCEohP/O7xSyY79NIDoNdzmGR0HcEq74A== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796296069; h=DMARC-Filter:DKIM-Signature:Received:Received:Message-ID:Date: User-Agent:Subject:To:Cc:References:Content-Language:From:In-Reply-To: Content-Type:Content-Transfer-Encoding:X-ClientProxiedBy:MIME-Version: X-MS-PublicTrafficType:X-MS-TrafficTypeDiagnostic: X-MS-Office365-Filtering-Correlation-Id:X-LD-Processed: X-MS-Exchange-SenderADCheck:X-MS-Exchange-AntiSpam-Relay: X-Microsoft-Antispam:X-Microsoft-Antispam-Message-Info: X-Forefront-Antispam-Report: X-MS-Exchange-AntiSpam-MessageData-ChunkCount: X-MS-Exchange-AntiSpam-MessageData-0:X-OriginatorOrg: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-AuthSource:X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-OriginalArrivalTime: X-MS-Exchange-CrossTenant-FromEntityHeader: X-MS-Exchange-CrossTenant-Id:X-MS-Exchange-CrossTenant-MailboxType: X-MS-Exchange-CrossTenant-UserPrincipalName: X-MS-Exchange-Transport-CrossTenantHeadersStamped; bh=4tVPJ1hqScnQj5Vo0DqopRSge455P7cJ7tyJSPofC50=; b=hdBL/G3TcRtEqVYXtXGA+mmNJsvhK/vHUazlkKG8/6Cx6F+LsouPYLUYY8GqJZDUImma 6GaTOYpALgizdAfeWToBpWnBoLjq1/9FmSI8MJhxTPcU9yz4W7jbAPF1iGpEI62T8E8Hl bpbnBkQW/+WgYktAMM5CKq/+Uhecd+MZs3smdY8kL7jhnT/60RV9QuCl4uVeE0ViKdcOo uyofnVTbFnRzYmuPKghfkvLeYyDN4x+/diR8ZeUP8F/Cx1FN+ZkRwZisKH47VLd3dQnRE 9oaNtTPjcTiMjZSZXQ3JLEOgBfBU/H8w4iLifcpXVUle99hBkk/R4hR4OTWMFPHzbCA== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass header.from=renesas.com; spf=pass smtp.mailfrom=renesas.com; dkim=pass header.d=renesas.com header.i=@renesas.com header.a=rsa-sha256 header.s=selector1 header.b=SZ9B+wWN; arc=pass header.oldest-pass=0 smtp.remote-ip=52.101.125.52 Received: from TYVP286CU001.outbound.protection.outlook.com (mail-japaneastazon11011052.outbound.protection.outlook.com [52.101.125.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (secp384r1) server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 47D58606A335; Thu, 3 Dec 2026 11:07:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 47D58606A335 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=renesas.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=renesas.com header.i=@renesas.com header.a=rsa-sha256 header.s=selector1 header.b=SZ9B+wWN ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=sj54GFFvyguFlkqwg5INmCS95Zrq2cWtHKPMPy+JCZo0ECR90VUH0TqZ/VcWq6lKaiy739gJ1Dia9D9fSnGaR+8yP6iU4nhAxVYi/uT6vYYAVLM3SJLxq/bpzWvz+t2MbmeOMxalIXOWWNA/HEi4mzrlNBKynGUQTXglr0CTPIsoc1ZOxqGLX8yx44v/Y6xunkW5ey0zQmDQsXm6hkyq+XJjYuR5H4sEblxMTD2Yd666Chm9BUzoCEW5gOgHA4l1uDcdw3UJF1/3TB2L8dSqlM03yTmvbfI0bVIv3bl5M4xwejPgmK83opeqNywVBFxzPPEOqkyN8y6RWzHjAMyxyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=4tVPJ1hqScnQj5Vo0DqopRSge455P7cJ7tyJSPofC50=; b=QurbxRc/wtecI4YrrbBsFk0im5CELEffYDXP0zMFsBU+ic6OoBFPMCN7ZXb0bQ8cm7ZP22wy39XNE0CiAl6lyKazjsv4Y0V52jWQw2jeVBZd9TGH7VIHZsDH9nN63TK3tp96u5eWbX+AOnc7OlCog86vn+v1Xf1dThipNoqGtvJ2JSzgzo1Q9HYaZccz+xOe71SZy7eLqbKEVKqTUwXVWC09uLDHtruCu4dBOuLPxuHOZ/htcpNIUOWs7eBNPMv9mdhlZcy15MvvSlSRCEy2/1234IH5c/rLNobWNMtO+W7ygxBlxIi7C5DJ9XOZh8m/aMpyp1LUdsYUAMZ7idluQg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=renesas.com; dmarc=pass action=none header.from=renesas.com; dkim=pass header.d=renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4tVPJ1hqScnQj5Vo0DqopRSge455P7cJ7tyJSPofC50=; b=SZ9B+wWNNb1N6TxkrTZ7DZtrWn4k5GhZUBM8tbLPs8GlWAXXp2YgSZ2ylPzWpMyC1syJJH23CjQlDpbDeHLQefts7XuEFSKlYx1FCnTUtkJzugoqYWdPSdSTpYZ3jd3YpLYs/FigzuV3puxmMcsthP39JlC2iW7/zMBsLbWsi5o= Authentication-Results: mx.microsoft.com 1; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYYPR01MB15118.jpnprd01.prod.outlook.com (2603:1096:405:1a1::11) by TYCPR01MB7339.jpnprd01.prod.outlook.com (2603:1096:400:f2::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.688.11; Thu, 3 Dec 2026 11:07:45 +0000 Received: from TYYPR01MB15118.jpnprd01.prod.outlook.com ([fe80::1116:d56:8164:63b4]) by TYYPR01MB15118.jpnprd01.prod.outlook.com ([fe80::1116:d56:8164:63b4%6]) with mapi id 15.21.0688.010; Thu, 3 Dec 2026 11:07:45 +0000 Message-ID: <530f081f-b8e1-4972-920f-52853bd2c34b@renesas.com> Date: Thu, 3 Dec 2026 11:07:34 +0000 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 5/7] pinctrl: renesas: rzg2l: Split SoC-specific masks in struct rzg2l_register_masks To: Geert Uytterhoeven Cc: linux-i3c@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, linux-gpio@vger.kernel.org, claudiu beznea , Wolfram Sang , Tommaso Merciai , Alexandre Belloni , Frank Li , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Magnus Damm , Stephen Boyd , Brian Masney , Jerome Brunet , Linus Walleij References: <20261026-divo-ssgrlpcsrc-2966-i3c-v2-0-2e76b87209bb@renesas.com> <20261026-divo-ssgrlpcsrc-2966-i3c-v2-5-2e76b87209bb@renesas.com> <121cc552-86b6-40de-ba9d-0ae40f8a1ed2@tuxon.dev> <5689301f-f7b0-43ce-9555-22faa7af965d@renesas.com> <91df9c96-b023-4717-a476-e500034ec9ea@app.fastmail.com> Content-Language: en-US From: Diogo Ivo In-Reply-To: <91df9c96-b023-4717-a476-e500034ec9ea@app.fastmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: FR4P281CA0376.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:f7::19) To TYYPR01MB15118.jpnprd01.prod.outlook.com (2603:1096:405:1a1::11) X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYYPR01MB15118:EE_|TYCPR01MB7339:EE_ X-MS-Office365-Filtering-Correlation-Id: 901d90d1-0dd4-4335-cad5-08df512da865 X-LD-Processed: 53d82571-da19-47e4-9cb4-625a166a4a2a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|23010399003|7416014|376014|18002099003|22082099003|10067099003|56012099006|261022105027099003|261021135927099003|261026140227099003|261026121527099003|261028144727099003|261009223027099003|4143699003|11063799006|3023799007; X-Microsoft-Antispam-Message-Info: CXKq5usFf31Jw3WbynJFyX+jhGaUfNl6T32Ph05Dx6xY3nN0fgoeBqf8lU/NQaDJXeN+RXMrTXJa1+S9tOiKnpyl9HP59gnjByopT5zfVc7O75ryz8Z52we5IA8IS9JXNBUDBcwbHO6bg5vEr5Lht+7j4d076grH325ztzY+83gJaFmI9tXn12DckLX2efHofBQlPDeUsHwANQcsvQDYDrpVKTEerul1hYjAK1C+fNJORH/xYHIs9sTag5bnPWiVn8yTXCW4AuupEDiKfrYxUfad4iKqocw65mYAN9bxUF4M9DXC1356dV7pL5qiYkfDl2LZwwXcFheBRYB7tYje9CQPbnfGYQfM++m8ZWEpM6k3Omw8WzpHtlv+OGifZDyV1bTRA/9W4edmWrCOcFl3vXkDmLsWvIsyB7fWZjnxPxj1qSHEIwo15u8PFdHpYAP58G8GQcJIrltwC8myNwcAvAfDz97f9vSJSKcRlB4i8fXrCO96B3bEv2WpU1O5dZuJJObNw7WaAK8S+/O+FK3Iw6nUh9YOOEKgWMtkWCnxl8ESpnsGpHFLHRHga+AvQDG8l5ScedPAm78gYQqNl4j0iGNGZ3rAL26dDx9D6sWFmSQqoIg43eFBZIkm64Eqf7AUdbfHIDhOrP10NZ1uqmO88d0/z9dFVdyNAdlkL5zbpvw= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TYYPR01MB15118.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(23010399003)(7416014)(376014)(18002099003)(22082099003)(10067099003)(56012099006)(261022105027099003)(261021135927099003)(261026140227099003)(261026121527099003)(261028144727099003)(261009223027099003)(4143699003)(11063799006)(3023799007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?UFRWRE04NEZRc2dmOU14VmNZaStqSGZuQ014V2xCd3kxSFZXWW5VVGU1ejR3?= =?utf-8?B?TThWMkZreFlQU1BtREhmMWsyQW9zeFV6czVsSEtoTEM4YndtTVBRTzVCeldy?= =?utf-8?B?OTRLNFhQZC9hSUhzRVdjWlhaT1Y5RkhXOEJNbzdycVZaNDczRHdoUDV1bnJ2?= =?utf-8?B?Rk8yd3I2TkhqRnZLc0YrS3JYQ1p0ekdTTGd1Zi85dk1WVGJBaFNDcVp1aE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E5SnJtZUFHMFZOa25NUlBDVXZ0a0RPb3dRSzltbFdtU0dKTXJR?= =?utf-8?B?bndyd05zek1EZjN5bkFBUXYxSWFkZVlPczNKdlVlMTJEeE1SalVqTTZvcUh3?= =?utf-8?B?aEFSRjZwQXNnZ2Z2R3JCRnl1OFQzNEhlM2tYeUJNQ0kzMjJVUytwN1c3bnlx?= =?utf-8?B?aVVHU052VU5acUs4YVVkVkdXKy9UR29pYlBXWnZnT0dJQU5uYUk5YVVxUTVn?= =?utf-8?B?SHozTUNNa253NkR3SGVYUHpOV3dzMlRvL0txSFBWc0NqRitPdXI1SDU5a1I3?= =?utf-8?B?ektKOXhaWG9UZm9MSVk1ekVlb1N1cHBzdktic0VvK1dTMlUzbE4ydGxWRm1G?= =?utf-8?Q?SNhNY6GKw7mMO+OQ=3D?= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 901d90d1-0dd4-4335-cad5-08df512da865 X-MS-Exchange-CrossTenant-AuthSource: TYYPR01MB15118.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Dec 2026 11:07:45.5059 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: LWz2e3ZuxBBLfmWgxyGFFh6OLyYVAeHmreHJ79oWCxrz5vHWneYUlhp2b55yh+K/lsiuUmj2auU47gV9fYLQ5bx3uo5SWKd7FshV3Ea6hQI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB7339 Hi Geert, On 12/3/2026 10:10 AM, Geert Uytterhoeven wrote: > Hi Diogo, > > Thanks for your patch! > > On Fri, Nov 27, 2026, at 15:03, Diogo Ivo wrote: >> On 11/27/2026 10:16 AM, claudiu beznea wrote: >>> On 10/26/26 13:35, Diogo Ivo wrote: >>>> struct rzg2l_register_masks declares the masks of the OTHER_POC register >>>> of RZ/G3L and of the I3C_SET_POC register of RZ/G3S in two branches of an >>>> anonymous union. As both branches share the same storage, initializing >>>> both >>>> other_poc_pvdd1833_oth_awo_poc and i3c_set_poc on RZ/G3L would have the >>>> designated initializers override each other, ending up with the >>>> I3C_SET_POC >>>> value in the PVDD1833_OTH_AWO_POC mask. >>>> >>>> Split the union into a common area, for masks shared by multiple SoCs, >>>> and >>>> per-SoC areas: the RZ/G3S and RZ/G3L I3C_SET_POC mask moves to the common >>>> area, and the RZ/G3L OTHER_POC masks stay in a dedicated RZ/G3L area. >>>> This >>>> way every mask gets its own member, >>> >>> > and new SoCs can be described by> adding their own struct >>>> (possibly inside a union). >>> >>> That may be missed by the next person adding it... >> >> Ack, that is a good point. I will add it to v2 if Geert is ok with this >> approach. >> >>>> >>>> The existing RZ/G3S data only initializes i3c_set_poc, so it is not >>>> affected by this change. >>>> >>>> Signed-off-by: Diogo Ivo > >>>> --- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c >>>> +++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c >>>> @@ -278,18 +278,14 @@ struct rzg2l_register_offsets { >>>>    * @i3c_set_poc: I3C_SET_POC mask >>>>    */ >>>>   struct rzg2l_register_masks { >>>> -    union { >>>> -        /* RZ/G3L masks */ >>>> -        struct { >>>> -            u8 other_poc_pvdd1833_oth_awo_poc; >>>> -            u8 other_poc_pvdd1833_oth_iso_poc; >>>> -            u8 other_poc_wdtovf_n_poc; >>>> -        }; >>>> - >>>> -        /* RZ/G3S masks */ >>>> -        struct { >>>> -            u8 i3c_set_poc; >>>> -        }; >>>> +    /* Masks common to multiple SoCs */ >>>> +    u8 i3c_set_poc; /* RZ/G3S, RZ/G3L */ >>> >>> I would drop the names of the SoCs close to the i3c_set_poc. That have >>> the opportunity to grow over time. As Geert considers better. >> >> Ok, I will wait for feedback here then but I am ok with dropping the SoC >> names. > > Agreed. Ack! >>>> + >>>> +    /* RZ/G3L masks */ >>>> +    struct { >>>> +        u8 other_poc_pvdd1833_oth_awo_poc; >>>> +        u8 other_poc_pvdd1833_oth_iso_poc; >>>> +        u8 other_poc_wdtovf_n_poc; >>>>       }; >>> >>> OK, we can drop the union but the next SoC addition may be: >>> >>> /* New SoC masks */ >>> struct { >>>     u8 x; >>>     u8 y; >>> }; >>> >>> If we want to keep the initial form we may need to pay attention. >>> >>> Patch is OK for me, just with the mention that we need to pay attention >>> if we want to keep, for the future, the approach before this patch. >> >> Ok, then if Geert is ok with removing the union for now and possibly >> reviving it later I will state this clearly in the commit message. > > All of this looks rather fragile and suboptimal to me. > > The union avoids wasting space. However, as soon as a member is > needed on more than one SoC, you have to move it to the common area, > and it starts wasting space again for all the SoCs that don't need it. > Of course that is just about the data: you are still wasting space > for the code that handles data you don't need. > As the waste of data is only a few bytes per SoC, does it matter > that much? That is a fair point. In that case do you prefer that we just do a simple struct rzg2l_register_masks with all the masks declared and avoid the union and the per SoC split? So in this case struct rzg2l_register_masks { u8 other_poc_pvdd1833_oth_awo_poc; u8 other_poc_pvdd1833_oth_iso_poc; u8 other_poc_wdtovf_n_poc; u8 i3c_set_poc; }; and then when other SoCs need it we can simply add the necessary fields here? Kind regards, Diogo > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org > > In personal conversations with technical people, I call myself a hacker. But > when I'm talking to journalists I just say "programmer" or something like that. > -- Linus Torvalds