Jonathan Nieder | 1 Mar 16:27 2012
Picon

Re: [PATCH 04/50] ACPICA: Fix to allow region arguments to reference other scopes

Hi,

Len Brown wrote[1]:

> From: Lin Ming <ming.m.lin <at> intel.com>
[...]
> http://www.acpica.org/bugzilla/show_bug.cgi?id=937
> http://marc.info/?l=linux-acpi&m=131636632718222&w=2
>
> ACPI Error: [RAMB] Namespace lookup failure, AE_NOT_FOUND (20110112/psargs-359)
> ACPI Exception: AE_NOT_FOUND, Could not execute arguments for [RAMW] (Region) (20110112/nsinit-349)
>
>     Scope (_SB)
>     {
>         Name (RAMB, 0xDF5A1018)
>         OperationRegion (\RAMW, SystemMemory, RAMB, 0x00010000)
>     }
>
> For above ASL code, we need to save scope node(\_SB) to lookup
> the argument node(\_SB.RAMB).
>
> Reported-by: Jim Green <student.northwestern <at> gmail.com>
> Signed-off-by: Lin Ming <ming.m.lin <at> intel.com>
> Signed-off-by: Bob Moore <robert.moore <at> intel.com>
> Signed-off-by: Len Brown <len.brown <at> intel.com>

Arne Nordmark reports[2] that this patch, when applied to 3.2.5, fixes
a resume failure.  Thanks!

Would it be safe and useful to backport this fix to stable/longterm
(Continue reading)

Amit Daniel Kachhap | 3 Mar 12:06 2012

[PATCH 0/4] thermal: exynos: Add kernel thermal support for exynos platform

Changes since RFC:
*Moved the Temperature sensor driver from driver/hwmon/ to driver/mfd
 as discussed with Guenter Roeck <guenter.roeck <at> ericsson.com> and 
 Donggeun Kim <dg77.kim <at> samsung.com> (https://lkml.org/lkml/2012/1/5/7)
*Some changes according to the changes in common cpu cooling APIs

All the patchset based on Kernel version 3.3-rc5 and uses the cpufreq
cooling registration APIs implemented in earlier patchset 
https://lkml.org/lkml/2012/2/22/123

The code added in this patchset adds a thermal interface layer for samsung
exynos platforms. This layer is registered from the temperature sensor driver 
and recieves/monitor the temperature from the sensor and informs the
generic thermal layer to take the necessary cooling action. Currently, this
layer can be used to create only one thermal zone and hence only one
temperature sensor can register. The future goal is to make this handle
multiple thermal zones.

Some modifications are done in the temperature sensor driver to export the
information needed for the thermal interface to register with the core linux
thermal framework and with the cpu frequency based cooling devices.

A simple data/control flow diagrams to illustrate this,

Core Linux thermal <------->  Exynos thermal  <-------- Temperature Sensor
	  |                             |
	 \|/                            |
  Cpufreq cooling device <-----

Amit Daniel Kachhap (4):
(Continue reading)

Amit Daniel Kachhap | 3 Mar 12:06 2012

[PATCH 1/4] thermal: exynos: Add thermal interface support for linux thermal layer

This codes uses the generic linux thermal layer and creates a bridge
between temperature sensors, linux thermal framework and cooling devices
for samsung exynos platform. This layer recieves or monitor the
temperature from the sensor and informs the generic thermal layer to take
the necessary cooling action.

Signed-off-by: Amit Daniel Kachhap <amit.kachhap <at> linaro.org>
---
 drivers/thermal/Kconfig          |    8 +
 drivers/thermal/Makefile         |    1 +
 drivers/thermal/exynos_thermal.c |  272 ++++++++++++++++++++++++++++++++++++++
 include/linux/exynos_thermal.h   |   72 ++++++++++
 4 files changed, 353 insertions(+), 0 deletions(-)
 create mode 100644 drivers/thermal/exynos_thermal.c
 create mode 100644 include/linux/exynos_thermal.h

diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig
index 298c1cd..4e8df56 100644
--- a/drivers/thermal/Kconfig
+++ b/drivers/thermal/Kconfig
 <at>  <at>  -29,3 +29,11  <at>  <at>  config CPU_THERMAL
 	  This will be useful for platforms using the generic thermal interface
 	  and not the ACPI interface.
 	  If you want this support, you should say Y or M here.
+
+config SAMSUNG_THERMAL_INTERFACE
+	bool "Samsung Thermal interface support"
+	depends on THERMAL && CPU_THERMAL
+	help
+	  This is a samsung thermal interface which will be used as
(Continue reading)

Amit Daniel Kachhap | 3 Mar 12:06 2012

[PATCH 2/4] hwmon: exynos4: Move thermal sensor driver to driver/mfd directory

This movement is needed because the hwmon entries and corresponding
sysfs interface is a duplicate of utilities already provided by
driver/thermal/thermal_sys.c. The goal is to place it in mfd folder
and add necessary calls to get the temperature information.

Signed-off-by: Amit Daniel Kachhap <amit.kachhap <at> linaro.org>
Signed-off-by: Donggeun Kim <dg77.kim <at> samsung.com>
---
 Documentation/hwmon/exynos4_tmu |   81 ------
 Documentation/mfd/exynos4_tmu   |   81 ++++++
 drivers/hwmon/Kconfig           |   10 -
 drivers/hwmon/Makefile          |    1 -
 drivers/hwmon/exynos4_tmu.c     |  514 ---------------------------------------
 drivers/mfd/Kconfig             |   10 +
 drivers/mfd/Makefile            |    1 +
 drivers/mfd/exynos4_tmu.c       |  514 +++++++++++++++++++++++++++++++++++++++
 8 files changed, 606 insertions(+), 606 deletions(-)
 delete mode 100644 Documentation/hwmon/exynos4_tmu
 create mode 100644 Documentation/mfd/exynos4_tmu
 delete mode 100644 drivers/hwmon/exynos4_tmu.c
 create mode 100644 drivers/mfd/exynos4_tmu.c

diff --git a/Documentation/hwmon/exynos4_tmu b/Documentation/hwmon/exynos4_tmu
deleted file mode 100644
index c3c6b41..0000000
--- a/Documentation/hwmon/exynos4_tmu
+++ /dev/null
 <at>  <at>  -1,81 +0,0  <at>  <at> 
-Kernel driver exynos4_tmu
-=================
(Continue reading)

Amit Daniel Kachhap | 3 Mar 12:06 2012

[PATCH 3/4] thermal: exynos4: Register the tmu sensor with the thermal interface layer

Export and register information from the tmu temperature sensor to the samsung
exynos kernel thermal framework where different cooling devices and thermal
zone are binded. The exported information is based according to the data
structure thermal_sensor_conf present in exynos_thermal.h. HWMON sysfs
functions are removed as all of them are present in generic linux thermal layer.

Also the platform data structure is modified to pass frequency cooling
in percentages for each thermal level.

Signed-off-by: Amit Daniel Kachhap <amit.kachhap <at> linaro.org>
---
 Documentation/mfd/exynos4_tmu             |   35 +-------
 drivers/mfd/exynos4_tmu.c                 |  139 +++++++----------------------
 include/linux/platform_data/exynos4_tmu.h |    7 ++
 3 files changed, 44 insertions(+), 137 deletions(-)

diff --git a/Documentation/mfd/exynos4_tmu b/Documentation/mfd/exynos4_tmu
index c3c6b41..2b46f67 100644
--- a/Documentation/mfd/exynos4_tmu
+++ b/Documentation/mfd/exynos4_tmu
 <at>  <at>  -46,36 +46,7  <at>  <at>  The threshold levels are defined as follows:
   The threshold and each trigger_level are set
   through the corresponding registers.

-When an interrupt occurs, this driver notify user space of
-one of four threshold levels for the interrupt
-through kobject_uevent_env and sysfs_notify functions.
+When an interrupt occurs, this driver notify kernel thermal framework
+with the function exynos4_report_trigger.
 Although an interrupt condition for level_0 can be set,
(Continue reading)

Amit Daniel Kachhap | 3 Mar 12:06 2012

[PATCH 4/4] ARM: exynos4: Add thermal sensor driver platform device support

This patch adds necessary source definations needed for TMU driver and
the platform device support.

Signed-off-by: Amit Daniel Kachhap <amit.kachhap <at> linaro.org>
---
 arch/arm/mach-exynos/Kconfig              |   11 +++++
 arch/arm/mach-exynos/Makefile             |    1 +
 arch/arm/mach-exynos/clock.c              |    4 ++
 arch/arm/mach-exynos/dev-tmu.c            |   64 +++++++++++++++++++++++++++++
 arch/arm/mach-exynos/include/mach/irqs.h  |    2 +
 arch/arm/mach-exynos/include/mach/map.h   |    1 +
 arch/arm/mach-exynos/mach-origen.c        |    1 +
 arch/arm/plat-samsung/include/plat/devs.h |    1 +
 8 files changed, 85 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-exynos/dev-tmu.c

diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index 5d602f6..03968a6 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
 <at>  <at>  -160,6 +160,16  <at>  <at>  config EXYNOS4_SETUP_SPI
 	help
 	  Common setup code for SPI GPIO configurations.

+config EXYNOS4_DEV_TMU
+	bool "Exynos4 tmu device support"
+	default n
+	depends on ARCH_EXYNOS4
+	---help---
+	  Compile in platform device definitions for TMU. This macro also
(Continue reading)

Sylwester Nawrocki | 3 Mar 13:21 2012
Picon

Re: [PATCH 2/4] hwmon: exynos4: Move thermal sensor driver to driver/mfd directory

On 03/03/2012 12:06 PM, Amit Daniel Kachhap wrote:
> This movement is needed because the hwmon entries and corresponding
> sysfs interface is a duplicate of utilities already provided by
> driver/thermal/thermal_sys.c. The goal is to place it in mfd folder
> and add necessary calls to get the temperature information.
>
> Signed-off-by: Amit Daniel Kachhap<amit.kachhap <at> linaro.org>
> Signed-off-by: Donggeun Kim<dg77.kim <at> samsung.com>
> ---
>   Documentation/hwmon/exynos4_tmu |   81 ------
>   Documentation/mfd/exynos4_tmu   |   81 ++++++
>   drivers/hwmon/Kconfig           |   10 -
>   drivers/hwmon/Makefile          |    1 -
>   drivers/hwmon/exynos4_tmu.c     |  514 ---------------------------------------
>   drivers/mfd/Kconfig             |   10 +
>   drivers/mfd/Makefile            |    1 +
>   drivers/mfd/exynos4_tmu.c       |  514 +++++++++++++++++++++++++++++++++++++++
>   8 files changed, 606 insertions(+), 606 deletions(-)
>   delete mode 100644 Documentation/hwmon/exynos4_tmu
>   create mode 100644 Documentation/mfd/exynos4_tmu
>   delete mode 100644 drivers/hwmon/exynos4_tmu.c
>   create mode 100644 drivers/mfd/exynos4_tmu.c

Please consider adding -M option to git format-patch next time, which
would make the patch smaller and would let to see clearly what's moved
and what has changed.

--
Thanks,
Sylwester
(Continue reading)

Guenter Roeck | 3 Mar 15:52 2012
Picon

Re: [lm-sensors] [PATCH 2/4] hwmon: exynos4: Move thermal sensor driver to driver/mfd directory

On Sat, Mar 03, 2012 at 06:06:05AM -0500, Amit Daniel Kachhap wrote:
> This movement is needed because the hwmon entries and corresponding
> sysfs interface is a duplicate of utilities already provided by
> driver/thermal/thermal_sys.c. The goal is to place it in mfd folder
> and add necessary calls to get the temperature information.
> 
> Signed-off-by: Amit Daniel Kachhap <amit.kachhap <at> linaro.org>
> Signed-off-by: Donggeun Kim <dg77.kim <at> samsung.com>
> ---
>  Documentation/hwmon/exynos4_tmu |   81 ------
>  Documentation/mfd/exynos4_tmu   |   81 ++++++
>  drivers/hwmon/Kconfig           |   10 -
>  drivers/hwmon/Makefile          |    1 -
>  drivers/hwmon/exynos4_tmu.c     |  514 ---------------------------------------
>  drivers/mfd/Kconfig             |   10 +
>  drivers/mfd/Makefile            |    1 +
>  drivers/mfd/exynos4_tmu.c       |  514 +++++++++++++++++++++++++++++++++++++++
>  8 files changed, 606 insertions(+), 606 deletions(-)
>  delete mode 100644 Documentation/hwmon/exynos4_tmu
>  create mode 100644 Documentation/mfd/exynos4_tmu
>  delete mode 100644 drivers/hwmon/exynos4_tmu.c
>  create mode 100644 drivers/mfd/exynos4_tmu.c
> 

You are just moving the driver from hwmon to mfd. It is still a hwmon driver
and registers itself as hwmon driver. That does not make sense. If you want it
as mfd driver, it should not register itself as hwmon driver. It might have sub-devices
which are thermal and/or hwmon devices in the respective trees, or it might just be
a thermal driver (which then registers itself as hwmon device automatically).

(Continue reading)

Guenter Roeck | 3 Mar 15:55 2012
Picon

Re: [lm-sensors] [PATCH 3/4] thermal: exynos4: Register the tmu sensor with the thermal interface layer

On Sat, Mar 03, 2012 at 06:06:06AM -0500, Amit Daniel Kachhap wrote:
> Export and register information from the tmu temperature sensor to the samsung
> exynos kernel thermal framework where different cooling devices and thermal
> zone are binded. The exported information is based according to the data
> structure thermal_sensor_conf present in exynos_thermal.h. HWMON sysfs
> functions are removed as all of them are present in generic linux thermal layer.
> 
> Also the platform data structure is modified to pass frequency cooling
> in percentages for each thermal level.
> 
> Signed-off-by: Amit Daniel Kachhap <amit.kachhap <at> linaro.org>

Ah, that is what I meant. I don't think it makes sense to have this as separate patch.

Guenter
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Mark Brown | 3 Mar 17:44 2012

Re: [PATCH 2/4] hwmon: exynos4: Move thermal sensor driver to driver/mfd directory

On Sat, Mar 03, 2012 at 04:36:05PM +0530, Amit Daniel Kachhap wrote:
> This movement is needed because the hwmon entries and corresponding
> sysfs interface is a duplicate of utilities already provided by
> driver/thermal/thermal_sys.c. The goal is to place it in mfd folder
> and add necessary calls to get the temperature information.

> --- a/Documentation/hwmon/exynos4_tmu
> +++ /dev/null

Moving this seems to be a failure, the device is exposing a hwmon
interface even if you've moved the code to mfd (though it doesn't
actually look like a multi-function device at all as far as I can see -
usually a MFD would have a bunch of unrelated functionality while this
has one function used by two subsystems).

If anything it looks like the ADC driver ought to be moved into IIO with
either generic or Exynos specific function drivers layered on top of it
in hwmon and thermal making use of the values that are read.

Gmane