[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACRpkdY-Zm+Yoh5NuVHShgGDNWKW9jqwGHNYKgGoz5YgRK4bgw@mail.gmail.com>
Date: Tue, 30 Jun 2015 08:32:30 +0200
From: Linus Walleij <linus.walleij@...aro.org>
To: Alexandre Courbot <gnurou@...il.com>
Cc: Tobias Diedrich <ranma+kernel@...edrich.de>,
Mika Westerberg <mika.westerberg@...ux.intel.com>,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
"linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] gpio / ACPI: Add label to the gpio request
On Mon, Jun 15, 2015 at 4:29 AM, Alexandre Courbot <gnurou@...il.com> wrote:
> On Mon, Jun 15, 2015 at 7:00 AM, Tobias Diedrich
> <ranma+kernel@...edrich.de> wrote:
>> In leds-gpio.c create_gpio_led only the legacy path propagates the label
>> by passing it into devm_gpio_request_one. Similarily gpio_keys_polled.c
>> also neglects to propagate the name to the gpio subsystem.
>>
>> On the newer devicetree/acpi path the label is lost as far as the GPIO
>> subsystem goes (it is only retained as name in struct gpio_led.
>>
>> Amend devm_get_gpiod_from_child to take an additonal (optional) label
>> argument and propagate it so it will show up in /sys/kernel/debug/gpio.
>>
>> So instead of:
>>
>> GPIOs 288-511, platform/PRP0001:00, AMD SBX00:
>> gpio-475 (? ) in hi
>> gpio-477 (? ) out hi
>> gpio-478 (? ) out lo
>> gpio-479 (? ) out hi
>>
>> we get the much nicer output:
>>
>> GPIOs 288-511, platform/PRP0001:00, AMD SBX00:
>> gpio-475 (switch1 ) in hi
>> gpio-477 (led1 ) out hi
>> gpio-478 (led2 ) out lo
>> gpio-479 (led3 ) out hi
>
> We want to reuse higher-level information (like the con_id) as much as
> possible to generate labels, but in the case of
> devm_get_gpiod_from_child() there is no such information available
> anyway, so why not.
>
> Acked-by: Alexandre Courbot <acourbot@...dia.com>
I don't have the actual v2 patch in my inbox :(
Tobias, can you resend a v3 with the ACKs.
Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists