[PATCH V4 05/11] ACPI: check and enumerate CMOS RTC devices explicitly

2014-03-17 Thread Zhang Rui
-by: Zhang Rui --- drivers/acpi/acpi_cmos_rtc.c |2 +- drivers/acpi/acpi_pnp.c | 22 +- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/acpi_cmos_rtc.c b/drivers/acpi/acpi_cmos_rtc.c index 84190ed..a19b0b3 100644 --- a/drivers/acpi

[PATCH V4 04/11] ACPI: remove unsupported serial PNP ids from acpi pnp scan handler id lsit

2014-03-17 Thread Zhang Rui
mism never works for ACPI enumerated PNPCXXX/PNPDXXX devices. So it is safe to remove those two ids from the ACPI pnp scan handler id list. Signed-off-by: Zhang Rui --- drivers/acpi/acpi_pnp.c |2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/acpi/acpi_pnp.c b/drivers/acpi/acpi_pnp.c ind

[PATCH V4 03/11] ACPI: remove ids that does not comply with the ACPI PNP id rule

2014-03-17 Thread Zhang Rui
those ids from the PNPACPI white list. Signed-off-by: Zhang Rui --- drivers/acpi/acpi_pnp.c |4 1 file changed, 4 deletions(-) diff --git a/drivers/acpi/acpi_pnp.c b/drivers/acpi/acpi_pnp.c index 5971934..8c14006 100644 --- a/drivers/acpi/acpi_pnp.c +++ b/drivers/acpi/acpi_pnp.c

[PATCH V4 08/11] ACPI: introduce dummy lpss scan handler

2014-03-17 Thread Zhang Rui
broken behavior. In order to fix this, a dummy lpss scan handler is introduced to prevent those platform devices from being created. Plus, if lpt_clk_init() fails, we need this dummy scan handler as well. Signed-off-by: Zhang Rui --- drivers/acpi/Makefile|2 +- drivers/acpi/acpi_lpss.c

[PATCH V4 06/11] ACPI: introduce platform_id flag

2014-03-17 Thread Zhang Rui
strings to them. Signed-off-by: Zhang Rui --- drivers/acpi/scan.c |9 - include/acpi/acpi_bus.h |3 ++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 399257e..e41b5e6 100644 --- a/drivers/acpi/scan.c +++ b/drivers

[PATCH V4 02/11] PNPACPI: use whilte list for pnpacpi device enumeration

2014-03-17 Thread Zhang Rui
1. remove the ids for the devices that are never enumerated via ACPI 2. remove the ids and convert the drivers to platform bus drivers for the devices that are not PNP devices in nature. Signed-off-by: Zhang Rui --- drivers/acpi/Makefile |1 + dri

[PATCH V4 07/11] ACPI: use platform bus as the default bus for _HID enumeration

2014-03-17 Thread Zhang Rui
Because of the growing demand for enumerating ACPI devices to platform bus, this patch changes the code to enumerate ACPI devices with _HID to platform bus by default, unless the device already has a scan handler attached. Signed-off-by: Zhang Rui --- drivers/acpi/acpi_platform.c | 28

[PATCH V4 11/11] ACPI: introduce dummy memory hotplug scan handler

2014-03-17 Thread Zhang Rui
If CONFIG_ACPI_HOTPLUG_MEMORY is cleared, platform devices would be created for ACPI hotplug memory device objects. Introduce a dummy memory hotplug scan handler in this patch, to prevent those platform devices from being created. Signed-off-by: Zhang Rui --- drivers/acpi/Makefile

[PATCH V4 09/11] ACPI: introduce acpi platform exclude id list

2014-03-17 Thread Zhang Rui
nodes from being created. Signed-off-by: Zhang Rui --- drivers/acpi/acpi_platform.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/drivers/acpi/acpi_platform.c b/drivers/acpi/acpi_platform.c index 33376a9..91ed43a 100644 --- a/drivers/acpi/acpi_platform.c +++ b/drivers/acpi

[PATCH V4 10/11] ACPI: introduce dummy container scan handler

2014-03-17 Thread Zhang Rui
When CONFIG_ACPI_CONTAINER is cleared, platform devices would be created for ACPI container objects. Introduce a dummy container scan handler in this patch to prevent these platform devices from being created. Signed-off-by: Zhang Rui --- drivers/acpi/Makefile|2 +- drivers/acpi

[PATCH V4 00/11] ACPI: change the way of enumerating PNPACPI/Platform devices

2014-03-17 Thread Zhang Rui
ting platform devices, because some devices have _HID but they will never be associated with a platform driver. 5.introduce dummy lpss/container/memory_hotplug scan handler to prevent platform devices from being created for those ACPI device objects. --------

[PATCH V4 01/11] ACPI: introduce .match() callback for ACPI scan handler

2014-03-17 Thread Zhang Rui
support. Thus a per scan handler .match() callback is introduced in this patch, so that specified scan handler can have more flexible matching mechanism by introduce its own .match() callback. Signed-off-by: Zhang Rui --- drivers/acpi/scan.c | 17 +++-- include/acpi/acpi_bus.h

[PATCH V3 05/11] ACPI: check and enumerate CMOS RTC devices explicitly

2014-03-16 Thread Zhang Rui
-by: Zhang Rui --- drivers/acpi/acpi_cmos_rtc.c |2 +- drivers/acpi/acpi_pnp.c | 22 +- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/acpi_cmos_rtc.c b/drivers/acpi/acpi_cmos_rtc.c index 84190ed..a19b0b3 100644 --- a/drivers/acpi

[PATCH V3 06/11] ACPI: introduce platform_id flag

2014-03-16 Thread Zhang Rui
strings to them. Signed-off-by: Zhang Rui --- drivers/acpi/scan.c |8 +++- include/acpi/acpi_bus.h |3 ++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 399257e..58bdc03 100644 --- a/drivers/acpi/scan.c +++ b/drivers

[PATCH V3 02/11] PNPACPI: use whilte list for pnpacpi device enumeration

2014-03-16 Thread Zhang Rui
1. remove the ids for the devices that are never enumerated via ACPI 2. remove the ids and convert the drivers to platform bus drivers for the devices that are not PNP devices in nature. Signed-off-by: Zhang Rui --- drivers/acpi/Makefile |1 + dri

[PATCH V3 03/11] ACPI: remove ids that does not comply with the ACPI PNP id rule

2014-03-16 Thread Zhang Rui
those ids from the PNPACPI white list. Signed-off-by: Zhang Rui --- drivers/acpi/acpi_pnp.c |4 1 file changed, 4 deletions(-) diff --git a/drivers/acpi/acpi_pnp.c b/drivers/acpi/acpi_pnp.c index edeed1d..db49e9e 100644 --- a/drivers/acpi/acpi_pnp.c +++ b/drivers/acpi/acpi_pnp.c

[PATCH V3 08/11] ACPI: introduce dummy lpss scan handler

2014-03-16 Thread Zhang Rui
broken behavior. In order to fix this, a dummy lpss scan handler is introduced to prevent those platform devices from being created. Plus, if lpt_clk_init() fails, we need this dummy scan handler as well. Signed-off-by: Zhang Rui --- drivers/acpi/Makefile|2 +- drivers/acpi/acpi_lpss.c

[PATCH V3 07/11] ACPI: use platform bus as the default bus for _HID enumeration

2014-03-16 Thread Zhang Rui
Because of the growing demand for enumerating ACPI devices to platform bus, this patch changes the code to enumerate ACPI devices with _HID to platform bus by default, unless the device already has a scan handler attached. Signed-off-by: Zhang Rui --- drivers/acpi/acpi_platform.c | 28

[PATCH V3 09/11] ACPI: introduce acpi platform exclude id list

2014-03-16 Thread Zhang Rui
nodes from being created. Signed-off-by: Zhang Rui --- drivers/acpi/acpi_platform.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/drivers/acpi/acpi_platform.c b/drivers/acpi/acpi_platform.c index 33376a9..0cf291e 100644 --- a/drivers/acpi/acpi_platform.c +++ b/drivers/acpi

[PATCH V3 11/11] ACPI: introduce dummy memory hotplug scan handler

2014-03-16 Thread Zhang Rui
If CONFIG_ACPI_HOTPLUG_MEMORY is cleared, platform devices would be created for ACPI hotplug memory device objects. Introduce a dummy memory hotplug scan handler in this patch, to prevent those platform devices from being created. Signed-off-by: Zhang Rui --- drivers/acpi/Makefile

[PATCH V3 10/11] ACPI: introduce dummy container scan handler

2014-03-16 Thread Zhang Rui
When CONFIG_ACPI_CONTAINER is cleared, platform devices would be created for ACPI container objects. Introduce a dummy container scan handler in this patch to prevent these platform devices from being created. Signed-off-by: Zhang Rui --- drivers/acpi/Makefile|2 +- drivers/acpi

[PATCH V3 04/11] ACPI: remove unsupported serial PNP ids from acpi pnp scan handler id lsit

2014-03-16 Thread Zhang Rui
mism never works for ACPI enumerated PNPCXXX/PNPDXXX devices. So it is safe to remove those two ids from the ACPI pnp scan handler id list. Signed-off-by: Zhang Rui --- drivers/acpi/acpi_pnp.c |2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/acpi/acpi_pnp.c b/drivers/acpi/acpi_pnp.c ind

[PATCH V3 00/11] ACPI: change the way of enumerating PNPACPI/Platform devices

2014-03-16 Thread Zhang Rui
be associated with a platform driver. 5.introduce dummy lpss/container/memory_hotplug scan handler to prevent platform devices from being created for those ACPI device objects. -------- Zhang Rui (11): ACPI: introduce .match()

[PATCH V3 01/11] ACPI: introduce .match() callback for ACPI scan handler

2014-03-16 Thread Zhang Rui
support. Thus a per scan handler .match() callback is introduced in this patch, so that specified scan handler can have more flexible matching mechanism by introduce its own .match() callback. Signed-off-by: Zhang Rui --- drivers/acpi/scan.c | 17 +++-- include/acpi/acpi_bus.h

RE: [PATCH V2 06/13] ACPI: introduce enumerable_id flag

2014-03-14 Thread Zhang, Rui
> -Original Message- > From: Wysocki, Rafael J > Sent: Saturday, March 15, 2014 9:03 AM > To: Zhang, Rui > Cc: linux-a...@vger.kernel.org; linux-kernel@vger.kernel.org; > bhelg...@google.com; matthew.garr...@nebula.com; > dmitry.torok...@gmail.com > Subject: R

[PATCH V2 0/13] ACPI: change the way of enumerating PNPACPI/Platform devices

2014-03-13 Thread Zhang Rui
o prevent platform devices from being created for those ACPI device objects. -------- Zhang Rui (13): ACPI: introduce .match() callback for ACPI scan handler PNPACPI: use whilte list for pnpacpi device enumeration PNPACPI:

[PATCH V2 03/13] ACPI: remove ids that does not comply with the ACPI PNP id rule

2014-03-13 Thread Zhang Rui
those ids from the PNPACPI white list. Signed-off-by: Zhang Rui --- drivers/acpi/acpi_pnp.c |4 1 file changed, 4 deletions(-) diff --git a/drivers/acpi/acpi_pnp.c b/drivers/acpi/acpi_pnp.c index edeed1d..db49e9e 100644 --- a/drivers/acpi/acpi_pnp.c +++ b/drivers/acpi/acpi_pnp.c

[PATCH V2 01/13] ACPI: introduce .match() callback for ACPI scan handler

2014-03-13 Thread Zhang Rui
support. Thus a per scan handler .match() callback is introduced in this patch, so that specified scan handler can have more flexible matching mechanism by introduce its own .match() callback. Signed-off-by: Zhang Rui --- drivers/acpi/scan.c | 17 +++-- include/acpi/acpi_bus.h

[PATCH V2 04/13] ACPI: remove unsupported serial PNP ids from acpi pnp scan handler id lsit

2014-03-13 Thread Zhang Rui
mism never works for ACPI enumerated PNPCXXX/PNPDXXX devices. So it is safe to remove those two ids from the ACPI pnp scan handler id list. Signed-off-by: Zhang Rui --- drivers/acpi/acpi_pnp.c |2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/acpi/acpi_pnp.c b/drivers/acpi/acpi_pnp.c ind

[PATCH V2 02/13] PNPACPI: use whilte list for pnpacpi device enumeration

2014-03-13 Thread Zhang Rui
1. remove the ids for the devices that are never enumerated via ACPI 2. remove the ids and convert the drivers to platform bus drivers for the devices that are not PNP devices in nature. Signed-off-by: Zhang Rui --- drivers/acpi/Makefile |1 + dri

[PATCH V2 07/13] ACPI: use platform bus as the default bus for _HID enumeration

2014-03-13 Thread Zhang Rui
Because of the growing demand for enumerating ACPI devices to platform bus, this patch changes the code to enumerate ACPI devices with _HID to platform bus by default, unless the device already has a scan handler attached. Signed-off-by: Zhang Rui --- drivers/acpi/acpi_platform.c | 28

[PATCH V2 06/13] ACPI: introduce enumerable_id flag

2014-03-13 Thread Zhang Rui
() when adding its Linux specified HID string. Signed-off-by: Zhang Rui --- drivers/acpi/scan.c |8 +++- include/acpi/acpi_bus.h |3 ++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 399257e..768f81d 100644 --- a

[PATCH V2 08/13] ACPI: introduce dummy lpss scan handler

2014-03-13 Thread Zhang Rui
broken behavior. In order to fix this, a dummy lpss scan handler is introduced to prevent those platform devices from being created. Plus, this dummy scan handler is needed as well if lpt_clk_init() fails. Signed-off-by: Zhang Rui --- drivers/acpi/Makefile|2 +- drivers/acpi/acpi_lpss.c

[RFC PATCH V2 10/13] Revert "ACPI / PNP: skip ACPI device nodes associated with physical nodes already"

2014-03-13 Thread Zhang Rui
node won't be created if a device has already been attached to the PNPACPI scan handler. Plus, in some cases, we may need both PNP node and platform node for the same ACPI device object, on purpose, like what I will do in next patch. Thus reverting this commit. Signed-off-by: Zhan

[PATCH V2 09/13] ACPI: introduce acpi platform exclude id list

2014-03-13 Thread Zhang Rui
nodes from being created. Signed-off-by: Zhang Rui --- drivers/acpi/acpi_platform.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/drivers/acpi/acpi_platform.c b/drivers/acpi/acpi_platform.c index 33376a9..0cf291e 100644 --- a/drivers/acpi/acpi_platform.c +++ b/drivers/acpi

[RFC PATCH V2 13/13] ACPI: introduce dummy memory hotplug scan handler

2014-03-13 Thread Zhang Rui
If CONFIG_ACPI_HOTPLUG_MEMORY is cleared, platform devices would be created for ACPI hotplug memory device objects. Introduce a dummy memory hotplug scan handler in this patch, to prevent those platform devices from being created. Signed-off-by: Zhang Rui --- drivers/acpi/Makefile

[RFC PATCH V2 11/13] ACPI: create both PNP and Platform device nodes for PNP0C01/PNP0C02

2014-03-13 Thread Zhang Rui
lication(need to copy quirks.c and system.c logic into ACPI), which does not look good neither. Signed-off-by: Zhang Rui --- drivers/acpi/acpi_pnp.c | 19 --- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/drivers/acpi/acpi_pnp.c b/drivers/acpi/acpi_pnp.c

[RFC PATCH V2 12/13] ACPI: introduce dummy container scan handler

2014-03-13 Thread Zhang Rui
When CONFIG_ACPI_CONTAINER is cleared, platform devices would be created for ACPI container objects. Introduce a dummy container scan handler in this patch to prevent these platform devices from being created. Signed-off-by: Zhang Rui --- drivers/acpi/Makefile|2 +- drivers/acpi

[PATCH V2 05/13] ACPI: check and enumerate CMOS RTC devices explicitly

2014-03-13 Thread Zhang Rui
cmos rtc scan handler is compiled out, the ACPI pnp scan handler will be attached to the CMOS RTC devices instead, to prevent these devices from being created to platform bus. Signed-off-by: Zhang Rui --- drivers/acpi/acpi_pnp.c | 22 +- 1 file changed, 21

RE: "can't evaluate _CRS: 1" messages since b355cee [ACPI / resources: ignore invalid ACPI device resources]

2014-03-11 Thread Zhang, Rui
> -Original Message- > From: Rafael J. Wysocki [mailto:r...@rjwysocki.net] > Sent: Tuesday, March 11, 2014 9:23 PM > To: Zhang, Rui > Cc: Markus Trippelsdorf; linux-a...@vger.kernel.org; Wysocki, Rafael J; > linux-kernel@vger.kernel.org > Subject: Re: "can&#x

RE: [PATCH] PNPACPI: proper handling ACPI IO/Memory resources

2014-03-11 Thread Zhang, Rui
Julian, Markus and Paul, Can you please check if this patch fixes the problem for you or not? Thanks, rui > -Original Message- > From: Zhang, Rui > Sent: Tuesday, March 11, 2014 10:40 PM > To: linux-a...@vger.kernel.org; linux-kernel@vger.kernel.org > Cc: Wysocki, R

[PATCH] PNPACPI: proper handling ACPI IO/Memory resources

2014-03-11 Thread Zhang Rui
ACPI memeory/IO resources. This patch fixes the problem by invoking acpi_dev_resource_memory()/ acpi_dev_resource_io() for ACPI memory/IO resources only. Signed-off-by: Zhang Rui --- drivers/pnp/pnpacpi/rsparser.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git

RE: "can't evaluate _CRS: 1" messages since b355cee [ACPI / resources: ignore invalid ACPI device resources]

2014-03-11 Thread Zhang, Rui
> -Original Message- > From: Rafael J. Wysocki [mailto:r...@rjwysocki.net] > Sent: Tuesday, March 11, 2014 9:23 PM > To: Zhang, Rui > Cc: Markus Trippelsdorf; linux-a...@vger.kernel.org; Wysocki, Rafael J; > linux-kernel@vger.kernel.org > Subject: Re: "can&#x

RE: "can't evaluate _CRS: 1" messages since b355cee [ACPI / resources: ignore invalid ACPI device resources]

2014-03-11 Thread Zhang, Rui
y, March 11, 2014 9:00 PM > To: Markus Trippelsdorf > Cc: linux-a...@vger.kernel.org; Zhang, Rui; Wysocki, Rafael J; linux- > ker...@vger.kernel.org > Subject: Re: "can't evaluate _CRS: 1" messages since b355cee [ACPI / > resources: ignore invalid ACPI device resources

Re: [RFC PATCH 6/8] ACPI: use platform bus as the default bus for _HID enumeration

2014-03-09 Thread Zhang Rui
On Sun, 2014-03-09 at 19:04 +0100, Rafael J. Wysocki wrote: > On Sunday, March 09, 2014 11:50:37 PM Zhang Rui wrote: > > On Wed, 2014-02-26 at 17:11 +0800, Zhang Rui wrote: > > > Because of the growing demand for enumerating ACPI devices to platform > > > bus, > >

Re: [RFC PATCH 6/8] ACPI: use platform bus as the default bus for _HID enumeration

2014-03-09 Thread Zhang Rui
On Sun, 2014-03-09 at 19:04 +0100, Rafael J. Wysocki wrote: > On Sunday, March 09, 2014 11:50:37 PM Zhang Rui wrote: > > On Wed, 2014-02-26 at 17:11 +0800, Zhang Rui wrote: > > > Because of the growing demand for enumerating ACPI devices to platform > > > bus, > >

Re: [RFC PATCH 2/8] PNPACPI: use whilte list for pnpacpi device enumeration

2014-03-09 Thread Zhang Rui
On Sun, 2014-03-09 at 18:49 +0100, Rafael J. Wysocki wrote: > On Sunday, March 09, 2014 01:29:30 PM Zhang Rui wrote: > > On Fri, 2014-03-07 at 02:44 +0100, Rafael J. Wysocki wrote: > > > On Wednesday, February 26, 2014 05:11:08 PM Zhang Rui wrote: > > > >

[GIT PULL] Thermal Management fixes for v3.14-rc6

2014-03-09 Thread Zhang Rui
+0800) on top of commit d2a0476307e67a6e6a293563a4f4ad4ec79ac0e5: Merge branch 'akpm' (patches from Andrew Morton) (2014-02-25 15:38:13 -0800) Specifics: - Update the help text of INT3403 Thermal driver, which was not friendly to users. From Zhang Rui. - The "type"

Re: [RFC PATCH 6/8] ACPI: use platform bus as the default bus for _HID enumeration

2014-03-09 Thread Zhang Rui
On Wed, 2014-02-26 at 17:11 +0800, Zhang Rui wrote: > Because of the growing demand for enumerating ACPI devices to platform bus, > this patch changes the code to enumerate ACPI devices with _HID/_CID to > platform bus by default, unless the device already has a scan handler &

Re: [RFC PATCH 6/8] ACPI: use platform bus as the default bus for _HID enumeration

2014-03-08 Thread Zhang Rui
On Fri, 2014-03-07 at 02:46 +0100, Rafael J. Wysocki wrote: > On Tuesday, March 04, 2014 01:35:00 AM Rafael J. Wysocki wrote: > > On 3/4/2014 1:27 AM, Zhang, Rui wrote: > > > > > >> -Original Message- > > >> From: Rafael J. Wysocki [mailto:r...@rjw

Re: [RFC PATCH 2/8] PNPACPI: use whilte list for pnpacpi device enumeration

2014-03-08 Thread Zhang Rui
On Fri, 2014-03-07 at 02:44 +0100, Rafael J. Wysocki wrote: > On Wednesday, February 26, 2014 05:11:08 PM Zhang Rui wrote: > > + > > +static int __init acpi_pnp_scan_handler_attach(struct acpi_device *adev, > > This can't be __init. > > > +

RE: [RFC PATCH 6/8] ACPI: use platform bus as the default bus for _HID enumeration

2014-03-03 Thread Zhang, Rui
> -Original Message- > From: Rafael J. Wysocki [mailto:r...@rjwysocki.net] > Sent: Tuesday, March 04, 2014 7:23 AM > To: Zhang, Rui > Cc: linux-a...@vger.kernel.org; linux-kernel@vger.kernel.org; > bhelg...@google.com; matthew.garr...@nebula.com; Wysocki, Rafael

Re: [PATCH 2/2] thermal,rcar_thermal: Add dependency on HAS_IOMEM

2014-03-03 Thread Zhang Rui
On Fri, 2014-02-28 at 01:30 -0800, Kuninori Morimoto wrote: > Hi Richard, Zhang > > > >>> diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig > > >>> index 35c0664..88efa8f 100644 > > >>> --- a/drivers/thermal/Kconfig > > >>> +++ b/drivers/thermal/Kconfig > > >>> @@ -136,6 +136,7 @@ con

Re: [RFC PATCH 8/8] PNPACPI: create both PNP and Platform device nodes for PNP0C01/PNP0C02

2014-03-03 Thread Zhang Rui
Hi, Bjorn, do you have comments for this particular patch? thanks, rui On Wed, 2014-02-26 at 17:11 +0800, Zhang Rui wrote: > ACPI devices with id "PNP0C01/PNP0C02" means that we need to > protect their resources from being allocated by others. > > Currently, this

Re: [RFC PATCH 6/8] ACPI: use platform bus as the default bus for _HID enumeration

2014-03-03 Thread Zhang Rui
On Mon, 2014-03-03 at 00:51 +0100, Rafael J. Wysocki wrote: > On Wednesday, February 26, 2014 05:11:12 PM Zhang Rui wrote: > > Because of the growing demand for enumerating ACPI devices to platform bus, > > this patch changes the code to enumerate ACPI devices with _HID/_CID to >

Re: [RFC PATCH 0/8] ACPI: change the way of enumerating PNPACPI/Platform devices

2014-03-03 Thread Zhang Rui
On Wed, 2014-02-26 at 16:47 +, Matthew Garrett wrote: > On Wed, 2014-02-26 at 17:11 +0800, Zhang Rui wrote: > > > 1. without the patch, the acpi_platform scan handler white list is > >continuously growing. > > 2. with the patch set, the PNPACPI scan handle

Re: [PATCHv5 01/10] Thermal: Do kfree in _unregister functions

2014-03-03 Thread Zhang Rui
On Tue, 2014-01-21 at 11:46 -0800, Dmitry Torokhov wrote: > Hi Durgadoss, > > On Fri, Jan 17, 2014 at 05:26:18AM +0530, Durgadoss R wrote: > > Currently the thermal_release function does > > kfree for all devices when they call device_unregister. > > This makes code scattering i.e whenever we add

Re: [PATCH 2/2] thermal,rcar_thermal: Add dependency on HAS_IOMEM

2014-02-26 Thread Zhang Rui
On Sat, 2014-01-25 at 23:29 +0100, Richard Weinberger wrote: > Commit beeb5a1e (thermal: rcar-thermal: Enable driver compilation with > COMPILE_TEST) > broke build on archs wihout io memory. > > On archs like S390 or um this driver cannot build nor work. > Make it depend on HAS_IOMEM to bypass bu

Re: [PATCH] thermal: add generic IIO channel thermal sensor driver

2014-02-26 Thread Zhang Rui
On Wed, 2014-02-05 at 17:43 -0800, Courtney Cavin wrote: > This driver is a generic method for using IIO ADC channels as thermal > sensors. > > Signed-off-by: Courtney Cavin Eduardo, what do you think of this patch? thanks, rui > --- > .../devicetree/bindings/thermal/iio-thermal.txt| 46

Re: [PATCH 1/1] thermal: fix default governor assignment

2014-02-26 Thread Zhang Rui
ixes this issue by assigning the > default governor, whenever the zone has a governor > set to NULL. > please check if the patch at https://patchwork.kernel.org/patch/3730391/ fixes the same problem? thanks, rui > Cc: Zhang Rui > Cc: linux...@vger.kernel.org > Cc: linux-kernel@v

[RFC PATCH 2/8] PNPACPI: use whilte list for pnpacpi device enumeration

2014-02-26 Thread Zhang Rui
platform bus drivers for the devices that are not PNP devices in nature. Signed-off-by: Zhang Rui --- drivers/acpi/scan.c|2 + drivers/pnp/pnpacpi/core.c | 395 include/linux/pnp.h|3 + 3 files changed, 366 insertions(+), 3

[RFC PATCH 3/8] PNPACPI: remove ids that does not comply with the ACPI PNP id rule

2014-02-26 Thread Zhang Rui
from the PNPACPI white list. Signed-off-by: Zhang Rui --- drivers/pnp/pnpacpi/core.c |4 1 file changed, 4 deletions(-) diff --git a/drivers/pnp/pnpacpi/core.c b/drivers/pnp/pnpacpi/core.c index 76df7fc..d47fbdf 100644 --- a/drivers/pnp/pnpacpi/core.c +++ b/drivers/pnp/pnpacpi/core.c

[RFC PATCH 0/8] ACPI: change the way of enumerating PNPACPI/Platform devices

2014-02-26 Thread Zhang Rui
P0B00:00" (CMOS RTC). But anyway, IMO, this specific problem does not mean the proposal of this patch is wrong, thus I send this patch out for early review to see if I'm in the right direction. Any comments are really welcome. thanks, rui -----

[RFC PATCH 6/8] ACPI: use platform bus as the default bus for _HID enumeration

2014-02-26 Thread Zhang Rui
Because of the growing demand for enumerating ACPI devices to platform bus, this patch changes the code to enumerate ACPI devices with _HID/_CID to platform bus by default, unless the device already has a scan handler attached. Signed-off-by: Zhang Rui --- drivers/acpi/acpi_platform.c | 28

[RFC PATCH 4/8] PNPACPI: remove unsupported serial PNP ids from PNPACPI id list

2014-02-26 Thread Zhang Rui
mism never works for ACPI enumerated PNPCXXX/PNPDXXX devices. So it is safe to remove those two ids from the PNPACPI id list. Signed-off-by: Zhang Rui --- drivers/pnp/pnpacpi/core.c |2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/pnp/pnpacpi/core.c b/drivers/pnp/pnpacpi/core.c ind

[RFC PATCH 8/8] PNPACPI: create both PNP and Platform device nodes for PNP0C01/PNP0C02

2014-02-26 Thread Zhang Rui
lication(need to copy quirks.c and system.c logic into ACPI), which does not look good neither. Any comments will be appreciated. Signed-off-by: Zhang Rui --- drivers/pnp/pnpacpi/core.c | 20 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/drivers/pnp/pnp

[RFC PATCH 7/8] Revert "ACPI / PNP: skip ACPI device nodes associated with physical nodes already"

2014-02-26 Thread Zhang Rui
node won't be created if a device has already been attached to the PNPACPI scan handler. Plus, in some cases, we may need both PNP node and platform node for the same ACPI device object, on purpose, like what I will do in next patch. Thus reverting this commit. Signed-off-by: Zhan

[RFC PATCH 5/8] PNPACPI: check and enumerate CMOS RTC devices explicitly

2014-02-26 Thread Zhang Rui
For CMOS RTC devices, the pnpacpi scan handler does not work because there is already a cmos rtc scan handler installed, thus we need to check those devices and enumerate them to PNP bus explicitly. Signed-off-by: Zhang Rui --- drivers/pnp/pnpacpi/core.c | 22 +- 1 file

[RFC PATCH 1/8] ACPI: introduce .match() callback for ACPI scan handler

2014-02-26 Thread Zhang Rui
support. Thus a per scan handler .match() callback is introduced in this patch, so that specified scan handler can have more flexible matching mechanism by introduce its own .match() callback. Signed-off-by: Zhang Rui --- drivers/acpi/scan.c | 17 +++-- include/acpi/acpi_bus.h

[GIT PULL] Thermal management updates for v3.14-rc1

2014-01-23 Thread Zhang Rui
iver Yuxuan Shui (1): intel_powerclamp: Fix cstate counter detection. Zhang Rui (5): Merge branch 'next' of git://git.kernel.org/.../evalenti/linux-soc-thermal into soc-thermal Thermal cpu cooling: return error if no valid cpu frequency entry Merge branches 'misc&

Re: [PATCH 1/1] suspend: make sync() on suspend-to-RAM optional

2014-01-22 Thread Zhang Rui
On Thu, 2014-01-23 at 02:11 -0500, Len Brown wrote: > From: Len Brown > > Linux suspend-to-RAM was unreliable when first developed, > and so sys_sync() was invoked inside the kernel at the > start of every suspend flow. > > Today, many devices are invoking suspend with > high reliability and hig

Re: [PATCH 3/4] fix module autoloading for ACPI enumerated devices

2014-01-16 Thread Zhang Rui
On Fri, 2014-01-17 at 02:28 +0100, Rafael J. Wysocki wrote: > On Thursday, January 16, 2014 04:04:35 PM Zhang Rui wrote: > > On Wed, 2014-01-15 at 17:08 +0200, Mika Westerberg wrote: > > > On Tue, Jan 14, 2014 at 04:46:37PM +0800, Zhang Rui wrote: > > > > diff --g

Re: [PATCH 3/4] fix module autoloading for ACPI enumerated devices

2014-01-16 Thread Zhang Rui
On Thu, 2014-01-16 at 13:27 +0100, Wolfram Sang wrote: > > diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c > > index d74c0b3..c4c5588 100644 > > --- a/drivers/i2c/i2c-core.c > > +++ b/drivers/i2c/i2c-core.c > > @@ -104,6 +104,11 @@ static int i2c_device_match(struct device *dev, struct

Re: [PATCH 3/4] fix module autoloading for ACPI enumerated devices

2014-01-16 Thread Zhang Rui
On Thu, 2014-01-16 at 12:28 +, Mark Brown wrote: > On Tue, Jan 14, 2014 at 04:46:37PM +0800, Zhang Rui wrote: > > ACPI enumerated devices has ACPI style _HID and _CID strings, > > all of these strings can be used for both driver loading and matching. > > > > Curr

Re: [PATCH 3/4] fix module autoloading for ACPI enumerated devices

2014-01-16 Thread Zhang Rui
On Wed, 2014-01-15 at 17:08 +0200, Mika Westerberg wrote: > On Tue, Jan 14, 2014 at 04:46:37PM +0800, Zhang Rui wrote: > > diff --git a/drivers/base/platform.c b/drivers/base/platform.c > > index 3a94b79..2f4aea2 100644 > > --- a/drivers/base/platform.c > > ++

RE: [PATCH 4/4] OF: introduce OF style 'modalias' support for platform bus.

2014-01-15 Thread Zhang, Rui
> -Original Message- > From: Rob Herring [mailto:robherri...@gmail.com] > Sent: Wednesday, January 15, 2014 9:45 PM > To: Zhang, Rui > Cc: linux-kernel@vger.kernel.org; linux-a...@vger.kernel.org; linux- > i...@vger.kernel.org; linux-...@vger.kernel.org; w...@the-dream

Re: [PATCH 3/4] fix module autoloading for ACPI enumerated devices

2014-01-14 Thread Zhang Rui
On Tue, 2014-01-14 at 14:41 +, Mark Brown wrote: > On Tue, Jan 14, 2014 at 04:00:17PM +0800, Zhang Rui wrote: > > On Mon, 2014-01-13 at 17:35 +, Mark Brown wrote: > > > On Mon, Jan 13, 2014 at 09:48:31PM +0800, Zhang Rui wrote: > > > > ACPI enumerated device

[PATCH 2/4] ACPI: add module autoloading support for ACPI enumerated devices

2014-01-14 Thread Zhang Rui
he ACPI bus is removed from device model. This patch introduces two new APIs, one for exporting ACPI ids in uevent MODALIAS field, and another for exporting ACPI ids in device' modalias sysfs attribute. For any bus that supports ACPI enumerated devices, it needs to invoke these two functio

[PATCH 3/4] fix module autoloading for ACPI enumerated devices

2014-01-14 Thread Zhang Rui
results in that the driver will not be loaded automatically when the device node is created, because their modalias do not match. This also applies to I2C and SPI bus. With this patch, the device' modalias will be shown as "acpi:INTABCD" as well. Signed-off-by: Zhang Rui --- drivers

[PATCH 1/4] ACPI: fix create_modalias() return value handling

2014-01-14 Thread Zhang Rui
output error, return -ENOMEM if the output is truncated, and also fixes both acpi_device_uevent() and acpi_device_modalias_show() to do proper return value check. Signed-off-by: Zhang Rui --- drivers/acpi/scan.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a

[PATCH 4/4] OF: introduce OF style 'modalias' support for platform bus.

2014-01-14 Thread Zhang Rui
Fix a problem that, the platform bus supports the OF style modalias in .uevent() call, but not in its device 'modalias' sysfs attribute. cc: devicet...@vger.kernel.org Signed-off-by: Zhang Rui --- drivers/base/platform.c |4 drivers/of/device.c |3 +++ inc

[PATCH 0/4] module autoloading fixes

2014-01-14 Thread Zhang Rui
device works well, both the platform Fan driver and device show their modalias as "acpi:PNP0C0B". thanks, rui Zhang Rui (4): ACPI: fix create_modalias() return value handling ACPI: add module autoloading supp

Re: [PATCH 3/4] fix module autoloading for ACPI enumerated devices

2014-01-14 Thread Zhang Rui
On Mon, 2014-01-13 at 17:35 +, Mark Brown wrote: > On Mon, Jan 13, 2014 at 09:48:31PM +0800, Zhang Rui wrote: > > ACPI enumerated devices has ACPI style _HID and _CID strings, > > all of these strings can be used for both driver loading and matching. > > > But current

[PATCH 4/4] OF: introduce OF style 'modalias' support for platform bus.

2014-01-13 Thread Zhang Rui
Fix a problem that, the platform bus supports the OF style modalias in .uevent() call, but not in its device' "modalias" sysfs attribute. Signed-off-by: Zhang Rui --- drivers/base/platform.c |4 drivers/of/device.c |3 +++ include/linux/of_device.h |6

[PATCH 3/4] fix module autoloading for ACPI enumerated devices

2014-01-13 Thread Zhang Rui
patch fixes module autoloading on those buses for ACPI enumerated devices. Signed-off-by: Zhang Rui --- drivers/base/platform.c | 12 +++- drivers/i2c/i2c-core.c | 11 +++ drivers/spi/spi.c | 10 ++ 3 files changed, 32 insertions(+), 1 deletion(-) diff --git

[PATCH 2/4] ACPI: add module autoloading support for ACPI enumerated devices

2014-01-13 Thread Zhang Rui
he ACPI bus is removed from device model. This patch introduces two new APIs, one for exporting ACPI ids in uevent MODALIAS field, and another for exporting ACPI ids in device' modalias sysfs attribute. For any bus that supports ACPI enumerated devices, it needs to invoke these two functio

[PATCH 1/4] ACPI: fix create_modalias() return value handling

2014-01-13 Thread Zhang Rui
output error, return -ENOMEM if the output is truncated, and also fixes both acpi_device_uevent() and acpi_device_modalias_show() to do proper return value check. Signed-off-by: Zhang Rui --- drivers/acpi/scan.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a

[PATCH 0/4] module autoloading fixes

2014-01-13 Thread Zhang Rui
device works well, both the platform Fan driver and device show their modalias as "acpi:PNP0C0B". thanks, rui Zhang Rui (4): ACPI: fix create_modalias() return value handling ACPI: add module autoloading supp

RE: [PATCHv5 05/20] cpufreq: cpufreq-cpu0: add dt node parsing for cooling device properties

2014-01-12 Thread Zhang, Rui
> -Original Message- > From: Eduardo Valentin [mailto:eduardo.valen...@ti.com] > Sent: Wednesday, November 13, 2013 3:46 AM > To: swar...@wwwdotorg.org; pawel.m...@arm.com; mark.rutl...@arm.com; > ian.campb...@citrix.com; rob.herr...@calxeda.com; li...@roeck-us.net; >

Re: [PATCH v12 7/7] thermal:exynos:boost: Automatic enable/disable of BOOST feature (at Exynos4412)

2014-01-09 Thread Zhang Rui
W managed shut down of the system. > If the last trip point is crossed, the PMU HW generates the power off > signal. > > Signed-off-by: Lukasz Majewski > Signed-off-by: Myungjoo Ham > Acked-by: Eduardo Valentin Reviewed-by: Zhang Rui thanks, rui > > --- > Changes for

Re: [PATCH v12 0/7] cpufreq:boost: CPU Boost mode support

2014-01-09 Thread Zhang Rui
On Wed, 2014-01-08 at 01:35 +0100, Rafael J. Wysocki wrote: > On Tuesday, January 07, 2014 07:58:24 AM Lukasz Majewski wrote: > > Hi Rafael, > > Hi, > > > > This patch series introduces support for CPU overclocking technique > > > called Boost. > > > > > > It is a follow up of a LAB governor pro

Re: [PATCH] hwmon/sensors: fix SENSORS_LM75 dependencies

2014-01-07 Thread Zhang Rui
c): undefined reference to > > `thermal_zone_of_sensor_unregister' > > drivers/built-in.o: In function `lm75_probe': > > lm75.c:(.text+0x12c123): undefined reference to > > `thermal_zone_of_sensor_register' > > > > Therefore, this patch limits the

RE: [PATCH] hwmon/sensors: fix SENSORS_LM75 dependencies

2014-01-07 Thread Zhang, Rui
d; > lm-sens...@lm-sensors.org; Zhang, Rui; Eduardo Valentin; linux- > p...@vger.kernel.org > Subject: Re: [PATCH] hwmon/sensors: fix SENSORS_LM75 dependencies > Importance: High > > On 07-01-2014 08:04, Jean Delvare wrote: > > Hi Guenter, Randy, > > > > On Mon, 06

Re: [PATCHv2 0/7] DRA7: DT thermal support

2014-01-06 Thread Zhang Rui
On Mon, 2014-01-06 at 08:36 -0400, Eduardo Valentin wrote: > Hello all, > > Now that the basic thermal DT support is merged into Rui's tree, > I am resending this series, which introduces the DT node entries > for DRA7 thermal limits representation. > > The series adds two thermal zones, to repre

Re: [PATCH 1/1] thermal: remove const flag from .ops of imx thermal

2014-01-06 Thread Zhang Rui
On Mon, 2014-01-06 at 08:54 -0400, Eduardo Valentin wrote: > As per previous changes on thermal framework API, > registering a new thermal zone does not require > a const thermal zone ops. > > Thus, this patch removes the flag from imx thermal zone ops. > > Cc: Zhang Ru

Re: [PATCH] thermal: exynos: handle gate clock for misplaced TRIMINFO register

2014-01-01 Thread Zhang Rui
On Thu, 2013-11-07 at 18:12 +0530, Naveen Krishna Chatradhi wrote: > On Exynos5420 the TMU(4) for GPU has a seperate clock enable bit from > the other TMU channels(0 ~ 3). Hence, accessing TRIMINFO for base_second > should be acompanied by enabling the respective clock. > > This patch which allow

Re: [PATCH 1/1] thermal: fix cpu_cooling max_level behavior

2014-01-01 Thread Zhang Rui
ency; > > max_level++; > > } > > + /* max_level is an index, not a counter */ > > + max_level--; > > I think we should check the max_level first, like the patch I attached below. thanks, rui >From a116776f7b6052599df0c67db29c30ea9d69d7ee Mon Sep

Re: [PATCH] thermal: ti-soc-thermal: clk_round_rate() can return a zero upon error

2014-01-01 Thread Zhang Rui
ve > the correct behavior in the meantime. > > This patch also gets rid of a comparison between unsigned and signed > values; a side-benefit. > > Signed-off-by: Paul Walmsley > Cc: Eduardo Valentin > Cc: Zhang Rui Eduardo, will you take this patch? thanks, rui > -

Re: [PATCH] drivers: thermal: Mark function as static in x86_pkg_temp_thermal.c

2014-01-01 Thread Zhang Rui
On Wed, 2013-12-18 at 10:40 -0800, j...@joshtriplett.org wrote: > On Wed, Dec 18, 2013 at 11:16:02PM +0530, Rashika Kheria wrote: > > Mark function sys_set_trip_temp() as static in x86_pkg_temp_thermal.c > > because it is not used outside this file. > > > > This eliminates the following warning in

Re: [PATCH v12 1/4] thermal: samsung: replace inten_ bit fields with intclr_

2014-01-01 Thread Zhang Rui
On Thu, 2013-12-19 at 11:35 +0530, Naveen Krishna Chatradhi wrote: > This patch replaces the inten_rise_shift/mask and inten_fall_shift/mask > with intclr_rise_shift/mask and intclr_fall_shift/mask respectively. > Currently, inten_rise_shift/mask and inten_fall_shift/mask bits are only used > to co

<    1   2   3   4   5   6   7   8   9   >