From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
Mathias Nyman <mathias.nyman@linux.intel.com>,
Grant Likely <grant.likely@secretlab.ca>,
ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
Alexandre Courbot <acourbot@nvidia.com>
Subject: Re: [PATCH 2/2] gpio / ACPI: add support for GPIO operation regions
Date: Mon, 23 Sep 2013 13:48:09 +0300 [thread overview]
Message-ID: <20130923104809.GC28875@intel.com> (raw)
In-Reply-To: <CACRpkdb5fqMycTxou50-+oiNOs3vzd+8XfWsPbX8vBJp2Su3aw@mail.gmail.com>
On Fri, Sep 20, 2013 at 09:21:37PM +0200, Linus Walleij wrote:
> On Fri, Sep 13, 2013 at 5:14 PM, Mika Westerberg
> <mika.westerberg@linux.intel.com> wrote:
>
> > diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c
> (...)
> > +struct acpi_gpio_chip_data {
> > + /*
> > + * acpi_install_address_space_handler() wants to put the connection
> > + * information at the start of the context structure we pass it, in
> > + * case we are dealing with GPIO operation regions.
> > + */
> > + struct acpi_connection_info ci;
> > + struct gpio_chip *chip;
> > + struct list_head *evt_pins;
> > +};
>
> Consider just naming this acpi_gpio_chip, as it is obviously some
> generic container that you will keep adding to.
Sure.
> I'm uncertain how things work, it wouldn't add something to have
> struct gpio_chip be a true member (not a pointer) so you can
> allocate one thing from the drivers, and e.g. use container_of()
> to get from the gpio_chip to the acpi_gpio_chip[_data]?
The drivers are just normal platform drivers (for example gpio-lynxpoint.c)
and they shouldn't care if they got enumerated from ACPI. Allocating
acpi_gpio_chip from a driver would make it depend on ACPI, if I'm
understanding correctly.
next prev parent reply other threads:[~2013-09-23 10:48 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-13 15:14 [PATCH 1/2] gpio / ACPI: register to ACPI events automatically Mika Westerberg
2013-09-13 15:14 ` [PATCH 2/2] gpio / ACPI: add support for GPIO operation regions Mika Westerberg
2013-09-13 15:55 ` Andy Shevchenko
2013-09-13 17:36 ` Mika Westerberg
2013-09-14 0:10 ` Zheng, Lv
2013-09-15 6:51 ` Mika Westerberg
2013-09-16 0:46 ` Zheng, Lv
2013-09-16 1:21 ` Zheng, Lv
2013-09-16 8:10 ` Mika Westerberg
2013-09-16 23:35 ` Zheng, Lv
2013-09-17 8:37 ` Mika Westerberg
2013-09-24 0:47 ` Zheng, Lv
2013-09-24 4:59 ` Mika Westerberg
2013-09-20 19:21 ` Linus Walleij
2013-09-23 10:48 ` Mika Westerberg [this message]
2013-09-20 19:08 ` [PATCH 1/2] gpio / ACPI: register to ACPI events automatically Linus Walleij
2013-09-23 10:52 ` Mika Westerberg
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=20130923104809.GC28875@intel.com \
--to=mika.westerberg@linux.intel.com \
--cc=acourbot@nvidia.com \
--cc=grant.likely@secretlab.ca \
--cc=linus.walleij@linaro.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathias.nyman@linux.intel.com \
--cc=rafael.j.wysocki@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).