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 D4D9E18C90F; Fri, 27 Sep 2024 12:31:43 +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=1727440303; cv=none; b=ReXDAg9uXWd7uX0gXNL8+RkRPK+lrM4mRnTPLfdiWdhfbLFiOk7dcx/0yGjb6H3fza7q1UMwlaGCDximTf5kHPB9eFiPMVavNxev1b3y/dambxCNBBHXzrS4PUj24C9drU4i7wbCV6LaCrHswe3LCUUbWe+ZuFxYof+WThdyOC0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727440303; c=relaxed/simple; bh=KTPUwqtxrDpbp5TRrq2pCDJqy1bidgeziiCzANLHBUI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=riEs8XfMQRQecEPABRbkS2qCPuqM5iiV7vPCxMn5Kh/KhTbJrBNPBgWct/8jRDyRZz7+GsPzH2qx9IcDQxpywMJ5r1TBukA38ShSUCuZZiTRt8et++UvK5ugg4dv5C5CfWiIiLN7QZB65n5b8dXCs6wdOqJsWhf/ynYACVBmIfo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=NYp+dKW+; 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="NYp+dKW+" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 62396C4CEC4; Fri, 27 Sep 2024 12:31:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1727440303; bh=KTPUwqtxrDpbp5TRrq2pCDJqy1bidgeziiCzANLHBUI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NYp+dKW+5OcoUo07oQZZUCzaXm18v0zVjdB2G7PtcfWWsxvMmXxmkjag5Md0YH06i 0HQFoMQm4WuIFUn624A8glgeOR+Jy7gY+gBWGmzm+34jO/W+ctExB34fydOEQb/b2p YzepsXACNvTBHg8bebKq/FlkwYMK+OvVwQjFJqhU= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Thomas Blocher , Linus Walleij , Sasha Levin Subject: [PATCH 6.1 07/73] pinctrl: at91: make it work with current gpiolib Date: Fri, 27 Sep 2024 14:23:18 +0200 Message-ID: <20240927121720.179583877@linuxfoundation.org> X-Mailer: git-send-email 2.46.2 In-Reply-To: <20240927121719.897851549@linuxfoundation.org> References: <20240927121719.897851549@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Thomas Blocher [ Upstream commit 752f387faaae0ae2e84d3f496922524785e77d60 ] pinctrl-at91 currently does not support the gpio-groups devicetree property and has no pin-range. Because of this at91 gpios stopped working since patch commit 2ab73c6d8323fa1e ("gpio: Support GPIO controllers without pin-ranges") This was discussed in the patches commit fc328a7d1fcce263 ("gpio: Revert regression in sysfs-gpio (gpiolib.c)") commit 56e337f2cf132632 ("Revert "gpio: Revert regression in sysfs-gpio (gpiolib.c)"") As a workaround manually set pin-range via gpiochip_add_pin_range() until a) pinctrl-at91 is reworked to support devicetree gpio-groups b) another solution as mentioned in commit 56e337f2cf132632 ("Revert "gpio: Revert regression in sysfs-gpio (gpiolib.c)"") is found Signed-off-by: Thomas Blocher Link: https://lore.kernel.org/5b992862-355d-f0de-cd3d-ff99e67a4ff1@ek-dev.de Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin --- drivers/pinctrl/pinctrl-at91.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c index ff3b6a8a0b170..333f9d70c7f48 100644 --- a/drivers/pinctrl/pinctrl-at91.c +++ b/drivers/pinctrl/pinctrl-at91.c @@ -1420,8 +1420,11 @@ static int at91_pinctrl_probe(struct platform_device *pdev) /* We will handle a range of GPIO pins */ for (i = 0; i < gpio_banks; i++) - if (gpio_chips[i]) + if (gpio_chips[i]) { pinctrl_add_gpio_range(info->pctl, &gpio_chips[i]->range); + gpiochip_add_pin_range(&gpio_chips[i]->chip, dev_name(info->pctl->dev), 0, + gpio_chips[i]->range.pin_base, gpio_chips[i]->range.npins); + } dev_info(&pdev->dev, "initialized AT91 pinctrl driver\n"); -- 2.43.0