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 E15681E1C33; Wed, 6 Nov 2024 12:56:16 +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=1730897777; cv=none; b=i/HX/on/PzY8pSGJncOnd+zW+8NWAAYhzatwom+kSe+NDGCry0cGBSLpI1lfdkTfXQ9o31jehtzgKkbIH+ok98fTrHFREeyAN/v0N+fZDO1/DpGN32QjEshuRqDuyrlV15BUzZY6LA0kd6kvzK91Rd+vEBgH8+HSnsD2SAKKMUk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730897777; c=relaxed/simple; bh=Sj+FIswdoGNSXjQExOGbIVENQJtjIjx4qdgrB+QE0D0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bEaBgM2CBVkVt+7oNo+oRYNTpwWaXGYDu8QRzG2ou0ue66mqpuGpE3iKtwJ4ticQeSJGlnzOthpoR4bpmh/KoRqwPy0IaobRwJLKlIUQedzUKCsvOBDZBQFVao+ePWAZPC9GMYD9TotOz0vamzrqydAUME9VvuK55q0TDPxKhTc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=2vZ1eNOR; 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="2vZ1eNOR" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2D94DC4CECD; Wed, 6 Nov 2024 12:56:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1730897776; bh=Sj+FIswdoGNSXjQExOGbIVENQJtjIjx4qdgrB+QE0D0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2vZ1eNOR2kR/fhBUcIi1JdFzrnaBsASsY2iUB2LISCvMrdGa86FamZxO/GDx8SOiH ZbHJBpobwS6eoc1zsPOHIitk/B3pL9nciJLABrLVmmwPWIKerJ/kYJbLCYm4xrPJmT o4vxfaRpD7TS22gyohhWbgPgrFuRwlXsh+9VLaUY= 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 5.4 016/462] pinctrl: at91: make it work with current gpiolib Date: Wed, 6 Nov 2024 12:58:29 +0100 Message-ID: <20241106120331.909509806@linuxfoundation.org> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241106120331.497003148@linuxfoundation.org> References: <20241106120331.497003148@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 5.4-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 39a55fd85b192..4e6e151db11f2 100644 --- a/drivers/pinctrl/pinctrl-at91.c +++ b/drivers/pinctrl/pinctrl-at91.c @@ -1398,8 +1398,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