All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Courbot <acourbot@nvidia.com>
To: Linus Walleij <linus.walleij@linaro.org>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	David Cohen <david.a.cohen@intel.com>,
	Sathyanarayanan Kuppuswamy <sathyanarayanan.kuppuswamy@intel.com>,
	Len Brown <lenb@kernel.org>
Subject: Re: [PATCH v4 2/2] gpiolib: append SFI helpers for GPIO API
Date: Tue, 10 Dec 2013 11:46:52 +0900	[thread overview]
Message-ID: <52A6809C.7020406@nvidia.com> (raw)
In-Reply-To: <CACRpkdZRE4zrpKBQE+V9_P+y+YfA1wtu7bRDq+NJt1kohCSH1w@mail.gmail.com>

On 12/09/2013 10:27 PM, Linus Walleij wrote:
> On Mon, Dec 9, 2013 at 2:02 PM, Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
>> On Mon, 2013-12-09 at 15:04 +0200, Mika Westerberg wrote:
>>> On Mon, Dec 09, 2013 at 01:50:29PM +0200, Andy Shevchenko wrote:
>
>>>> +struct gpio_desc *sfi_get_gpiod_by_name(const char *name)
>>>> +{
>>>> +   struct sfi_gpio_table_entry *pentry;
>>>> +
>>>> +   pentry = sfi_gpio_get_entry_by_name(name);
>>>> +   if (IS_ERR(pentry))
>>>> +           return pentry;
>>>> +
>>>> +   return gpio_to_desc(pentry->pin_no);
>>>> +}
>>>
>>> Do you really need add a new file just to have the above supported? I mean
>>> that if you place that function to drivers/gpio/gpiolib.c with the
>>> appropriate:
> (...)
>>
>> I won't have linux/sfi.h in the gpiolib.c. If Linus has no objections, I
>> can do that of course.
>
> #ifdef:s are ugly according to Linus (Documentation/CodingStyle)
> and according to this instance of Linus as well. So I actually prefer
> so have a separate file.

Also agree with that. If anything, I'd like to see the DT/ACPI specific 
functions moved into a different file at some point.

> I really like the way this patch set developed to abstract away
> the SFI internals into this gpiolib sidecar, thanks!

Yes - that's a great followup to Mika's work on ACPI and it's nice to 
see this interface adopted (at least on the producer side).


      parent reply	other threads:[~2013-12-10  2:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-09 11:50 [PATCH v4 0/2] gpiolib, sfi: introduce SFI GPIO helpers Andy Shevchenko
2013-12-09 11:50 ` [PATCH v4 1/2] SFI: store GPIO table and export lookup function Andy Shevchenko
2013-12-09 11:50 ` [PATCH v4 2/2] gpiolib: append SFI helpers for GPIO API Andy Shevchenko
2013-12-09 13:04   ` Mika Westerberg
2013-12-09 13:02     ` Andy Shevchenko
2013-12-09 13:27       ` Linus Walleij
2013-12-09 13:32         ` Andy Shevchenko
2013-12-09 14:15           ` Linus Walleij
2013-12-09 14:22             ` Andy Shevchenko
2013-12-10  2:46         ` Alex Courbot [this message]

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=52A6809C.7020406@nvidia.com \
    --to=acourbot@nvidia.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=david.a.cohen@intel.com \
    --cc=lenb@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@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 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.