linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Grant Likely <grant.likely@linaro.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Arnd Bergmann <arnd@linaro.org>,
	Heikki Krogerus <heikki.krogerus@linux.intel.com>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	ACPI Devel Mailing List <linux-acpi@vger.kernel.org>
Subject: Re: [resend PATCH] driver core: property: support for generic property
Date: Mon, 16 Mar 2015 09:47:22 +0000	[thread overview]
Message-ID: <CACxGe6tiDszPDpP_u1yxNgMA8HjagDKtGuu35hfkyJtZdGE0Aw@mail.gmail.com> (raw)
In-Reply-To: <20150314094231.GA24718@kroah.com>

On Sat, Mar 14, 2015 at 9:42 AM, Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
> On Sat, Mar 14, 2015 at 02:09:06AM +0100, Rafael J. Wysocki wrote:
>> On Friday, March 13, 2015 04:24:11 PM Arnd Bergmann wrote:
>> > On Friday 13 March 2015 15:10:38 Grant Likely wrote:
>> > > On Thu, Mar 12, 2015 at 1:41 AM, Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
>> > > > On Monday, January 26, 2015 03:17:40 PM Heikki Krogerus wrote:
>> > > > That doesn't seem to go in the right direction to be honest.
>> > > >
>> > > > Actually, having introduced struct fwnode_handle, we should perhaps try to
>> > > > replace both of_node and acpi_node with a single struct fwnode_handle pointer
>> > > > and then add a new fwnode_type for the "pdata" stuff.
>> > >
>> > > I agree on this, but it will be a lot of work to convert...
>> > >
>> > > > If you don't want to deal with of_node, which I can understand easily, it
>> > > > may be worth trying with acpi_node alone at this point and once you have
>> > > > the fwnode_handle pointer, you might use it for both ACPI and "pdata"?
>> > > >
>> > > > Grant, Arnd, I wonder what you think?
>> > >
>> > > That makes sense, and we can populate the fwnode_handle even when
>> > > using DT. That will allow a transition period to move everyone over to
>> > > the fwnode_handle.
>> >
>> > Agreed on both as well.
>>
>> OK
>>
>> So below is what it takes to use struct fwnode_handle to represent ACPI
>> companions.
>>
>> Rafael
>>
>>
>> ---
>> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>> Subject: driver core / ACPI: Represent ACPI companions using fwnode_handle
>>
>> Now that we have struct fwnode_handle, we can use that to point to
>> ACPI companions from struct device objects instead of pointing to
>> struct acpi_device directly.
>>
>> There are two benefits from that.  First, the somewhat ugly and
>> hackish struct acpi_dev_node can be dropped and, second, the same
>> struct fwnode_handle pointer can be used in the future to point
>> to other (non-ACPI) firmware device node types.
>>
>> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>> ---
>>  drivers/acpi/acpi_platform.c    |    2 +-
>>  drivers/acpi/dock.c             |    2 +-
>>  drivers/base/platform.c         |    2 +-
>>  drivers/i2c/i2c-core.c          |    4 ++--
>>  include/acpi/acpi_bus.h         |    3 ++-
>>  include/linux/acpi.h            |    7 ++++---
>>  include/linux/device.h          |   13 +++----------
>>  include/linux/fwnode.h          |   25 +++++++++++++++++++++++++
>>  include/linux/i2c.h             |    4 ++--
>>  include/linux/platform_device.h |    2 +-
>>  include/linux/property.h        |   11 +----------
>>  11 files changed, 43 insertions(+), 32 deletions(-)
>
> Nice, I like the driver core changes:
>
> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

I like it too. The only comment I have is I would use a static inline
helper for getting/setting the fwnode_handle pointer. The reason being
that there are situations where we're going to want to attach both a
DT node and static data to the same node. Using a helper isolates the
rest of the kernel from any future changes here.

However, despite that comment:

Acked-by: Grant Likely <grant.likely@linaro.org>

My comment isn't significant enough to hold up this change.

  reply	other threads:[~2015-03-16  9:47 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-26 13:17 [resend PATCH] driver core: property: support for generic property Heikki Krogerus
2015-03-09 14:43 ` Heikki Krogerus
2015-03-12  1:41 ` Rafael J. Wysocki
2015-03-13 15:10   ` Grant Likely
2015-03-13 15:24     ` Arnd Bergmann
2015-03-14  1:09       ` Rafael J. Wysocki
2015-03-14  9:42         ` Greg Kroah-Hartman
2015-03-16  9:47           ` Grant Likely [this message]
2015-03-16 22:59             ` Rafael J. Wysocki
2015-03-17 14:17               ` [PATCH] ACPI: Introduce has_acpi_companion() Rafael J. Wysocki
2015-03-22 23:10               ` [PATCH] driver core: Implement device property accessors through fwnode ones Rafael J. Wysocki
2015-03-23 20:13                 ` Greg Kroah-Hartman
2015-03-28  1:05               ` [PATCH 0/3] device property: support for "built-in" properties Rafael J. Wysocki
2015-03-28  1:09                 ` [PATCH 1/3] device property: Make it possible to use secondary firmware nodes Rafael J. Wysocki
2015-03-28  1:10                 ` [PATCH 2/3] device property: Introduce firmware node type for platform data Rafael J. Wysocki
2015-03-28  1:26                 ` [PATCH 3/3][RFD] device property: Implement fallback to built-in properties Rafael J. Wysocki
2015-04-02 14:35                   ` Heikki Krogerus
2015-04-03 13:59                     ` Rafael J. Wysocki
2015-04-03 14:01                 ` [PATCH 0/2] device property: firmware node type for platform data Rafael J. Wysocki
2015-04-03 14:03                   ` [PATCH 1/2] device property: Make it possible to use secondary firmware nodes Rafael J. Wysocki
2015-04-03 14:06                     ` Greg Kroah-Hartman
2015-04-03 14:05                   ` [PATCH 2/2] device property: Introduce firmware node type for platform data Rafael J. Wysocki
2015-04-03 14:06                     ` Greg Kroah-Hartman
2015-03-16  7:25   ` [resend PATCH] driver core: property: support for generic property Heikki Krogerus

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=CACxGe6tiDszPDpP_u1yxNgMA8HjagDKtGuu35hfkyJtZdGE0Aw@mail.gmail.com \
    --to=grant.likely@linaro.org \
    --cc=arnd@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=rjw@rjwysocki.net \
    /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).