public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Alexandre Courbot <gnurou@gmail.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Grant Likely <grant.likely@linaro.org>,
	ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
	Aaron Lu <aaron.lu@intel.com>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Bryan Wu <cooloney@gmail.com>,
	Darren Hart <dvhart@linux.intel.com>,
	Mark Rutland <mark.rutland@arm.com>
Subject: Re: [PATCH] ACPI / GPIO: Driver GPIO mappings for ACPI GPIOs
Date: Mon, 03 Nov 2014 23:56:53 +0100	[thread overview]
Message-ID: <1433051.htaUTMPMBY@vostro.rjw.lan> (raw)
In-Reply-To: <CACRpkdanUC4QYbMXgMOkiGS+6oVyD1Opg_sFo95TEsyHJTM6_w@mail.gmail.com>

On Monday, November 03, 2014 02:22:10 PM Linus Walleij wrote:
> On Sat, Oct 25, 2014 at 12:05 AM, Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
> 
> > From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> >
> > Provide a way for device drivers using GPIOs described by ACPI
> > GpioIo resources in _CRS to tell the GPIO subsystem what names
> > (connection IDs) to associate with specific GPIO pins defined
> > in there.
> >
> > To do that, a driver needs to define a mapping table as a
> > NULL-terminated array of struct acpi_gpio_mapping objects
> > that each contain a name, a pointer to an array of pin data
> > (struct acpi_gpio_params) objects and the size of that array.
> >
> > Each struct acpi_gpio_params object consists of three fields,
> > crs_entry_index, pin_index, active_low, representing the index of
> 
> I prefer that you call the second thing "line_index" rather than
> "pin_index". Not all GPIOs in the world are tied to physical pins.
> Also it is easy to confuse stuff with the pin control terminology
> if it's called "pin".
> 
> > the target GpioIo()/GpioInt() resource in _CRS starting from zero,
> > the index of the target pin in that resource starting from zero,
> > and the active-low flag for that pin, respectively.
> >
> > Next, the mapping table needs to be passed as the second argument to
> > acpi_dev_add_driver_gpios() that will register it with the ACPI device
> > object pointed to by its first argument.  That object must represent
> > the ACPI namespace node containing the _CRS object referred to by the
> > GPIO mapping.  That should be done in the driver's .probe() routine.
> >
> > On removal, the driver should unregister its GPIO mapping table
> > by calling acpi_dev_remove_driver_gpios() on the ACPI device
> > object where that table was previously registered.
> >
> > Included are fixes from Mika Westerberg.
> >
> > Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> 
> And "pin" is mentioned several times in the commit message.
> I prefer that we talk about "lines".
> 
> (...)
> 
> > +struct acpi_gpio_params {
> > +       unsigned int crs_entry_index;
> > +       unsigned int pin_index;
> 
> So line_index;
> 
> > +       bool active_low;
> > +};
> 
> With that change:
> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

OK, made the changes and added your Reviewed-by.

One semi-related question though.  Alexandre ACKed the patch before, so
what did that mean from the GPIO subsystem's perspective?  Was the patch
approved, not approved, semi-approved?

Rafael


  reply	other threads:[~2014-11-03 22:36 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-21  5:14 GPIO bindings guidelines (Was: Re: [PATCH v5 10/12] gpio: Support for unified device properties interface) Alexandre Courbot
2014-10-21  7:54 ` Arnd Bergmann
2014-10-22  8:10   ` Mika Westerberg
2014-10-22  8:33     ` Arnd Bergmann
2014-10-22  8:51       ` Mika Westerberg
2014-10-22  9:28         ` Arnd Bergmann
2014-10-22 14:07           ` Rafael J. Wysocki
2014-10-22 14:56             ` Mika Westerberg
2014-10-22 23:21               ` Rafael J. Wysocki
2014-10-23 12:56                 ` Mika Westerberg
2014-10-23 21:51                   ` Rafael J. Wysocki
2014-10-24  7:15                     ` Alexandre Courbot
2014-10-24  7:34                     ` Mika Westerberg
2014-10-24 22:00                       ` Rafael J. Wysocki
2014-10-24 22:05                         ` [PATCH] ACPI / GPIO: Driver GPIO mappings for ACPI GPIOs Rafael J. Wysocki
2014-10-27  5:21                           ` Alexandre Courbot
2014-10-27 22:34                             ` Rafael J. Wysocki
2014-10-28  4:11                               ` Alexandre Courbot
2014-10-30  0:45                                 ` Rafael J. Wysocki
2014-10-30 10:22                                   ` Mika Westerberg
2014-11-03 13:22                           ` Linus Walleij
2014-11-03 22:56                             ` Rafael J. Wysocki [this message]
2014-11-14  8:58                               ` Linus Walleij
2014-11-14 22:54                                 ` Rafael J. Wysocki
2014-11-17  4:28                                 ` Alexandre Courbot
2014-11-17 23:31                                   ` Rafael J. Wysocki
2014-10-27  7:50                         ` GPIO bindings guidelines (Was: Re: [PATCH v5 10/12] gpio: Support for unified device properties interface) Mika Westerberg
2014-10-23  6:10             ` Alexandre Courbot
2014-10-23 12:08               ` Arnd Bergmann
2014-10-23  6:02   ` Alexandre Courbot
2014-10-23 12:25     ` Arnd Bergmann
2014-10-30 15:11       ` 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=1433051.htaUTMPMBY@vostro.rjw.lan \
    --to=rjw@rjwysocki.net \
    --cc=aaron.lu@intel.com \
    --cc=arnd@arndb.de \
    --cc=cooloney@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=dvhart@linux.intel.com \
    --cc=gnurou@gmail.com \
    --cc=grant.likely@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mika.westerberg@linux.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