All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Arnd Bergmann <arnd@arndb.de>,
	kbuild test robot <fengguang.wu@intel.com>,
	"kbuild-all@01.org" <kbuild-all@01.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	tipbuild@zytor.com, Ingo Molnar <mingo@kernel.org>
Subject: Re: [tip:x86/platform 1/1] platform_bt.c:undefined reference to `gpiod_add_lookup_table'
Date: Fri, 7 Apr 2017 12:36:47 +0200	[thread overview]
Message-ID: <CACRpkdY_1egwEhF9N=YmOfsF5hyR-78+tvucrWaiiv6RojYwJw@mail.gmail.com> (raw)
In-Reply-To: <CAHp75VeXW3=Nma7OmZjj0GAGDeO6BBkVDNSYgrXwVp0Q62VhPw@mail.gmail.com>

On Fri, Apr 7, 2017 at 10:57 AM, Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
> On Fri, Apr 7, 2017 at 11:16 AM, Linus Walleij <linus.walleij@linaro.org> wrote:

>> If it is just a stub without much code I guess that is prettier, but
>> still it is a bit weird, because I guess the table that are passed
>> to gpiod_add_lookup_table() will still be compiled into the object
>> so you are anyways carrying cruft, and then what is the point in
>> not just doing select GPIOLIB.
>
> Because it's optional to HCIUART_BCM as far as I know. But I didn't
> look closer to possibilities there (IIRC there no *_optional() calls
> to GPIOLIB).

Do you mean for adding tables?
We have:
devm_gpiod_get_optional() & friends.

They return NULL if the GPIO is not there, or if the
GPIO library is compiled out (as of HEAD, due to the
patch from Dmitry T.)

>> IMO SFI is just another hardware description language, and
>> SFI-described GPIO should be in drivers/gpio/gpiolib-sfi.c or
>> something like this akin to ACPI and OF. Why is it contained as
>> platform hacks?
>
> We have already discussed this a lot when I proposed to create
> something like gpiolib-sfi.c. We have only legacy stuff with SFI amd
> SFI perse is 99% useless. To not uglify drivers we in any case have to
> hardcode mappings between weird SFI names to what drivers are
> expecting.
> So, it does not worth doing it.

Aha OK. Yeah you know this way better than me so I trust
you on this.


>> So I'm a bit worried that we are seeing a symptom of board data
>> stockpiling in arch/x86 and not really a GPIO compilation problem.
>
> Don't be. I'm trying to avoid this and my plan is actually to modify
> bootloader on that board to provide ACPI tables instead. This will
> hide all crappy stuff in bootloader, though we better to support
> legacy (stock) bootloader as well and thus platform data.

OK sounds reasonable. Kind of like the attached device tree we
do on ARM.

Yours,
Linus Walleij

  reply	other threads:[~2017-04-07 10:36 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-02 23:23 [tip:x86/platform 1/1] platform_bt.c:undefined reference to `gpiod_add_lookup_table' kbuild test robot
2017-04-03  8:13 ` Andy Shevchenko
2017-04-03  9:31   ` Arnd Bergmann
2017-04-03  9:36     ` Andy Shevchenko
2017-04-03  9:44       ` Andy Shevchenko
2017-04-04 15:27         ` Andy Shevchenko
2017-04-07  8:16           ` Linus Walleij
2017-04-07  8:57             ` Andy Shevchenko
2017-04-07 10:36               ` Linus Walleij [this message]
2017-04-18 13:41                 ` Andy Shevchenko
2017-04-19  9:01                   ` Linus Walleij
2017-04-19 12:01                     ` Andy Shevchenko
2017-04-03 10:53       ` [kbuild-all] " Fengguang Wu
2017-05-22 18:41 ` Andy Shevchenko
2017-05-29  8:21   ` Linus Walleij

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='CACRpkdY_1egwEhF9N=YmOfsF5hyR-78+tvucrWaiiv6RojYwJw@mail.gmail.com' \
    --to=linus.walleij@linaro.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=arnd@arndb.de \
    --cc=fengguang.wu@intel.com \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=tipbuild@zytor.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.