lkml.org 
[lkml]   [2013]   [Nov]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v1.2] gpiolib: append SFI helpers for GPIO API
On 11/19/2013 01:27 AM, Alex Courbot wrote:
> On 11/19/2013 06:24 PM, Linus Walleij wrote:
>> On Wed, Jun 5, 2013 at 3:58 PM, Andy Shevchenko
>> <andriy.shevchenko@linux.intel.com> wrote:
>>
>>> To support some (legacy) firmwares and platforms let's make life
>>> easier for
>>> their customers.
>>>
>>> This patch extracts SFI GPIO API from arch/x86/platform/mrst/mrst.c.
>>>
>>> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>>
>> So since this patch was ACKed the world has changed a bit and now
>> I want new changes (or maybe I was tired and not paying enough
>> attention at the time).

Agreed. Even my e-mail was outdated :)
Updating from david.a.cohen@intel.com to david.a.cohen@linux.intel.com
to avoid M$ servers.

>>
>> (...)
>>> +int sfi_get_gpio_by_name(const char *name)
>>> +{
>>> + struct sfi_gpio_table_entry *pentry = sfi_gpio_table;
>>> + int i;
>>> +
>>> + if (!pentry)
>>> + return -EINVAL;
>>> +
>>> + for (i = 0; i < sfi_gpio_num_entry; i++, pentry++) {
>>> + if (!strncmp(name, pentry->pin_name, SFI_NAME_LEN))
>>> + return pentry->pin_no;
>>> + }
>>> +
>>> + return -ENODEV;
>>> +}
>>> +EXPORT_SYMBOL_GPL(sfi_get_gpio_by_name);
>>
>> Last merge window we merged the GPIO descriptor API and this
>> is now the recommended way to handle GPIOs and it is also
>> deployed into the ACPI and DT implementations.
>>
>> So I'd like the signature of this function changed to return
>> a GPIO descriptor rather than an int so we don't stockpile more
>> stuff to refactor.
>>
>> i.e.:
>> struct gpio_desc *sfi_get_gpio_by_name(const char *name);
>>
>> --- /dev/null
>>> +++ b/include/linux/sfi_gpio.h
>>
>> Maybe that header could move to <linux/gpio/sfi.h> instead.
>> Alexandre what do you think?
>
> Agreed - all the GPIO drivers into drivers/gpio, all the headers into
> include/linux/gpio. Logical. :)

Sounds nice.
Andy, would you like to update the patch or should I go ahead and
resend it myself?

Br, David Cohen


\
 
 \ /
  Last update: 2013-11-19 19:01    [W:0.067 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site