Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp886387pxb; Wed, 27 Oct 2021 14:28:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyxXsIUnYpT83zxL7Ry1JTFp5w5/eqwjNjAH38xLYvRTcTMMq7aly+TQiXyXEy6lCV6Xh9c X-Received: by 2002:aa7:da05:: with SMTP id r5mr502554eds.238.1635370132753; Wed, 27 Oct 2021 14:28:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635370132; cv=none; d=google.com; s=arc-20160816; b=cqsoCRSPxv/lSRwmvG8BAHM8p6Ev6fAFJLWZEfccXNINvdV4JouBm63DtCh2tjDOMf CSip4qB0lWB0UAjUtM0TkzhyvKGMaYLCKf5x0MrumrH/7NDM0CYiyaxGiOVPm/jrSf+o NzAPMqnP9TXDB4xXDzsKjoPzvy5L+FvQci8HRl13U7Rv6JbxzyQGPBye+i5yZN1IibBg q4QKQGnBBjsNYk0I1qp2nbFpw3ecLl4vIDW6saXpMThC54PGF3ZTPqgHjlFPemvT+44O DVFUV2YRchpKX7kMzR3223Bb/1HBzYBnmgceg91RpvFRNFayfnMh8AmVGK3RCR06adQF V1zw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=YXddbRYRgB1KJlBw89NDXyyXqYmF430S3MR2uQBQjIU=; b=nA8lIDFWJ/3vip+Z1DxyO1+l/dd6yy7GhQCj1xF3fiPLUhFhaW8jWn1Lx9Fh3Q+/w8 yd1F2wHvOJ3bZPVH81AaffqJiVGkZ5FI+XM6SZ1NT7SZH2mHvVHbHif4tdq6s/1Djl6T Fg2nSaGR3pozdAIGveTVrx0147FlWXfTwtXwQZ1PX+/u2icOO8/FK4LpzpmVnwpP8Eov bLYBrxf4CCctZkSHVZZfE7Fb+FWvsyU9++GElmxsROcXedHj+w+weIItv8gOt77tYTcU lTKNMuyn67r4Edt39fQukP7jiAInkfVyT5aFHaiO0zUb/LZr+F33iktPu1XN8JUPKce1 xSOg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v6si1320846edf.419.2021.10.27.14.28.29; Wed, 27 Oct 2021 14:28:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242258AbhJ0Nrr (ORCPT + 97 others); Wed, 27 Oct 2021 09:47:47 -0400 Received: from relmlor1.renesas.com ([210.160.252.171]:39040 "EHLO relmlie5.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S242235AbhJ0Nrq (ORCPT ); Wed, 27 Oct 2021 09:47:46 -0400 X-IronPort-AV: E=Sophos;i="5.87,186,1631545200"; d="scan'208";a="98370789" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 27 Oct 2021 22:45:19 +0900 Received: from localhost.localdomain (unknown [10.226.36.204]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 791A54010DD8; Wed, 27 Oct 2021 22:45:17 +0900 (JST) From: Lad Prabhakar To: Linus Walleij , Rob Herring , Geert Uytterhoeven , linux-gpio@vger.kernel.org, devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Prabhakar , Biju Das , Lad Prabhakar Subject: [PATCH 2/4] pinctrl: pinconf-generic: Add support for "output-impedance-ohms" to be extracted from DT files Date: Wed, 27 Oct 2021 14:45:07 +0100 Message-Id: <20211027134509.5036-3-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211027134509.5036-1-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20211027134509.5036-1-prabhakar.mahadev-lad.rj@bp.renesas.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add "output-impedance-ohms" property to generic options used for DT parsing files. This enables drivers, which use generic pin configurations, to get the value passed to this property. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Reviewed-by: Biju Das --- RFC->v1 * Renamed PIN_CONFIG_OUTPUT_IMPEDANCE -> PIN_CONFIG_OUTPUT_IMPEDANCE_OHMS * Renamed output-impedance to output-impedance-ohms * Included RB tags * Updated description and commit message --- drivers/pinctrl/pinconf-generic.c | 2 ++ include/linux/pinctrl/pinconf-generic.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/drivers/pinctrl/pinconf-generic.c b/drivers/pinctrl/pinconf-generic.c index 22e8d4c4040e..f8edcc88ac01 100644 --- a/drivers/pinctrl/pinconf-generic.c +++ b/drivers/pinctrl/pinconf-generic.c @@ -46,6 +46,7 @@ static const struct pin_config_item conf_items[] = { PCONFDUMP(PIN_CONFIG_MODE_LOW_POWER, "pin low power", "mode", true), PCONFDUMP(PIN_CONFIG_OUTPUT_ENABLE, "output enabled", NULL, false), PCONFDUMP(PIN_CONFIG_OUTPUT, "pin output", "level", true), + PCONFDUMP(PIN_CONFIG_OUTPUT_IMPEDANCE_OHMS, "output impedance", "ohms", true), PCONFDUMP(PIN_CONFIG_POWER_SOURCE, "pin power source", "selector", true), PCONFDUMP(PIN_CONFIG_SLEEP_HARDWARE_STATE, "sleep hardware state", NULL, false), PCONFDUMP(PIN_CONFIG_SLEW_RATE, "slew rate", NULL, true), @@ -179,6 +180,7 @@ static const struct pinconf_generic_params dt_params[] = { { "output-disable", PIN_CONFIG_OUTPUT_ENABLE, 0 }, { "output-enable", PIN_CONFIG_OUTPUT_ENABLE, 1 }, { "output-high", PIN_CONFIG_OUTPUT, 1, }, + { "output-impedance-ohms", PIN_CONFIG_OUTPUT_IMPEDANCE_OHMS, 0 }, { "output-low", PIN_CONFIG_OUTPUT, 0, }, { "power-source", PIN_CONFIG_POWER_SOURCE, 0 }, { "sleep-hardware-state", PIN_CONFIG_SLEEP_HARDWARE_STATE, 0 }, diff --git a/include/linux/pinctrl/pinconf-generic.h b/include/linux/pinctrl/pinconf-generic.h index eee0e3948537..2422211d6a5a 100644 --- a/include/linux/pinctrl/pinconf-generic.h +++ b/include/linux/pinctrl/pinconf-generic.h @@ -91,6 +91,8 @@ struct pinctrl_map; * configuration (eg. the currently selected mux function) drive values on * the line. Use argument 1 to enable output mode, argument 0 to disable * it. + * @PIN_CONFIG_OUTPUT_IMPEDANCE_OHMS: this will configure the output impedance + * of the pin with the value passed as argument. The argument is in ohms. * @PIN_CONFIG_PERSIST_STATE: retain pin state across sleep or controller reset * @PIN_CONFIG_POWER_SOURCE: if the pin can select between different power * supplies, the argument to this parameter (on a custom format) tells @@ -129,6 +131,7 @@ enum pin_config_param { PIN_CONFIG_MODE_PWM, PIN_CONFIG_OUTPUT, PIN_CONFIG_OUTPUT_ENABLE, + PIN_CONFIG_OUTPUT_IMPEDANCE_OHMS, PIN_CONFIG_PERSIST_STATE, PIN_CONFIG_POWER_SOURCE, PIN_CONFIG_SKEW_DELAY, -- 2.17.1