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 5C1E718C005; Fri, 27 Sep 2024 12:25:53 +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=1727439953; cv=none; b=bfIXGoS84ZunOw7k/QU5SQqaUOUxE6UKDnb4jE2c/frrsAac1sbh4PdJe6KVH9O+TkNhQeE7utEoxlN7DBZE/PMRU1oDM/5MCh0hT2AYIoAA0tJY3xZBg9dQMX5ZVaBDJp0e7attgk6BnxqeHgkwokvAt8Zq28Zv8uHq7DeHxxE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727439953; c=relaxed/simple; bh=wcpIu4k01CUD+DM7rVM5qKyE4dyv0MR6AVsIa9eQiRY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Bf42cPvxLDaBXQLogNHh4bLVQ/NHmCDfXqmTTffqqxTZ2cJxkQtAdp1p5zvZjhWdXf39nlxbN5v50k28JDx/o86lW+6aBsYmnGcociCJ+7ac9Sf07Rvfj9hyJxnw+2EOUxpCPzuUHt68fWsJSwkE1/DpkZ+EkBRY0IQWHr5Ttfs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=LaAljsGu; 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="LaAljsGu" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DD050C4CECD; Fri, 27 Sep 2024 12:25:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1727439953; bh=wcpIu4k01CUD+DM7rVM5qKyE4dyv0MR6AVsIa9eQiRY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LaAljsGuv2YLhSQPbeEw30qONzrKPBVO4AVZ6yW61J7d/XemJyzSn9re+mq5FTVP0 qRCtErqUXy+EyM4AcGWdLRe5KgsIyRcLuF/dmGI3ujk0GxDQrSGyska4fc6/zG79pi z4PjWrALFngcbjnUB22YVxOyBJdWQiGoMm8OT8sE= 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.6 08/54] pinctrl: at91: make it work with current gpiolib Date: Fri, 27 Sep 2024 14:23:00 +0200 Message-ID: <20240927121720.051491384@linuxfoundation.org> X-Mailer: git-send-email 2.46.2 In-Reply-To: <20240927121719.714627278@linuxfoundation.org> References: <20240927121719.714627278@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-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 608f55c5ba5fe..ad30fd47a4bb0 100644 --- a/drivers/pinctrl/pinctrl-at91.c +++ b/drivers/pinctrl/pinctrl-at91.c @@ -1410,8 +1410,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(dev, "initialized AT91 pinctrl driver\n"); -- 2.43.0