1 From cd62562b276b5724d1c75ea1465937a5bd9037db Mon Sep 17 00:00:00 2001
2 From: Giedrius <giedrius@blokas.io>
3 Date: Fri, 19 Jan 2024 10:55:55 +0000
4 Subject: [PATCH 1249/1295] Pisound: Don't export the button GPIO via sysfs
7 Content-Type: text/plain; charset=UTF-8
8 Content-Transfer-Encoding: 8bit
10 Signed-off-by: Giedrius Trainavičius <giedrius@blokas.io>
12 sound/soc/bcm/pisound.c | 9 +--------
13 1 file changed, 1 insertion(+), 8 deletions(-)
15 --- a/sound/soc/bcm/pisound.c
16 +++ b/sound/soc/bcm/pisound.c
17 @@ -857,7 +857,6 @@ static int pisnd_ctl_uninit(void)
19 static struct gpio_desc *osr0, *osr1, *osr2;
20 static struct gpio_desc *reset;
21 -static struct gpio_desc *button;
23 static int pisnd_hw_params(
24 struct snd_pcm_substream *substream,
25 @@ -1016,8 +1015,6 @@ static int pisnd_init_gpio(struct device
27 reset = gpiod_get_index(dev, "reset", 0, GPIOD_ASIS);
29 - button = gpiod_get_index(dev, "button", 0, GPIOD_ASIS);
31 gpiod_direction_output(osr0, 1);
32 gpiod_direction_output(osr1, 1);
33 gpiod_direction_output(osr2, 1);
34 @@ -1029,8 +1026,6 @@ static int pisnd_init_gpio(struct device
35 gpiod_set_value(osr2, false);
36 gpiod_set_value(reset, true);
38 - gpiod_export(button, false);
43 @@ -1039,11 +1034,9 @@ static int pisnd_uninit_gpio(void)
46 struct gpio_desc **gpios[] = {
47 - &osr0, &osr1, &osr2, &reset, &button,
48 + &osr0, &osr1, &osr2, &reset,
51 - gpiod_unexport(button);
53 for (i = 0; i < ARRAY_SIZE(gpios); ++i) {
54 if (*gpios[i] == NULL) {
55 printd("weird, GPIO[%d] is NULL already\n", i);