Received: by 2002:ab2:f03:0:b0:1ef:ffd0:ce49 with SMTP id i3csp87724lqf; Tue, 26 Mar 2024 15:31:19 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVcIXKbv5MYexFNSWBtfNxd9ST1MLH0iFKOgUqqB33vqKyqnAaW5T5RT5s9wK/iLgh4yqN3tkLoi/+pJFfyu3wUBA38OCBPlZfBMRUy2Q== X-Google-Smtp-Source: AGHT+IGeEkCuuIu3uSfII1cXKYxo65QFQLlMmhX1EVYeQw8hfcwTJzWEFqLm8MEexSmEcJxC2FCN X-Received: by 2002:a05:6402:50d1:b0:56b:7da8:7ecd with SMTP id h17-20020a05640250d100b0056b7da87ecdmr8642342edb.29.1711492279604; Tue, 26 Mar 2024 15:31:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711492279; cv=pass; d=google.com; s=arc-20160816; b=v9QjyhD7UNuz5vFub9aUr3Daa0B4Rf4Bb4zSxPSMXZk01Zp90z84CM6gJDdEFF5pxn +vhDKDrl0zOGDLvHopczUTBR+pZUOxFoRj5fitn8yRgFB8+mUYfrogDT2EmL4XLuy1iF /bolJvqiAiXv46fOHLIgsv0vsTqS6bY1hCk4eLGoyVgFCxkN9ZStoWqsh+3/nos18GAa UiN7kQh0WC/TyR7gaPxrSbDac4CdV3E2GY2NJsQt3lbaG7M372GS+0yDVnSSzemdwP8Z t9PefJjYx9oElKuAEXD84M0+9gZQKTkh2DP05nDjoNjlfiyOr+XRPee7sdTUU/EieRue y6jw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=S7slSHrluo/yZHTT9IkQat6c1ty1R252Rsn9mmiwCGQ=; fh=3IdDWJCLTYD1uQdHRH4wY2t2K86mTf6xWEsQqiKXI2o=; b=whf2RMJ00MW0as4BzJSv+vH4wShU/1gl2UceKANsCrFWJomHR6HgaYso/XnewQSi9h fGvekGumji6RZDJ6K+Zkj/QGxy3ioYj/rk8h/WtgjUS4FYUVb+QR1wWJ8wFxVUnD54Oe GREI47ai0PeZZMHtZrIZt2cllyN1Dwm4bHLmBkLkrvl/5Khc5Q9D6N57EsN6khcttBSI SKfPTM1FZvBpe3DFUKpZVqAgtn4ieYPFElm2N9vXCnDiQz7U5b1ICLU/N+89lii0lTw5 tqQe/pdjSG7R3LCr/4l+WSeww7XQEKYF0xBB+YteNo6eDCneqb6mGcJjKQCjUZMW5fRf woxg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="Bo/GodDS"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-120047-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-120047-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 el13-20020a056402360d00b0056c3ba82cbcsi24305edb.353.2024.03.26.15.31.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Mar 2024 15:31:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-120047-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; dkim=pass header.i=@gmail.com header.s=20230601 header.b="Bo/GodDS"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-120047-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-120047-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 061811F6695C for ; Tue, 26 Mar 2024 22:31:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4D42A13E6A0; Tue, 26 Mar 2024 22:30:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Bo/GodDS" Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) (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 B73B813E03D; Tue, 26 Mar 2024 22:30:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711492206; cv=none; b=asYaAThRgQKA98wvrjk6Yh1I7oZhhY+dfhJ0+E9zmnZBJ5iRy2jxmDT4q1PpaGD3XrS//NczmrtQKs00MfpLLv9Rcdy5n1B2zUbpSeeJIlyPczFo4ZAWaBvI318eTLQslK9HjxnRoYvMND6wXQUQuxHm4ajSswmBJex5KShc1HU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711492206; c=relaxed/simple; bh=QeYjK/TMtPSocGnoRUFMmCD1HcnoJ81gUzd/wF12x4s=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=pVMnGVe03ok0Auu63cLV7hLIW1M0KtEYdSlGTdZrBZ1/w4cKpxOfFFicLvNAW2HJsoc6ZgnnBta5TIX2fyVVJE9oiwyHbQM6bt2qFM6cmvZalfETJnc18AIQ4y5pexsAALYsEXsYezqipuHAkW76JlK53bZJ5hpNTncVSZXrMto= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Bo/GodDS; arc=none smtp.client-ip=209.85.221.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f44.google.com with SMTP id ffacd0b85a97d-33ed7ba1a42so4090118f8f.2; Tue, 26 Mar 2024 15:30:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711492203; x=1712097003; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=S7slSHrluo/yZHTT9IkQat6c1ty1R252Rsn9mmiwCGQ=; b=Bo/GodDS9r8ouSvLIuAYDKcx3gs3cZI4NgsPMCkuToWM5wTH9ztrm9f5BKNYU4SeaN owEV5Dgg0sAwl+sp2Biv0PQDevmplJySvX6E6coJgTmggpSFvUS8OIsyB/m9n/SVx6sD 7eNoXwFlhtIqNjzES4PeGRedl5qFnEYfuFQg0sIF473FNHUznyeqsO99bUy0/8Aijx/l 58qG5G8yMMJvrVOq26zKTZi3OlBWXN1Y9yUhiDLMHg2xiWvBu45t+6URSsVfzEp32+Nl tXXcaEL5+PgYGrIGLZpRfkf88s0xdqXhqryFQx4/XmB9AKOT1h+0MdrboEmlweD8Dv+W b+GQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711492203; x=1712097003; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=S7slSHrluo/yZHTT9IkQat6c1ty1R252Rsn9mmiwCGQ=; b=cZAvfvpqAex33RTS2X3qrcan3/1CCN4H2FIW8jw0n+NRxGvUBVPSN0Kfs61IDrhHFs KxGAGrAgjUsMxdOxsqroEp6NN5Xs9BTSnMxqyQSLlPfOV8I6J1EbKAj7gsfKI5D7vxn7 rX3oJjzrANjkyKfuy9Jte3kUD82y34FgXRQ0+l+em3jzmROROemZ2A6d9dp2CNQR8rFI 4fUyGRCru2NeL0UsxUrkiCy0ZPAHcpdXnOcP0UMZL6t9fCx8kPHVTYXQ6UliL3Bhwdrq C0CuOCbbui2Pjz0XYL8o6U0CqohrlX2vhp5hBlr9FEjmbYLihsFxXOO0tAf+Y81w8N6o UFRQ== X-Forwarded-Encrypted: i=1; AJvYcCUpYNDBSoDD0oNbLGTthbk07VYQflRUIHARK/SCld1iZ09wNpvfFFwUW7iBeVH6Wmahrnxe8EjSn1JZURD/nKIs7Zrvlnwoeuapfk681VuGFWDepBTbv3T4fvQoGbWZfYlsEFvlSmgHCU1vRv8B1XIyRaA7ohGnSB7d195RVPHo6r+5QDY= X-Gm-Message-State: AOJu0YyjTPtis9E+Li0wxv/hUD/Ph7cpMCxgNMxWA1kiEH1ixK2WKWwa MBID1yDcPjI9aCgFxp4yALDV0d/UEaAyfoudp5yrincJW+iOXkc8 X-Received: by 2002:a5d:4705:0:b0:33e:c271:8c90 with SMTP id y5-20020a5d4705000000b0033ec2718c90mr8694797wrq.10.1711492203016; Tue, 26 Mar 2024 15:30:03 -0700 (PDT) Received: from prasmi.home ([2a00:23c8:2500:a01:90ec:252a:cdf5:54e9]) by smtp.gmail.com with ESMTPSA id bs20-20020a056000071400b00341de138a2esm600647wrb.94.2024.03.26.15.30.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Mar 2024 15:30:02 -0700 (PDT) From: Prabhakar X-Google-Original-From: Prabhakar To: Geert Uytterhoeven , Linus Walleij , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Magnus Damm Cc: linux-renesas-soc@vger.kernel.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Prabhakar , Fabrizio Castro , Lad Prabhakar Subject: [RFC PATCH 04/13] pinctrl: renesas: pinctrl-rzg2l: Allow more bits for pin configuration Date: Tue, 26 Mar 2024 22:28:35 +0000 Message-Id: <20240326222844.1422948-5-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240326222844.1422948-1-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20240326222844.1422948-1-prabhakar.mahadev-lad.rj@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Lad Prabhakar The pin configuration bits have been growing for every new SoCs being added for the pinctrl-rzg2l driver which would mean updating the macros every time for each new configuration. To avoid this allocate additional bits for pin configuration by relocating the known fixed bits to the very end of the configuration. Signed-off-by: Lad Prabhakar --- drivers/pinctrl/renesas/pinctrl-rzg2l.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/pinctrl/renesas/pinctrl-rzg2l.c b/drivers/pinctrl/renesas/pinctrl-rzg2l.c index fccac6d199cd..f2c71462de92 100644 --- a/drivers/pinctrl/renesas/pinctrl-rzg2l.c +++ b/drivers/pinctrl/renesas/pinctrl-rzg2l.c @@ -78,9 +78,9 @@ PIN_CFG_FILNUM | \ PIN_CFG_FILCLKSEL) -#define PIN_CFG_PIN_MAP_MASK GENMASK_ULL(35, 28) -#define PIN_CFG_PIN_REG_MASK GENMASK(27, 20) -#define PIN_CFG_MASK GENMASK(19, 0) +#define PIN_CFG_PIN_MAP_MASK GENMASK_ULL(62, 55) +#define PIN_CFG_PIN_REG_MASK GENMASK(54, 47) +#define PIN_CFG_MASK GENMASK(46, 0) /* * m indicates the bitmap of supported pins, a is the register index @@ -102,8 +102,8 @@ * (b * 8) and f is the pin configuration capabilities supported. */ #define RZG2L_SINGLE_PIN BIT_ULL(63) -#define RZG2L_SINGLE_PIN_INDEX_MASK GENMASK(30, 24) -#define RZG2L_SINGLE_PIN_BITS_MASK GENMASK(22, 20) +#define RZG2L_SINGLE_PIN_INDEX_MASK GENMASK(62, 56) +#define RZG2L_SINGLE_PIN_BITS_MASK GENMASK(55, 53) #define RZG2L_SINGLE_PIN_PACK(p, b, f) (RZG2L_SINGLE_PIN | \ FIELD_PREP_CONST(RZG2L_SINGLE_PIN_INDEX_MASK, (p)) | \ -- 2.34.1