Amit Daniel Kachhap | 3 Mar 2012 12:06
Favicon

[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 2012 12:06
Favicon

[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 2012 12:06
Favicon

[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 2012 12:06
Favicon

[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 2012 12:06
Favicon

[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)

Mark Brown | 3 Mar 2012 17:44
Favicon
Gravatar

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.
Amit Kachhap | 5 Mar 2012 10:11
Favicon

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

On 3 March 2012 23:34, Guenter Roeck <guenter.roeck <at> ericsson.com> wrote:
> On Sat, Mar 03, 2012 at 11:44:10AM -0500, Mark Brown wrote:
>> 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.
>>
> I would agree. Or maybe move it all to thermal, since thermal devices register
> the hwmon subsystem.

Ok I agree with your suggestion of moving into thermal. Since I wanted
to separate exynos specific generic thermal implementation with the
H/W driver so that other versions of the sensor driver can easily hook
into the common part. Anyway this implementation seems possible.

Thanks for the comments
(Continue reading)

Valentin, Eduardo | 5 Mar 2012 13:20
Picon
Favicon

Re: [PATCH V3] cpuidle: Add a sysfs entry to disable specific C state for debug purpose.

Hello,

On Mon, Mar 5, 2012 at 12:18 PM, Henrique de Moraes Holschuh
<hmh <at> hmh.eng.br> wrote:
> On Mon, 05 Mar 2012, ShuoX Liu wrote:
>>  <at>  <at>  -45,6 +46,7  <at>  <at>  total 0
>>  /sys/devices/system/cpu/cpu0/cpuidle/state1:
>>  total 0
>>  -r--r--r-- 1 root root 4096 Feb  8 10:42 desc
>> +-rw-r--r-- 1 root root 4096 Feb  8 10:42 disable
>>  -r--r--r-- 1 root root 4096 Feb  8 10:42 latency
>>  -r--r--r-- 1 root root 4096 Feb  8 10:42 name
>>  -r--r--r-- 1 root root 4096 Feb  8 10:42 power
>
> ...
>
>> diff --git a/drivers/cpuidle/sysfs.c b/drivers/cpuidle/sysfs.c
>> index 3fe41fe..1eae29a 100644
>> --- a/drivers/cpuidle/sysfs.c
>> +++ b/drivers/cpuidle/sysfs.c
>>  <at>  <at>  -222,6 +222,9  <at>  <at>  struct cpuidle_state_attr {
>>  #define define_one_state_ro(_name, show) \
>>  static struct cpuidle_state_attr attr_##_name = __ATTR(_name, 0444,
>> show, NULL)
>>
>> +#define define_one_state_rw(_name, show, store) \
>> +static struct cpuidle_state_attr attr_##_name = __ATTR(_name, 0644,
>> show, store)
>> +
>>  #define define_show_state_function(_name) \
(Continue reading)

Rafael J. Wysocki | 11 Mar 2012 22:23
Picon
Gravatar

3.3-rc7: Reported regressions from 3.2

This message contains a list of some regressions from 3.2,
for which there are no fixes in the mainline known to the tracking team.
If any of them have been fixed already, please let us know.

If you know of any other unresolved regressions from 3.2, please let us
know either and we'll add them to the list.  Moreover, when you are
reporting a kernel regression, please send a CC of your report to the LKML
(or forward it to the LKML if you are not reporting the regression by e-mail)
with the word "regression" in the subject, as that will make it much
easier for us to find it.  Also, please let us know if any of the entries
below are invalid.

Each entry from the list will be sent additionally in an automatic reply
to this message with CCs to the people involved in reporting and handling
the issue.

Listed regressions statistics:

  Date          Total  Pending  Unresolved
  ----------------------------------------
  2012-03-11       26       15          15
  2012-03-04       23       15          15
  2012-02-23       15       13          13

Unresolved regressions
----------------------

Bug-Entry	: https://bugzilla.kernel.org/show_bug.cgi?id=42907
Subject		: 3.3.0-rc5+git: WARNING: at drivers/gpu/drm/i915/i915_irq.c:652 ironlake_irq_handler+0x4ea/0x500()
Submitter	: Soeren Sonnenburg <sonne <at> debian.org>
(Continue reading)

Mark Brown | 12 Mar 2012 19:11
Favicon
Gravatar

Re: [PATCH V3] cpuidle: Add a sysfs entry to disable specific C state for debug purpose.

On Tue, Mar 06, 2012 at 06:39:35AM -0800, Greg KH wrote:

> Do you know of any tools using these files?  I have never heard of them,
> and I was told we should move these files years ago.  So I don't think
> there should be any api issues.

powertop uses them.

Gmane