Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp264865pxb; Thu, 30 Sep 2021 05:43:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwC6VCPO8MyfTD4mIFoqEoWfhfmXdp7Omh+h4LFC11c26ELaRHEcRR4KmrPdURSSClCeCth X-Received: by 2002:a17:90a:7348:: with SMTP id j8mr6204989pjs.104.1633005822407; Thu, 30 Sep 2021 05:43:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633005822; cv=none; d=google.com; s=arc-20160816; b=oYFN3j7x6+ZsZIXHQ4SMwDj4F+C67NgT2auL3fu+nYJt9v7GdOOa/6XeH0PiNrvQ5g t8l5ENvtmp7HHfQJZ4KsdLMFYM50xqj6q2TTE2LAz7NciwQlh3eXbaqBdvB+P8ELNJ/e 9BAr1Js9TRQFpQ7npB1AQdsUhLg5l2iLKwxgD4UiyhHIyAnec7v03JntdVvFmXGb3Qsv COs1/xFQnT4aLinYx3cchFgic1rojkX4khuBBLArrl0FOCcgDpLJ2si+FPjx5myhEcf8 3y1a7lnokI0QvknpZv9bitfvilzH1HO5Bd7yW5WvMZyX+HfIzUrMyRLcSopKdkbhS10B vTIA== 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=v2WDI/EKVxNA8IKH8ItnYGozvARxBc3J3FsyhkDiluQ=; b=YQ/UZAuXGdGYVmNnaAfRWbslHYe1IieZ5gzuPXbIlz2bF5ICiWkmlYFBnQxHyZ4L08 v4/Zfxu5Karm79VBpYr81HQM8tll7Xy89IboG9jvN0N2XaSetToWPBQVTWHN/lbJquEK +ZVj6YpX+hpxOxRGkk/RxlkYepwlKQAHQ4ezPooSDYaETjjsYlegnGOBXvlGufxfU5WD F/gULc7BcCqylZ1I0eHIVmdbzvz7u2oRviUyg6wxU7T8+eDFwqf0m539UGQr0MdK01ZV HqWSqVnSZW6XZAA9+nkI1IO+V79DQdC53vn5I1H+jQTxQXc8BaK+tPwmyxFU1k8bqMzX zO+Q== 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 d184si3604697pfa.143.2021.09.30.05.43.07; Thu, 30 Sep 2021 05:43:42 -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 S1350826AbhI3MTI (ORCPT + 99 others); Thu, 30 Sep 2021 08:19:08 -0400 Received: from relmlor1.renesas.com ([210.160.252.171]:43517 "EHLO relmlie5.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1350818AbhI3MTF (ORCPT ); Thu, 30 Sep 2021 08:19:05 -0400 X-IronPort-AV: E=Sophos;i="5.85,336,1624287600"; d="scan'208";a="95535895" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 30 Sep 2021 21:17:21 +0900 Received: from localhost.localdomain (unknown [10.226.36.204]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 2FC1D437E760; Thu, 30 Sep 2021 21:17:19 +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: [RFC PATCH 2/4] pinctrl: pinconf-generic: Add support for "output-impedance" to be extracted from DT files Date: Thu, 30 Sep 2021 13:16:28 +0100 Message-Id: <20210930121630.17449-3-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210930121630.17449-1-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20210930121630.17449-1-prabhakar.mahadev-lad.rj@bp.renesas.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add "output-impedance" 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 --- 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..3bff4e4340b9 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, "output impedance", "ohm", 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", PIN_CONFIG_OUTPUT_IMPEDANCE, 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..e6293ebd4052 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: this will configure the pins output impedance with + * the value passed as argument. The argument is in ohm. * @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, PIN_CONFIG_PERSIST_STATE, PIN_CONFIG_POWER_SOURCE, PIN_CONFIG_SKEW_DELAY, -- 2.17.1