From: "H. Peter Anvin" <hpa@zytor.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>,
Alexandre Courbot <gnurou@gmail.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "x86@kernel.org" <x86@kernel.org>,
Ning Li <ning.li@intel.com>, Alan Cox <alan@linux.intel.com>,
Mark Brown <broonie@linaro.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>
Subject: Re: [PATCH 1/2] x86, gpio: Increase ARCH_NR_GPIOs to 512
Date: Tue, 9 Sep 2014 00:41:47 -0700 [thread overview]
Message-ID: <8B06FF90-41FC-49F8-B330-EC3911BEA2AE@zytor.com> (raw)
In-Reply-To: <CACRpkdb=yO3TbStfEesJCGDL3D_bq6_C0jwPUmKVuE+Otg8G4g@mail.gmail.com>
Isn't this exactly what ida is for?
Sent from my tablet, pardon any formatting problems.
> On Sep 9, 2014, at 0:24, Linus Walleij <linus.walleij@linaro.org> wrote:
>
> On Mon, Sep 8, 2014 at 1:47 PM, Mika Westerberg
> <mika.westerberg@linux.intel.com> wrote:
>
>> Some newer Intel SoCs like Braswell already have more than 256 GPIOs
>> available so the default limit is exceeded. In order to support these add
>> back the custom GPIO header with limit of 512 GPIOs for x86.
>>
>> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
>
> Argh! This is the kind of stuff I want to get rid of ....
>
> Preferably gpio should be a subsystem without a lot of hooks all over
> the place with arch-specific modifications for this and that, including
> the max number of GPIOs.
>
> I would actually prefer if you bump the value in
> include/asm-generic/gpio.h to 512 over this.
>
> But better still, now that we have descriptors etc would be to define
> some new per-arch selectable config option like
> CONFIG_ONLY_DYNAMIC_GPIO that changes the GPIO
> core to use something like a radix tree to store and retrieve
> descriptors.
>
> I.e. in drivers/gpio/gpiolib.c get rid of this:
> static struct gpio_desc gpio_desc[ARCH_NR_GPIOS];
>
> Replace it with a radix tree of descriptors.
>
> This however makes it *impossible* to use things like desc_to_gpio()
> and/or gpio_to_desc() so the code has to be augmented all over the
> place to avoid any uses of GPIO numbers on that architecture,
> but I am sure it *can* be done on pure ACPI or device tree
> systems, and that's what we should aim for.
>
> Comments?
>
> Yours,
> Linus Walleij
next prev parent reply other threads:[~2014-09-09 7:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-08 11:47 Mika Westerberg
2014-09-08 11:48 ` [PATCH 2/2] gpio: Add support for Intel Cherryview/Braswell GPIO controller Mika Westerberg
2014-09-09 7:24 ` [PATCH 1/2] x86, gpio: Increase ARCH_NR_GPIOs to 512 Linus Walleij
2014-09-09 7:41 ` H. Peter Anvin [this message]
2014-09-09 9:46 ` Mika Westerberg
2014-09-19 7:20 ` Alexandre Courbot
2014-09-19 10:46 ` Mika Westerberg
2014-09-19 17:48 ` Linus Walleij
2014-09-20 5:56 ` Alexandre Courbot
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=8B06FF90-41FC-49F8-B330-EC3911BEA2AE@zytor.com \
--to=hpa@zytor.com \
--cc=alan@linux.intel.com \
--cc=broonie@linaro.org \
--cc=gnurou@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=mingo@redhat.com \
--cc=ning.li@intel.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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
all inboxes | Powered by JetHome®