From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0B22032D7F1 for ; Tue, 3 Feb 2026 14:07:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770127670; cv=none; b=cXMsAnnzpJSztcszHnMloUsl9XJXR8qBKPbZq6kS15gOgiEk4TpkL/95ROhiDVbqRmcUT+TnF8KpEiNvtZCmOYThs/lRx32P+rOclQrnQ97F3E/W9U+yturmIW6uLuyuYj9WAzec4Pz8JRRfgu/6TAxuT8GjMUpoM/wofg9D8PE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770127670; c=relaxed/simple; bh=fU8JSEVgboMNI5CsVQbATvMV1zLNRx44eqKtt1HWscI=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=nyNO1CTKOwttiXe/q0asUOjxezUAWXS8BfJP9noC2BEX2td8XK5ksRUoJ1EKXBnHuCAn8swf651UeNcuJ/Bei9s/wJeW8snzGGWshURL2Xy2JCBKheQjSJcBQtYAKmJRyluJZPs1QKR+uZ2pLcaJxSNKSIFRhGTOLqVCcbQeuXE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=o200cnWq; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="o200cnWq" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2C0E9C116D0; Tue, 3 Feb 2026 14:07:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1770127669; bh=fU8JSEVgboMNI5CsVQbATvMV1zLNRx44eqKtt1HWscI=; h=Subject:To:Cc:From:Date:From; b=o200cnWq2JZbpxr/7OKZufSEaUCu6gwlLSn8AFgrn8nPhSU5X7UUg8ln1Zi+a9WL2 tntdJKkEnnKRN7BOJxRzb+j1lKjD/EMyKlfNDp4Q5gEW+lHvHdLQ6ZSvcppns2OTLN uCvzfrqZAQY9ZlkxhsEsKOMCtOvkMZ4LBBySDVSE= Subject: FAILED: patch "[PATCH] pinctrl: lpass-lpi: implement .get_direction() for the GPIO" failed to apply to 6.1-stable tree To: bartosz.golaszewski@oss.qualcomm.com,abel.vesa@oss.qualcomm.com,abelvesa@kernel.org,konrad.dybcio@oss.qualcomm.com,linusw@kernel.org Cc: From: Date: Tue, 03 Feb 2026 15:07:46 +0100 Message-ID: <2026020346-busily-dreaded-eb2c@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit The patch below does not apply to the 6.1-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.1.y git checkout FETCH_HEAD git cherry-pick -x 4f0d22ec60cee420125f4055af76caa0f373a3fe # git commit -s git send-email --to '' --in-reply-to '2026020346-busily-dreaded-eb2c@gregkh' --subject-prefix 'PATCH 6.1.y' HEAD^.. Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 4f0d22ec60cee420125f4055af76caa0f373a3fe Mon Sep 17 00:00:00 2001 From: Bartosz Golaszewski Date: Mon, 26 Jan 2026 14:56:27 +0100 Subject: [PATCH] pinctrl: lpass-lpi: implement .get_direction() for the GPIO driver GPIO controller driver should typically implement the .get_direction() callback as GPIOLIB internals may try to use it to determine the state of a pin. Add it for the LPASS LPI driver. Reported-by: Abel Vesa Cc: stable@vger.kernel.org Fixes: 6e261d1090d6 ("pinctrl: qcom: Add sm8250 lpass lpi pinctrl driver") Signed-off-by: Bartosz Golaszewski Reviewed-by: Konrad Dybcio Tested-by: Konrad Dybcio # X1E CRD Tested-by: Abel Vesa Signed-off-by: Linus Walleij diff --git a/drivers/pinctrl/qcom/pinctrl-lpass-lpi.c b/drivers/pinctrl/qcom/pinctrl-lpass-lpi.c index 78212f992843..76aed3296279 100644 --- a/drivers/pinctrl/qcom/pinctrl-lpass-lpi.c +++ b/drivers/pinctrl/qcom/pinctrl-lpass-lpi.c @@ -312,6 +312,22 @@ static const struct pinconf_ops lpi_gpio_pinconf_ops = { .pin_config_group_set = lpi_config_set, }; +static int lpi_gpio_get_direction(struct gpio_chip *chip, unsigned int pin) +{ + unsigned long config = pinconf_to_config_packed(PIN_CONFIG_LEVEL, 0); + struct lpi_pinctrl *state = gpiochip_get_data(chip); + unsigned long arg; + int ret; + + ret = lpi_config_get(state->ctrl, pin, &config); + if (ret) + return ret; + + arg = pinconf_to_config_argument(config); + + return arg ? GPIO_LINE_DIRECTION_OUT : GPIO_LINE_DIRECTION_IN; +} + static int lpi_gpio_direction_input(struct gpio_chip *chip, unsigned int pin) { struct lpi_pinctrl *state = gpiochip_get_data(chip); @@ -409,6 +425,7 @@ static void lpi_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip) #endif static const struct gpio_chip lpi_gpio_template = { + .get_direction = lpi_gpio_get_direction, .direction_input = lpi_gpio_direction_input, .direction_output = lpi_gpio_direction_output, .get = lpi_gpio_get,