]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
pinctrl: pinconf-generic: Add properties 'input-threshold-voltage-microvolt'
authorTzuyi Chang <tychang@realtek.com>
Tue, 17 Mar 2026 11:54:05 +0000 (19:54 +0800)
committerLinus Walleij <linusw@kernel.org>
Mon, 23 Mar 2026 08:59:34 +0000 (09:59 +0100)
Add a new generic pin configuration parameter PIN_CONFIG_INPUT_VOLTAGE_UV.
This parameter is used to specify the input voltage level of a pin in
microvolts, which corresponds to the 'input-voltage-microvolt' property
in Device Tree.

Reviewed-by: Linus Walleij <linusw@kernel.org>
Signed-off-by: Tzuyi Chang <tychang@realtek.com>
Co-developed-by: Yu-Chun Lin <eleanor.lin@realtek.com>
Signed-off-by: Yu-Chun Lin <eleanor.lin@realtek.com>
Signed-off-by: Linus Walleij <linusw@kernel.org>
drivers/pinctrl/pinconf-generic.c
include/linux/pinctrl/pinconf-generic.h

index faa03a7967ee0828b74daa2a065871e08f03f9bd..6daa9729dd1300990aa7eff7e2998fd1be541498 100644 (file)
@@ -57,6 +57,7 @@ static const struct pin_config_item conf_items[] = {
        PCONFDUMP(PIN_CONFIG_SKEW_DELAY, "skew delay", NULL, true),
        PCONFDUMP(PIN_CONFIG_SKEW_DELAY_INPUT_PS, "input skew delay", "ps", true),
        PCONFDUMP(PIN_CONFIG_SKEW_DELAY_OUTPUT_PS, "output skew delay", "ps", true),
+       PCONFDUMP(PIN_CONFIG_INPUT_VOLTAGE_UV, "input voltage in microvolt", "uV", true),
 };
 
 static void pinconf_generic_dump_one(struct pinctrl_dev *pctldev,
@@ -203,6 +204,7 @@ static const struct pinconf_generic_params dt_params[] = {
        { "skew-delay", PIN_CONFIG_SKEW_DELAY, 0 },
        { "skew-delay-input-ps", PIN_CONFIG_SKEW_DELAY_INPUT_PS, 0 },
        { "skew-delay-output-ps", PIN_CONFIG_SKEW_DELAY_OUTPUT_PS, 0 },
+       { "input-threshold-voltage-microvolt", PIN_CONFIG_INPUT_VOLTAGE_UV, 0 },
 };
 
 /**
index 531dc3e9b3f758b95d6ad9b406a3295ac1eb05b5..a5d4b2d8633ab73777a74a104c933bf3241f5db3 100644 (file)
@@ -83,6 +83,8 @@ struct pinctrl_map;
  *      schmitt-trigger mode is disabled.
  * @PIN_CONFIG_INPUT_SCHMITT_UV: this will configure an input pin to run in
  *     schmitt-trigger mode. The argument is in uV.
+ * @PIN_CONFIG_INPUT_VOLTAGE_UV: this will configure the input voltage level of
+ * the pin. The argument is specified in microvolts.
  * @PIN_CONFIG_MODE_LOW_POWER: this will configure the pin for low power
  *     operation, if several modes of operation are supported these can be
  *     passed in the argument on a custom form, else just use argument 1
@@ -145,6 +147,7 @@ enum pin_config_param {
        PIN_CONFIG_INPUT_SCHMITT,
        PIN_CONFIG_INPUT_SCHMITT_ENABLE,
        PIN_CONFIG_INPUT_SCHMITT_UV,
+       PIN_CONFIG_INPUT_VOLTAGE_UV,
        PIN_CONFIG_MODE_LOW_POWER,
        PIN_CONFIG_MODE_PWM,
        PIN_CONFIG_LEVEL,