openwrt/target/linux/bcm27xx/patches-6.6/950-0844-Pisound-Don-t-export-the-button-GPIO-via-sysfs-GPIO-.patch
Álvaro Fernández Rojas 8c405cdccc bcm27xx: add 6.6 kernel patches
The patches were generated from the RPi repo with the following command:
git format-patch v6.6.34..rpi-6.1.y

Some patches needed rebasing and, as usual, the applied and reverted, wireless
drivers, Github workflows, READMEs and defconfigs patches were removed.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-06-18 18:52:49 +02:00

56 lines
1.5 KiB
Diff

From 28ac7e0e6d4c28b9f1f4a0ef2fbbb95eb9cf6012 Mon Sep 17 00:00:00 2001
From: Giedrius <giedrius@blokas.io>
Date: Fri, 19 Jan 2024 10:55:55 +0000
Subject: [PATCH 0844/1085] Pisound: Don't export the button GPIO via sysfs
GPIO class.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Giedrius Trainavičius <giedrius@blokas.io>
---
sound/soc/bcm/pisound.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
--- a/sound/soc/bcm/pisound.c
+++ b/sound/soc/bcm/pisound.c
@@ -857,7 +857,6 @@ static int pisnd_ctl_uninit(void)
static struct gpio_desc *osr0, *osr1, *osr2;
static struct gpio_desc *reset;
-static struct gpio_desc *button;
static int pisnd_hw_params(
struct snd_pcm_substream *substream,
@@ -1016,8 +1015,6 @@ static int pisnd_init_gpio(struct device
reset = gpiod_get_index(dev, "reset", 0, GPIOD_ASIS);
- button = gpiod_get_index(dev, "button", 0, GPIOD_ASIS);
-
gpiod_direction_output(osr0, 1);
gpiod_direction_output(osr1, 1);
gpiod_direction_output(osr2, 1);
@@ -1029,8 +1026,6 @@ static int pisnd_init_gpio(struct device
gpiod_set_value(osr2, false);
gpiod_set_value(reset, true);
- gpiod_export(button, false);
-
return 0;
}
@@ -1039,11 +1034,9 @@ static int pisnd_uninit_gpio(void)
int i;
struct gpio_desc **gpios[] = {
- &osr0, &osr1, &osr2, &reset, &button,
+ &osr0, &osr1, &osr2, &reset,
};
- gpiod_unexport(button);
-
for (i = 0; i < ARRAY_SIZE(gpios); ++i) {
if (*gpios[i] == NULL) {
printd("weird, GPIO[%d] is NULL already\n", i);