Re: [RFC PATCH 1/2] ACPI / PNP: Don't add "enumeration_by_parent" devices

2018-04-30 Thread John Garry
On 30/04/2018 11:46, Lee Jones wrote: On Mon, 30 Apr 2018, John Garry wrote: So we using the mfd_cell to match child devices using _HID. At a glance, I don't actually see other drivers to use mfd_cell_acpi_match.pnpid . Anyway we don't use static tables as we need to update the resources of th

Re: [RFC PATCH 1/2] ACPI / PNP: Don't add "enumeration_by_parent" devices

2018-04-30 Thread Lee Jones
On Mon, 30 Apr 2018, John Garry wrote: > > > > > So we using the mfd_cell to match child devices using _HID. At a > > > > > glance, I > > > > > don't actually see other drivers to use mfd_cell_acpi_match.pnpid . > > > > > > > > > > Anyway we don't use static tables as we need to update the resou

Re: [RFC PATCH 1/2] ACPI / PNP: Don't add "enumeration_by_parent" devices

2018-04-30 Thread John Garry
So we using the mfd_cell to match child devices using _HID. At a glance, I don't actually see other drivers to use mfd_cell_acpi_match.pnpid . Anyway we don't use static tables as we need to update the resources of the cell dynamically. However I do look at a driver like intel_quark_i2c_gpio.c, a

Re: [RFC PATCH 1/2] ACPI / PNP: Don't add "enumeration_by_parent" devices

2018-04-30 Thread Lee Jones
On Mon, 30 Apr 2018, John Garry wrote: > On 30/04/2018 06:36, Lee Jones wrote: > > On Fri, 27 Apr 2018, John Garry wrote: > > > On 26/04/2018 15:23, John Garry wrote: > > > > On 26/04/2018 15:08, Mika Westerberg wrote: > > > > > On Thu, Apr 26, 2018 at 02:49:49PM +0100, John Garry wrote: > > > > >

Re: [RFC PATCH 1/2] ACPI / PNP: Don't add "enumeration_by_parent" devices

2018-04-30 Thread John Garry
On 30/04/2018 06:36, Lee Jones wrote: On Fri, 27 Apr 2018, John Garry wrote: On 26/04/2018 15:23, John Garry wrote: On 26/04/2018 15:08, Mika Westerberg wrote: On Thu, Apr 26, 2018 at 02:49:49PM +0100, John Garry wrote: diff --git a/drivers/bus/hisi_lpc.c b/drivers/bus/hisi_lpc.c index 2d4611

Re: [RFC PATCH 1/2] ACPI / PNP: Don't add "enumeration_by_parent" devices

2018-04-29 Thread Lee Jones
On Fri, 27 Apr 2018, John Garry wrote: > On 26/04/2018 15:23, John Garry wrote: > > On 26/04/2018 15:08, Mika Westerberg wrote: > > > On Thu, Apr 26, 2018 at 02:49:49PM +0100, John Garry wrote: > > > > diff --git a/drivers/bus/hisi_lpc.c b/drivers/bus/hisi_lpc.c > > > > index 2d4611e..b04425b 10064

Re: [RFC PATCH 1/2] ACPI / PNP: Don't add "enumeration_by_parent" devices

2018-04-27 Thread John Garry
On 26/04/2018 15:23, John Garry wrote: + On 26/04/2018 15:08, Mika Westerberg wrote: On Thu, Apr 26, 2018 at 02:49:49PM +0100, John Garry wrote: diff --git a/drivers/bus/hisi_lpc.c b/drivers/bus/hisi_lpc.c index 2d4611e..b04425b 100644 --- a/drivers/bus/hisi_lpc.c +++ b/drivers/bus/hisi_lpc.c

Re: [RFC PATCH 1/2] ACPI / PNP: Don't add "enumeration_by_parent" devices

2018-04-26 Thread Mika Westerberg
On Thu, Apr 26, 2018 at 03:23:17PM +0100, John Garry wrote: > Not that I know about. Can you describe this method? I guess I also don't > need to set the mfd_cell pnpid either for this special case device. There is some documentation in "MFD devices" chapter of Documentation/acpi/enumeration.txt a

Re: [RFC PATCH 1/2] ACPI / PNP: Don't add "enumeration_by_parent" devices

2018-04-26 Thread John Garry
On 26/04/2018 15:08, Mika Westerberg wrote: On Thu, Apr 26, 2018 at 02:49:49PM +0100, John Garry wrote: diff --git a/drivers/bus/hisi_lpc.c b/drivers/bus/hisi_lpc.c index 2d4611e..b04425b 100644 --- a/drivers/bus/hisi_lpc.c +++ b/drivers/bus/hisi_lpc.c @@ -18,6 +18,8 @@ #include #include #i

Re: [RFC PATCH 1/2] ACPI / PNP: Don't add "enumeration_by_parent" devices

2018-04-26 Thread Mika Westerberg
On Thu, Apr 26, 2018 at 02:49:49PM +0100, John Garry wrote: > diff --git a/drivers/bus/hisi_lpc.c b/drivers/bus/hisi_lpc.c > index 2d4611e..b04425b 100644 > --- a/drivers/bus/hisi_lpc.c > +++ b/drivers/bus/hisi_lpc.c > @@ -18,6 +18,8 @@ > #include > #include > #include > +#include > +#includ

Re: [RFC PATCH 1/2] ACPI / PNP: Don't add "enumeration_by_parent" devices

2018-04-26 Thread John Garry
On 20/04/2018 15:09, John Garry wrote: On 20/04/2018 14:52, Mika Westerberg wrote: On Fri, Apr 20, 2018 at 02:24:18PM +0100, John Garry wrote: Hi Mika, On 20/04/2018 14:07, Mika Westerberg wrote: On Fri, Apr 20, 2018 at 06:07:25PM +0800, John Garry wrote: +} else { +device->drive

Re: [RFC PATCH 1/2] ACPI / PNP: Don't add "enumeration_by_parent" devices

2018-04-20 Thread John Garry
On 20/04/2018 14:52, Mika Westerberg wrote: On Fri, Apr 20, 2018 at 02:24:18PM +0100, John Garry wrote: Hi Mika, On 20/04/2018 14:07, Mika Westerberg wrote: On Fri, Apr 20, 2018 at 06:07:25PM +0800, John Garry wrote: + } else { + device->driver_data = dev; I think this d

Re: [RFC PATCH 1/2] ACPI / PNP: Don't add "enumeration_by_parent" devices

2018-04-20 Thread Mika Westerberg
On Fri, Apr 20, 2018 at 02:24:18PM +0100, John Garry wrote: > Hi Mika, > > On 20/04/2018 14:07, Mika Westerberg wrote: > > On Fri, Apr 20, 2018 at 06:07:25PM +0800, John Garry wrote: > > > + } else { > > > + device->driver_data = dev; > > > > I think this deserves a comment explaining why

Re: [RFC PATCH 1/2] ACPI / PNP: Don't add "enumeration_by_parent" devices

2018-04-20 Thread John Garry
Hi Mika, On 20/04/2018 14:07, Mika Westerberg wrote: On Fri, Apr 20, 2018 at 06:07:25PM +0800, John Garry wrote: + } else { + device->driver_data = dev; I think this deserves a comment explaining why we (ab)use driver_data like this. Sure, could add. I didn't see any oth

Re: [RFC PATCH 1/2] ACPI / PNP: Don't add "enumeration_by_parent" devices

2018-04-20 Thread Mika Westerberg
On Fri, Apr 20, 2018 at 06:07:25PM +0800, John Garry wrote: > + } else { > + device->driver_data = dev; I think this deserves a comment explaining why we (ab)use driver_data like this.

[RFC PATCH 1/2] ACPI / PNP: Don't add "enumeration_by_parent" devices

2018-04-20 Thread John Garry
For ACPI devices with the enumeration_by_parent flag set, we expect the parent device to enumerate the device after the ACPI scan. This patch does partially the same for devices which are enumerated as PNP devices. We still want PNP scan code to create the per-ACPI device PNP device, but hold off