From: David Cohen <david.a.cohen@linux.intel.com>
To: Alex Courbot <acourbot@nvidia.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
Sathyanarayanan Kuppuswamy <sathyanarayanan.kuppuswamy@intel.com>,
Len Brown <lenb@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Grant Likely <grant.likely@linaro.org>,
Mika Westerberg <mika.westerberg@linux.intel.com>
Subject: Re: [PATCH v1.2] gpiolib: append SFI helpers for GPIO API
Date: Tue, 19 Nov 2013 09:32:54 -0800 [thread overview]
Message-ID: <528BA0C6.8010604@linux.intel.com> (raw)
In-Reply-To: <528B2EF2.5010104@nvidia.com>
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
next prev parent reply other threads:[~2013-11-19 17:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1370440690-21898-1-git-send-email-andriy.shevchenko@linux.intel.com>
2013-11-19 9:24 ` [PATCH v1.2] gpiolib: append SFI helpers for GPIO API Linus Walleij
2013-11-19 9:27 ` Alex Courbot
2013-11-19 17:32 ` David Cohen [this message]
2013-11-20 12:55 ` Andy Shevchenko
2013-11-20 14:36 ` Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=528BA0C6.8010604@linux.intel.com \
--to=david.a.cohen@linux.intel.com \
--cc=acourbot@nvidia.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=grant.likely@linaro.org \
--cc=lenb@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=sathyanarayanan.kuppuswamy@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).