* [PATCH] gpio: serial: max310x: Use HW type for gpio_chip's label
@ 2018-01-26 19:02 Jan Kundrát
2018-02-07 13:36 ` Linus Walleij
0 siblings, 1 reply; 3+ messages in thread
From: Jan Kundrát @ 2018-01-26 19:02 UTC (permalink / raw)
To: linux-gpio
Cc: linux-serial, Linus Walleij, Greg Kroah-Hartman, Alexander Shiyan
Some debugging tools (/sys/kernel/debug/gpio, `lsgpio`) use the
gpio_chip's label for displaying an additional context. Right now, the
information duplicates stuff which is already available from the
parent's device. This is how e.g. `lsgpio`'s output looks like:
GPIO chip: gpiochip2, "spi1.2", 16 GPIO lines
Comparing the output of other GPIO expanders that I have available:
gpiochip4: GPIOs 464-479, parent: spi/spi1.1, mcp23s17, can sleep:
gpiochip5: GPIOs 448-463, parent: i2c/0-0020, pca9555, can sleep:
gpiochip2: GPIOs 496-511, parent: spi/spi1.2, spi1.2, can sleep:
This patch ensures that the type of the real HW device is shown instead
of duplicating the SPI path:
gpiochip2: GPIOs 496-511, parent: spi/spi1.2, MAX14830, can sleep:
Signed-off-by: Jan Kundrát <jan.kundrat@cesnet.cz>
---
drivers/tty/serial/max310x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/serial/max310x.c b/drivers/tty/serial/max310x.c
index 39f635812077..efe55a1a0615 100644
--- a/drivers/tty/serial/max310x.c
+++ b/drivers/tty/serial/max310x.c
@@ -1318,7 +1318,7 @@ static int max310x_probe(struct device *dev, struct max310x_devtype *devtype,
/* Setup GPIO cotroller */
s->gpio.owner = THIS_MODULE;
s->gpio.parent = dev;
- s->gpio.label = dev_name(dev);
+ s->gpio.label = devtype->name;
s->gpio.direction_input = max310x_gpio_direction_input;
s->gpio.get = max310x_gpio_get;
s->gpio.direction_output= max310x_gpio_direction_output;
--
2.14.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] gpio: serial: max310x: Use HW type for gpio_chip's label
2018-01-26 19:02 [PATCH] gpio: serial: max310x: Use HW type for gpio_chip's label Jan Kundrát
@ 2018-02-07 13:36 ` Linus Walleij
2018-02-07 14:23 ` Greg Kroah-Hartman
0 siblings, 1 reply; 3+ messages in thread
From: Linus Walleij @ 2018-02-07 13:36 UTC (permalink / raw)
To: Jan Kundrát
Cc: linux-gpio, linux-serial, Greg Kroah-Hartman, Alexander Shiyan
On Fri, Jan 26, 2018 at 8:02 PM, Jan Kundrát <jan.kundrat@cesnet.cz> wrote:
> Some debugging tools (/sys/kernel/debug/gpio, `lsgpio`) use the
> gpio_chip's label for displaying an additional context. Right now, the
> information duplicates stuff which is already available from the
> parent's device. This is how e.g. `lsgpio`'s output looks like:
>
> GPIO chip: gpiochip2, "spi1.2", 16 GPIO lines
>
> Comparing the output of other GPIO expanders that I have available:
>
> gpiochip4: GPIOs 464-479, parent: spi/spi1.1, mcp23s17, can sleep:
> gpiochip5: GPIOs 448-463, parent: i2c/0-0020, pca9555, can sleep:
> gpiochip2: GPIOs 496-511, parent: spi/spi1.2, spi1.2, can sleep:
>
> This patch ensures that the type of the real HW device is shown instead
> of duplicating the SPI path:
>
> gpiochip2: GPIOs 496-511, parent: spi/spi1.2, MAX14830, can sleep:
>
> Signed-off-by: Jan Kundrát <jan.kundrat@cesnet.cz>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Greg, pls apply this to your TTY tree.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] gpio: serial: max310x: Use HW type for gpio_chip's label
2018-02-07 13:36 ` Linus Walleij
@ 2018-02-07 14:23 ` Greg Kroah-Hartman
0 siblings, 0 replies; 3+ messages in thread
From: Greg Kroah-Hartman @ 2018-02-07 14:23 UTC (permalink / raw)
To: Linus Walleij
Cc: Jan Kundrát, linux-gpio, linux-serial, Alexander Shiyan
On Wed, Feb 07, 2018 at 02:36:33PM +0100, Linus Walleij wrote:
> On Fri, Jan 26, 2018 at 8:02 PM, Jan Kundrát <jan.kundrat@cesnet.cz> wrote:
>
> > Some debugging tools (/sys/kernel/debug/gpio, `lsgpio`) use the
> > gpio_chip's label for displaying an additional context. Right now, the
> > information duplicates stuff which is already available from the
> > parent's device. This is how e.g. `lsgpio`'s output looks like:
> >
> > GPIO chip: gpiochip2, "spi1.2", 16 GPIO lines
> >
> > Comparing the output of other GPIO expanders that I have available:
> >
> > gpiochip4: GPIOs 464-479, parent: spi/spi1.1, mcp23s17, can sleep:
> > gpiochip5: GPIOs 448-463, parent: i2c/0-0020, pca9555, can sleep:
> > gpiochip2: GPIOs 496-511, parent: spi/spi1.2, spi1.2, can sleep:
> >
> > This patch ensures that the type of the real HW device is shown instead
> > of duplicating the SPI path:
> >
> > gpiochip2: GPIOs 496-511, parent: spi/spi1.2, MAX14830, can sleep:
> >
> > Signed-off-by: Jan Kundrát <jan.kundrat@cesnet.cz>
>
> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
>
> Greg, pls apply this to your TTY tree.
Ok, let me wait until 4.16-rc1 is out first :)
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-02-07 14:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-26 19:02 [PATCH] gpio: serial: max310x: Use HW type for gpio_chip's label Jan Kundrát
2018-02-07 13:36 ` Linus Walleij
2018-02-07 14:23 ` Greg Kroah-Hartman
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.