Re: [PATCH 00/50] staging: omap-thermal: several code refactoring

2013-03-18 Thread Eduardo Valentin
Greg, Dan, On 16-03-2013 12:16, Greg KH wrote: On Sat, Mar 16, 2013 at 08:46:03AM -0400, Eduardo Valentin wrote: Hello Dan, On 16-03-2013 05:05, Dan Carpenter wrote: I've reviewed this set. I hate to make people redo whole patchset sets, and I hate re-reviewing code. Obviously, I

[PATCH 0/8] staging: [omap,ti-soc]-thermal: fixes and renaming

2013-03-18 Thread Eduardo Valentin
trying the driver, these patches are also available, as usual, here: g...@gitorious.org:thermal-framework/thermal-framework.git thermal_work/omap/ti-thermal-rename https://git.gitorious.org/thermal-framework/thermal-framework.git thermal_work/omap/ti-thermal-rename BR, Eduardo Valentin (8): sta

[PATCH 1/8] staging: omap-thermal: fix return value

2013-03-18 Thread Eduardo Valentin
Return the proper error value in _omap_bandgap_read_threshold. Cc: Dan Carpenter Signed-off-by: Eduardo Valentin diff --git a/drivers/staging/omap-thermal/omap-bandgap.c b/drivers/staging/omap-thermal/omap-bandgap.c index 33bfe3b..cb7aa35 100644 --- a/drivers/staging/omap-thermal/omap

[PATCH 2/8] staging: omap-thermal: use spin_lock_irqsave inside IRQ handler

2013-03-18 Thread Eduardo Valentin
Even if the IRQ is not firing because it is ONE_SHOT and disable at INTC level, the IRQ handler must use spin_lock_irqsave. It is necessary to disable IRQs from the current CPU while it is holding a spin_lock which is need. Cc: Dan Carpenter Signed-off-by: Eduardo Valentin diff --git a

[PATCH 3/8] staging: omap-thermal: rename bg_ptr to bgp

2013-03-18 Thread Eduardo Valentin
Use a shorter name to bandgap pointer. Cc: Benoit Signed-off-by: Eduardo Valentin diff --git a/drivers/staging/omap-thermal/omap-bandgap.c b/drivers/staging/omap-thermal/omap-bandgap.c index a4ac06c..89361fe 100644 --- a/drivers/staging/omap-thermal/omap-bandgap.c +++ b/drivers/staging/omap

[PATCH 5/8] staging: ti-soc-thermal: make unexported functions local

2013-03-18 Thread Eduardo Valentin
Move _ti_bandgap_write_threshold and _ti_bandgap_read_threshold to static area, as they are local functions. Signed-off-by: Eduardo Valentin diff --git a/drivers/staging/ti-soc-thermal/ti-bandgap.c b/drivers/staging/ti-soc-thermal/ti-bandgap.c index 6a0b1ac..c850e13 100644 --- a/drivers

[PATCH 7/8] stating: ti-soc-thermal: use sizeof(*pointer) while allocating

2013-03-18 Thread Eduardo Valentin
Follow Documentation/CodingStyle and use sizeof(*pointer) instead of sizeof(struct type). Signed-off-by: Eduardo Valentin diff --git a/drivers/staging/ti-soc-thermal/ti-bandgap.c b/drivers/staging/ti-soc-thermal/ti-bandgap.c index b74e847..4382c0c 100644 --- a/drivers/staging/ti-soc-thermal/ti

[PATCH 6/8] staging: ti-soc-thermal: split writable data from readonly data

2013-03-18 Thread Eduardo Valentin
. Signed-off-by: Eduardo Valentin diff --git a/drivers/staging/ti-soc-thermal/ti-bandgap.c b/drivers/staging/ti-soc-thermal/ti-bandgap.c index c850e13..b74e847 100644 --- a/drivers/staging/ti-soc-thermal/ti-bandgap.c +++ b/drivers/staging/ti-soc-thermal/ti-bandgap.c @@ -249,7 +249,7 @@ static

[PATCH 8/8] staging: ti-soc-thermal: fix several kernel-doc warnings and error

2013-03-18 Thread Eduardo Valentin
This patch updates the documentation to remove all warnings and errors reported by scripts/kernel-doc. Most are missing arguments due to wrong format. Cc: Nishanth Menon Signed-off-by: Eduardo Valentin diff --git a/drivers/staging/ti-soc-thermal/ti-bandgap.c b/drivers/staging/ti-soc-thermal

Re: [PATCH 1/8] staging: omap-thermal: fix return value

2013-03-18 Thread Eduardo Valentin
Dan, On 18-03-2013 12:39, Dan Carpenter wrote: Thanks. Acked-by: Dan Carpenter regards, dan carpenter Thanks for taking the time to check this code. Eduardo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org Mo

Re: [PATCH 2/8] staging: omap-thermal: use spin_lock_irqsave inside IRQ handler

2013-03-18 Thread Eduardo Valentin
On 18-03-2013 15:16, Dan Carpenter wrote: On Mon, Mar 18, 2013 at 10:59:10AM -0400, Eduardo Valentin wrote: Even if the IRQ is not firing because it is ONE_SHOT and disable at INTC level, the IRQ handler must use spin_lock_irqsave. It is necessary to disable IRQs from the current CPU while it

Re: [PATCH 0/8] staging: [omap,ti-soc]-thermal: fixes and renaming

2013-03-19 Thread Eduardo Valentin
Hello Greg, On 18-03-2013 10:59, Eduardo Valentin wrote: Hi Greg, I am sending extra patches on omap-thermal driver, under staging. There are couple of fixes based on Dan Carpenter's review on the last patch set I sent. On top of these, there are some changes on the naming conventio

[PATCHv2 00/12] staging: [omap,ti-soc]-thermal: fixes and renaming

2013-03-19 Thread Eduardo Valentin
driver, these patches are also available, as usual, here: g...@gitorious.org:thermal-framework/thermal-framework.git thermal_work/omap/ti-thermal-rename https://git.gitorious.org/thermal-framework/thermal-framework.git thermal_work/omap/ti-thermal-rename All best, Eduardo Valentin (12): staging

[PATCHv2 01/12] staging: omap-thermal: fix return value

2013-03-19 Thread Eduardo Valentin
Return the proper error value in _omap_bandgap_read_threshold. Acked-by: Dan Carpenter Signed-off-by: Eduardo Valentin --- drivers/staging/omap-thermal/omap-bandgap.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/staging/omap-thermal/omap-bandgap.c b

[PATCHv2 02/12] staging: omap-thermal: rename bg_ptr to bgp

2013-03-19 Thread Eduardo Valentin
Use a shorter name to bandgap pointer. Cc: Benoit Cc: Dan Carpenter Signed-off-by: Eduardo Valentin --- drivers/staging/omap-thermal/omap-bandgap.c| 562 ++-- drivers/staging/omap-thermal/omap-bandgap.h| 28 +- drivers/staging/omap-thermal/omap-thermal

[PATCHv2 03/12] staging: rename omap-thermal driver to ti-soc-thermal

2013-03-19 Thread Eduardo Valentin
Carpenter Signed-off-by: Eduardo Valentin --- drivers/staging/Kconfig|2 +- drivers/staging/Makefile |2 +- drivers/staging/omap-thermal/Makefile |5 - .../{omap-thermal => ti-soc-thermal}/Kconfig |

[PATCHv2 04/12] staging: ti-soc-thermal: rename Kconfig options

2013-03-19 Thread Eduardo Valentin
This patch renames the Kconfig options to cope with the new naming convention. Cc: Santosh Shilimkar Cc: Benoit Cc: Nishanth Menon Cc: Dan Carpenter Signed-off-by: Eduardo Valentin --- drivers/staging/Makefile|2 +- drivers/staging/ti-soc-thermal/Kconfig | 14

[PATCHv2 06/12] staging: ti-soc-thermal: make unexported functions local

2013-03-19 Thread Eduardo Valentin
Move _ti_bandgap_write_threshold and _ti_bandgap_read_threshold to static area, as they are local functions. Signed-off-by: Eduardo Valentin --- drivers/staging/ti-soc-thermal/ti-bandgap.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/ti-soc

[PATCHv2 08/12] stating: ti-soc-thermal: use sizeof(*pointer) while allocating

2013-03-19 Thread Eduardo Valentin
Follow Documentation/CodingStyle and use sizeof(*pointer) instead of sizeof(struct type). Signed-off-by: Eduardo Valentin --- drivers/staging/ti-soc-thermal/ti-bandgap.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/staging/ti-soc-thermal/ti-bandgap.c b

[PATCHv2 07/12] staging: ti-soc-thermal: split writable data from readonly data

2013-03-19 Thread Eduardo Valentin
. Signed-off-by: Eduardo Valentin --- drivers/staging/ti-soc-thermal/ti-bandgap.c| 20 -- drivers/staging/ti-soc-thermal/ti-bandgap.h| 65 +++- drivers/staging/ti-soc-thermal/ti-thermal-common.c |2 +- 3 files changed, 51 insertions(+), 36 deletions

[PATCHv2 09/12] staging: ti-soc-thermal: fix several kernel-doc warnings and error

2013-03-19 Thread Eduardo Valentin
This patch updates the documentation to remove all warnings and errors reported by scripts/kernel-doc. Most are missing arguments due to wrong format. Cc: Nishanth Menon Signed-off-by: Eduardo Valentin --- drivers/staging/ti-soc-thermal/ti-bandgap.c | 56 +- drivers

[PATCHv2 10/12] staging: ti-soc-thermal: fix condition to apply hyst

2013-03-19 Thread Eduardo Valentin
While updating talert thresholds, threshold cold must always be lower than threshold hot. This patch fixes the function ti_bandgap_update_alert_threshold to only change the thresholds by applying a hysteresis when they violate this condition. Signed-off-by: Eduardo Valentin --- drivers/staging

[PATCHv2 11/12] staging: ti-soc-thermal: fix bitfield writing while updating thresholds

2013-03-19 Thread Eduardo Valentin
Wrong threshold cold values may be written with current implementation. This patch fixes the threshold update function by simplifying the bitfield manipulation sequence. Signed-off-by: Eduardo Valentin --- drivers/staging/ti-soc-thermal/ti-bandgap.c |8 1 files changed, 4

[PATCHv2 12/12] staging: ti-soc-thermal: propagate error code

2013-03-19 Thread Eduardo Valentin
While writing talert thresholds, propagate the error code from ti_bandgap_update_alert_threshold to the caller of _ti_bandgap_write_threshold. Signed-off-by: Eduardo Valentin --- drivers/staging/ti-soc-thermal/ti-bandgap.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git

Re: [PATCHv2 09/12] staging: ti-soc-thermal: fix several kernel-doc warnings and error

2013-03-20 Thread Eduardo Valentin
Hello Nishanth, On 19-03-2013 15:22, Nishanth Menon wrote: On 10:54-20130319, Eduardo Valentin wrote: * @adc_start_val: ADC conversion table starting value You may still want to fix warnings generated by: ./scripts/kernel-doc -v drivers/staging/ti-soc-thermal/ti-bandgap.c>/dev/n

[PATCHv2 0/3] thermal: lookup temperature

2013-04-03 Thread Eduardo Valentin
Hello Rui, Here is V2 of temperature lookup helper function. This has been split into two API as suggested on V1. The usage of it is exemplified on patch 03. Eduardo Valentin (3): thermal: introduce thermal_zone_get_zone_by_name helper function thermal: expose thermal_zone_get_temp API

[PATCHv2 1/3] thermal: introduce thermal_zone_get_zone_by_name helper function

2013-04-03 Thread Eduardo Valentin
required parameters are invalid, it will return the corresponding error code (ERR_PTR). Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_sys.c | 34 ++ include/linux/thermal.h |1 + 2 files changed, 35 insertions(+), 0 deletions(-) diff --git

[PATCHv2 2/3] thermal: expose thermal_zone_get_temp API

2013-04-03 Thread Eduardo Valentin
This patch exports the thermal_zone_get_temp API so that driver writers can fetch temperature of thermal zones managed by other drivers. Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_sys.c | 20 +--- include/linux/thermal.h |1 + 2 files changed, 18

[PATCHv2 3/3] staging: ti-soc-thermal: remove external heat while extrapolating hotspot

2013-04-03 Thread Eduardo Valentin
For boards that provide a PCB sensor close to SoC junction temperature, it is possible to remove the cumulative heat reported by the SoC temperature sensor. This patch changes the extrapolation computation to consider an external sensor in the extrapolation equations. Signed-off-by: Eduardo

Re: [PATCHv2 1/3] thermal: introduce thermal_zone_get_zone_by_name helper function

2013-04-04 Thread Eduardo Valentin
On 04-04-2013 13:12, R, Durgadoss wrote: -Original Message- From: Eduardo Valentin [mailto:eduardo.valen...@ti.com] Sent: Thursday, April 04, 2013 3:43 AM To: Zhang, Rui Cc: linux...@vger.kernel.org; linux-kernel@vger.kernel.org; R, Durgadoss; Eduardo Valentin Subject: [PATCHv2 1/3

Re: [PATCH V2 1/3] Thermal: rename thermal_sys.c to thermal_core.c

2013-04-04 Thread Eduardo Valentin
On 29-03-2013 10:26, Zhang Rui wrote: this is the preparation work to build all the thermal core framework source file, like governors, cpu cooling, etc, into one module. No functional change in this patch. Signed-off-by: Zhang Rui Durga and me have already reviewed and acked this patch. Can

[PATCHv3 0/3] thermal: lookup temperature

2013-04-05 Thread Eduardo Valentin
Hello Rui, Here is V3 of temperature lookup helper function. This has been split into two API as suggested on V1 and now the API returns an specific error code for multiple matches, as suggested in V2. The usage of it is exemplified on patch 03. Eduardo Valentin (3): thermal: introduce

[PATCHv3 2/3] thermal: expose thermal_zone_get_temp API

2013-04-05 Thread Eduardo Valentin
This patch exports the thermal_zone_get_temp API so that driver writers can fetch temperature of thermal zones managed by other drivers. Acked-by: Durgadoss R Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_sys.c | 20 +--- include/linux/thermal.h |1

[PATCHv3 3/3] staging: ti-soc-thermal: remove external heat while extrapolating hotspot

2013-04-05 Thread Eduardo Valentin
For boards that provide a PCB sensor close to SoC junction temperature, it is possible to remove the cumulative heat reported by the SoC temperature sensor. This patch changes the extrapolation computation to consider an external sensor in the extrapolation equations. Signed-off-by: Eduardo

[PATCHv3 1/3] thermal: introduce thermal_zone_get_zone_by_name helper function

2013-04-05 Thread Eduardo Valentin
required parameters are invalid, it will return the corresponding error code (ERR_PTR). Cc: Durgadoss R Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_sys.c | 38 ++ include/linux/thermal.h |1 + 2 files changed, 39 insertions(+), 0

[PATCH 00/15] staging: omap-thermal fixes and ports

2013-02-26 Thread Eduardo Valentin
are based on linux-2.6/master. Patches are also available here: g...@gitorious.org:thermal-framework/thermal-framework.git thermal_work/omap/omap-thermal-fixes https://git.gitorious.org/thermal-framework/thermal-framework.git thermal_work/omap/omap-thermal-fixes Cheers, Eduardo Valentin (12

[PATCH 01/15] staging: omap-thermal: Add print when TSHUT temperature reached

2013-02-26 Thread Eduardo Valentin
From: Ruslan Ruslichenko To indicate that board was shut down due to TSHUT temperature reached it is good to print some information message before shutting down. Signed-off-by: Ruslan Ruslichenko Signed-off-by: Eduardo Valentin --- drivers/staging/omap-thermal/omap-bandgap.c |3 +++ 1

[PATCH 02/15] staging: omap-thermal: introduce clock feature flag

2013-02-26 Thread Eduardo Valentin
: Eduardo Valentin --- drivers/staging/omap-thermal/omap-bandgap.c | 18 +- drivers/staging/omap-thermal/omap-bandgap.h |1 + drivers/staging/omap-thermal/omap4-thermal.c |3 +++ drivers/staging/omap-thermal/omap5-thermal.c |3 ++- 4 files changed, 19 insertions(+), 6

[PATCH 03/15] staging: omap-thermal: update OMAP54xx conv_table

2013-02-26 Thread Eduardo Valentin
From: Radhesh Fadnis This patch updates the ADC conversion table for OMAP5430 ES2.0 devices. Signed-off-by: Radhesh Fadnis Signed-off-by: Eduardo Valentin --- drivers/staging/omap-thermal/omap-bandgap.h |5 +- drivers/staging/omap-thermal/omap5-thermal.c | 170

[PATCH 04/15] staging: omap-thermal: standardize register nomenclature to use 'GPU'

2013-02-26 Thread Eduardo Valentin
In order to keep same nomenclature across the register definition, this change will make all 'MM' suffixes to be named 'GPU'. Signed-off-by: Eduardo Valentin --- drivers/staging/omap-thermal/omap-bandgap.h | 16 drivers/staging/omap-thermal/omap5-thermal.

[PATCH 05/15] staging: omap-thermal: remove from register map soc and mode on OMAP5

2013-02-26 Thread Eduardo Valentin
On OMAP54xx ES2.0 there is no single read and only one mode: continuous mode. For this reason, there is no point in defining register fields for these operations. Signed-off-by: Eduardo Valentin --- drivers/staging/omap-thermal/omap5-thermal.c | 11 --- 1 files changed, 0 insertions

[PATCH 06/15] staging: omap-thermal: introduce new features of OMAP54xx

2013-02-26 Thread Eduardo Valentin
. Buffer clear bit Signed-off-by: Eduardo Valentin --- drivers/staging/omap-thermal/omap-bandgap.h | 65 +- drivers/staging/omap-thermal/omap5-thermal.c | 48 +-- 2 files changed, 106 insertions(+), 7 deletions(-) diff --git a/drivers/staging/omap

[PATCH 07/15] staging: omap-thermal: update OMAP54xx clock sources

2013-02-26 Thread Eduardo Valentin
This patch updates the OMAP54xx data structure to use the right clock source name for ES2.0. Signed-off-by: Eduardo Valentin --- drivers/staging/omap-thermal/omap5-thermal.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/omap-thermal/omap5-thermal.c

[PATCH 09/15] staging: omap-thermal: remove dedicated counter register for OMAP5

2013-02-26 Thread Eduardo Valentin
On OMAP54xx there is only one counter register. For this reason, each domain must use the same counter register. This patch changes the data definition to coupe with this. Signed-off-by: Eduardo Valentin --- drivers/staging/omap-thermal/omap-bandgap.h |5 - drivers/staging/omap-thermal

[PATCH 10/15] staging: omap-thermal: introduze FREEZE_BIT feature

2013-02-26 Thread Eduardo Valentin
it is possible to freeze the history buffer or not. b. whenever reading the temperature, it will fetch from DTEMP1 instead of DTEMP or DTEMP0. This WA is applicable only for OMAP5430 ES2.0. Signed-off-by: Eduardo Valentin --- drivers/staging/omap-thermal/omap-bandgap.c | 60

[PATCH 08/15] staging: omap-thermal: update feature bitfield for OMAP54xx

2013-02-26 Thread Eduardo Valentin
This patch removes from OMAP54xx the features: . CLK_CTRL . COUNTER . MODE_CONFIG Because these features are not present in OMAP54xx ES2.0 Signed-off-by: Eduardo Valentin --- drivers/staging/omap-thermal/omap5-thermal.c |5 + 1 files changed, 1 insertions(+), 4 deletions(-) diff --git

[PATCH 11/15] staging: omap-thermal: update DT entry documentation

2013-02-26 Thread Eduardo Valentin
Simple update on documentation file for DT. This patch also adds an example for OMAP4430 and 0MAP4470, and also updated OMAP4460's example. Signed-off-by: Eduardo Valentin --- drivers/staging/omap-thermal/omap_bandgap.txt | 27 ++-- 1 files changed, 24 insertions(

[PATCH 12/15] staging: omap-thermal: add DT example for OMAP54xx devices

2013-02-26 Thread Eduardo Valentin
Update documentation with DT example for OMAP54xx devices. Signed-off-by: Eduardo Valentin --- drivers/staging/omap-thermal/omap_bandgap.txt |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/drivers/staging/omap-thermal/omap_bandgap.txt b/drivers/staging/omap

[PATCH 13/15] staging: omap-thermal: Remove double conv_table reference

2013-02-26 Thread Eduardo Valentin
This patch removes from data structure the double reference of the conversion table. It keeps the reference coming from bandgap data definition. The patch also adapts the code accordingly. Signed-off-by: Eduardo Valentin --- drivers/staging/omap-thermal/omap-bandgap.c |8 drivers

[PATCH 14/15] staging: omap-thermal: name data files accordingly

2013-02-26 Thread Eduardo Valentin
This patch simply changes the name of files containing data structure definition. Signed-off-by: Eduardo Valentin --- drivers/staging/omap-thermal/Makefile |4 +- drivers/staging/omap-thermal/omap4-thermal-data.c | 262 +++ drivers/staging/omap-thermal/omap4

[PATCH 15/15] staging: omap-thermal: update clock prepare count

2013-02-26 Thread Eduardo Valentin
This patch changes the clock management code to also update the clock prepare counter, this way we won't skip the enable/disable operation due to prepare dependencies. Signed-off-by: Eduardo Valentin --- drivers/staging/omap-thermal/omap-bandgap.c | 10 +- 1 files chang

Re: [PATCH 15/15] staging: omap-thermal: update clock prepare count

2013-02-27 Thread Eduardo Valentin
Mike, On 27-02-2013 01:35, Mike Turquette wrote: Quoting Eduardo Valentin (2013-02-26 14:53:38) This patch changes the clock management code to also update the clock prepare counter, this way we won't skip the enable/disable operation due to prepare dependencies. Signed-off-by: Ed

[PATCH 1/1] documentation: clk: fix couple of misspelling

2013-02-28 Thread Eduardo Valentin
Correcting misspelling inside the clk.txt. Signed-off-by: Eduardo Valentin --- Documentation/clk.txt |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/clk.txt b/Documentation/clk.txt index 1943fae..4274a54 100644 --- a/Documentation/clk.txt +++ b

Re: [PATCH 1/8] Thermal: Create sensor level APIs

2013-02-28 Thread Eduardo Valentin
Durga, On 05-02-2013 06:46, Durgadoss R wrote: This patch creates sensor level APIs, in the generic thermal framework. A Thermal sensor is a piece of hardware that can report temperature of the spot in which it is placed. A thermal sensor driver reads the temperature from this sensor and report

Re: [PATCH 2/8] Thermal: Create zone level APIs

2013-02-28 Thread Eduardo Valentin
On 05-02-2013 06:46, Durgadoss R wrote: This patch adds a new thermal_zone structure to thermal.h. Also, adds zone level APIs to the thermal framework. A thermal zone is a hot spot on the platform, which can have one or more sensors and cooling devices attached to it. These sensors can be mapped

Re: [PATCH 3/8] Thermal: Add APIs to bind cdev to new zone structure

2013-02-28 Thread Eduardo Valentin
Durga, On 05-02-2013 06:46, Durgadoss R wrote: This patch creates new APIs to add/remove a cdev to/from a zone. This patch does not change the old cooling device implementation. Same comments on patch 02/08 I want to rise here: - Consider using linked list - You may have contention on your in

Re: [PATCH 4/8] Thermal: Add trip point sysfs nodes for sensor

2013-02-28 Thread Eduardo Valentin
Durga, Same comments on patch 02/08 I want to rise here: - Minors on strlcpy, snprintf, devm_ helpers - documentation in the code for these helper functions and also better naming.. On 05-02-2013 06:46, Durgadoss R wrote: This patch adds a trip point related sysfs nodes for each sensor unde

Re: [PATCH 5/8] Thermal: Create Thermal map sysfs attributes for a zone

2013-02-28 Thread Eduardo Valentin
Durga, On 05-02-2013 06:46, Durgadoss R wrote: This patch creates a thermal map sysfs node under /sys/class/thermal/zoneX/. This contains entries named mapY_trip_type, mapY_sensor_name, mapY_cdev_name, mapY_trip_mask, mapY_weights. Some of the previous comments apply here as well, specially

Re: [PATCHv3 0/8] Thermal Framework Enhancements

2013-02-28 Thread Eduardo Valentin
Durga, On 05-02-2013 06:46, Durgadoss R wrote: This patch set is a v3 of the previous versions submitted here: [v2]: http://lwn.net/Articles/531720/ [v1]: https://lkml.org/lkml/2012/12/18/108 [RFC]:https://patchwork.kernel.org/patch/1758921/ On this version I have some implementation detail

[PATCH 00/50] staging: omap-thermal: several code refactoring

2013-03-15 Thread Eduardo Valentin
/omap-thermal-optimizations For lo guys, I will appreciate your testing results on other devices. Cheers, Eduardo Valentin (50): staging: omap-thermal: use BIT() macro staging: omap-thermal: remove unused _SHIFT macros staging: omap-thermal: create header for register, bitfields and

[PATCH 01/50] staging: omap-thermal: use BIT() macro

2013-03-15 Thread Eduardo Valentin
For code readability, this patch changes the bit definition under omap-bandgap.h to use the BIT() macro. Signed-off-by: Eduardo Valentin --- drivers/staging/omap-thermal/omap-bandgap.h | 96 +- 1 files changed, 48 insertions(+), 48 deletions(-) diff --git a/drivers

[PATCH 02/50] staging: omap-thermal: remove unused _SHIFT macros

2013-03-15 Thread Eduardo Valentin
As these macros are not used on any part of the code, this patch removes all the *_SHIT defines. Signed-off-by: Eduardo Valentin --- drivers/staging/omap-thermal/omap-bandgap.h | 57 --- 1 files changed, 0 insertions(+), 57 deletions(-) diff --git a/drivers/staging

[PATCH 03/50] staging: omap-thermal: create header for register, bitfields and definitions

2013-03-15 Thread Eduardo Valentin
. omap5xxx-bandgap.h will contain only defines and bitfields related to OMAP5 based devices Signed-off-by: Eduardo Valentin --- drivers/staging/omap-thermal/omap-bandgap.h | 195 drivers/staging/omap-thermal/omap4-thermal-data.c |1 + drivers/staging/omap-thermal

[PATCH 04/50] staging: omap-thermal: update documentation of omap-bandgap.h

2013-03-15 Thread Eduardo Valentin
This patch updates the existing data structures for omap bandgap, inside omap-bandgap.h. TODO: remove unused fields. Signed-off-by: Eduardo Valentin --- drivers/staging/omap-thermal/omap-bandgap.h | 230 ++- 1 files changed, 189 insertions(+), 41 deletions(-) diff

[PATCH 05/50] staging: omap-thermal: style cleanup on omap-bandgap.c

2013-03-15 Thread Eduardo Valentin
simple changes on alignments and white spaces Signed-off-by: Eduardo Valentin --- drivers/staging/omap-thermal/omap-bandgap.c | 32 -- 1 files changed, 15 insertions(+), 17 deletions(-) diff --git a/drivers/staging/omap-thermal/omap-bandgap.c b/drivers/staging/omap

[PATCH 06/50] staging: omap-thermal: fix error checking

2013-03-15 Thread Eduardo Valentin
The omap_bandgap_get_sensor_data() function returns ERR_PTR(), but it can also return NULL, in case of initilization, so we need to use IS_ERR_OR_NULL() rather than only IS_ERR(). Signed-off-by: Eduardo Valentin --- drivers/staging/omap-thermal/omap-thermal-common.c |4 ++-- 1 files changed

[PATCH 07/50] staging: omap-thermal: introduce RMW_BITS macro

2013-03-15 Thread Eduardo Valentin
This patch introduce a macro to read, update, write bitfields. It will be specific to bandgap data structures. Signed-off-by: Eduardo Valentin --- drivers/staging/omap-thermal/omap-bandgap.c | 178 +++ 1 files changed, 46 insertions(+), 132 deletions(-) diff --git a

[PATCH 08/50] staging: omap-thermal: add documentation for register access functions

2013-03-15 Thread Eduardo Valentin
Document the helper functions that manipulates registers and their bitfields. All of them work based of the io mapped area. Signed-off-by: Eduardo Valentin --- drivers/staging/omap-thermal/omap-bandgap.c | 23 ++- 1 files changed, 22 insertions(+), 1 deletions(-) diff

[PATCH 09/50] staging: omap-thermal: make a omap_bandgap_power with only one exit point

2013-03-15 Thread Eduardo Valentin
Change the way the omap_bandgap_power is written so that it has only one exit entry (Documentation/CodingStyle). Signed-off-by: Eduardo Valentin --- drivers/staging/omap-thermal/omap-bandgap.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/staging/omap

[PATCH 11/50] staging: omap-thermal: add documentation for omap_bandgap_read_temp

2013-03-15 Thread Eduardo Valentin
Document function which reads temperature register, depending on bandgap device version. Signed-off-by: Eduardo Valentin --- drivers/staging/omap-thermal/omap-bandgap.c | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/drivers/staging/omap-thermal/omap-bandgap.c

[PATCH 12/50] staging: omap-thermal: rename talert handler

2013-03-15 Thread Eduardo Valentin
Simple rename to cope with file naming pattern. Signed-off-by: Eduardo Valentin --- drivers/staging/omap-thermal/omap-bandgap.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/omap-thermal/omap-bandgap.c b/drivers/staging/omap-thermal/omap-bandgap.c

[PATCH 10/50] staging: omap-thermal: add documentation for omap_bandgap_power

2013-03-15 Thread Eduardo Valentin
Document the helper function to turn a bandgap device on and off. Signed-off-by: Eduardo Valentin --- drivers/staging/omap-thermal/omap-bandgap.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/drivers/staging/omap-thermal/omap-bandgap.c b/drivers/staging/omap

[PATCH 13/50] staging: omap-thermal: update documentation for talert irq handler

2013-03-15 Thread Eduardo Valentin
Document the Talert IRQ handler. Signed-off-by: Eduardo Valentin --- drivers/staging/omap-thermal/omap-bandgap.c | 12 +++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/drivers/staging/omap-thermal/omap-bandgap.c b/drivers/staging/omap-thermal/omap-bandgap.c index

[PATCH 14/50] staging: omap-thermal: update tshut IRQ handler documentation

2013-03-15 Thread Eduardo Valentin
Documents tshut handler better. Signed-off-by: Eduardo Valentin --- drivers/staging/omap-thermal/omap-bandgap.c | 10 +- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/drivers/staging/omap-thermal/omap-bandgap.c b/drivers/staging/omap-thermal/omap-bandgap.c index

[PATCH 15/50] staging: omap-thermal: remove duplicated code

2013-03-15 Thread Eduardo Valentin
There is no need to assign twice the same variable with the very same value. Signed-off-by: Eduardo Valentin --- drivers/staging/omap-thermal/omap-bandgap.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/drivers/staging/omap-thermal/omap-bandgap.c b/drivers/staging

[PATCH 16/50] staging: omap-thermal: read status only once inside alert IRQ

2013-03-15 Thread Eduardo Valentin
There is no need to re-read status register. Signed-off-by: Eduardo Valentin --- drivers/staging/omap-thermal/omap-bandgap.c | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/omap-thermal/omap-bandgap.c b/drivers/staging/omap-thermal/omap

[PATCH 17/50] staging: omap-thermal: add a section of register manipulation

2013-03-15 Thread Eduardo Valentin
This is introduces a series of marks inside the code to better organize functions per group, aggregating their functionality. Signed-off-by: Eduardo Valentin --- drivers/staging/omap-thermal/omap-bandgap.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/staging

[PATCH 18/50] staging: omap-thermal: section of basic helpers

2013-03-15 Thread Eduardo Valentin
Group of simple functions aggregating basic functionality. Signed-off-by: Eduardo Valentin --- drivers/staging/omap-thermal/omap-bandgap.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/staging/omap-thermal/omap-bandgap.c b/drivers/staging/omap-thermal/omap

[PATCH 19/50] staging: omap-thermal: IRQ handler section

2013-03-15 Thread Eduardo Valentin
Section of IRQ handlers Signed-off-by: Eduardo Valentin --- drivers/staging/omap-thermal/omap-bandgap.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/staging/omap-thermal/omap-bandgap.c b/drivers/staging/omap-thermal/omap-bandgap.c index 7927c59..ded2c8c

[PATCH 20/50] staging: omap-thermal: ADC section

2013-03-15 Thread Eduardo Valentin
Section of ADC helpers functions Signed-off-by: Eduardo Valentin --- drivers/staging/omap-thermal/omap-bandgap.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/staging/omap-thermal/omap-bandgap.c b/drivers/staging/omap-thermal/omap-bandgap.c index ded2c8c

[PATCH 21/50] staging: omap-thermal: name adc_to_temp_conversion in a better way

2013-03-15 Thread Eduardo Valentin
Rename adc_to_temp_conversion to omap_bandgap_adc_to_mcelsius. This name, though longer, describes better the function. Signed-off-by: Eduardo Valentin --- drivers/staging/omap-thermal/omap-bandgap.c | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers

[PATCH 22/50] staging: omap-thermal: rewrite omap_bandgap_adc_to_mcelsius on kernel coding style

2013-03-15 Thread Eduardo Valentin
Follow Documentation/CodingStyle while doing omap_bandgap_adc_to_mcelsius. Signed-off-by: Eduardo Valentin --- drivers/staging/omap-thermal/omap-bandgap.c | 11 --- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/staging/omap-thermal/omap-bandgap.c b/drivers

[PATCH 23/50] staging: omap-thermal: add documentation for omap_bandgap_adc_to_mcelsius

2013-03-15 Thread Eduardo Valentin
Document the conversion function. Signed-off-by: Eduardo Valentin --- drivers/staging/omap-thermal/omap-bandgap.c | 11 +++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/drivers/staging/omap-thermal/omap-bandgap.c b/drivers/staging/omap-thermal/omap-bandgap.c index

[PATCH 24/50] staging: omap-thermal: name temp_to_adc_conversion in a better way

2013-03-15 Thread Eduardo Valentin
Rename temp_to_adc_conversion to omap_bandgap_mcelsius_to_adc. This name, though longer, describes better the function. This patch also changes this function signature so the function follows the style of this file. Signed-off-by: Eduardo Valentin --- drivers/staging/omap-thermal/omap

[PATCH 25/50] staging: omap-thermal: rewrite omap_bandgap_mcelsius_to_adc on kernel coding style

2013-03-15 Thread Eduardo Valentin
Follow Documentation/CodingStyle while doing omap_bandgap_mcelsius_to_adc Signed-off-by: Eduardo Valentin --- drivers/staging/omap-thermal/omap-bandgap.c | 11 +++ 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/staging/omap-thermal/omap-bandgap.c b/drivers

[PATCH 26/50] staging: omap-thermal: move conv table limits out of sensor data

2013-03-15 Thread Eduardo Valentin
As we have one conv table per bandgap device and not per sensor, this patch changes the data structures so that the conv table min and max values are now part of bandgap_data and not sensor_data. Signed-off-by: Eduardo Valentin --- drivers/staging/omap-thermal/omap-bandgap.c | 39

[PATCH 27/50] staging: omap-thermal: add documentation for omap_bandgap_mcelsius_to_adc

2013-03-15 Thread Eduardo Valentin
Document the conversion function. Signed-off-by: Eduardo Valentin --- drivers/staging/omap-thermal/omap-bandgap.c | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/drivers/staging/omap-thermal/omap-bandgap.c b/drivers/staging/omap-thermal/omap-bandgap.c index

[PATCH 28/50] staging: omap-thermal: rename add_hyst to omap_bandgap_add_hyst

2013-03-15 Thread Eduardo Valentin
This patch improves the add_hyst function by: . Renaming it to omap_bandgap_add_hyst . Moving it to the ADC conversion functions section . Changing its signature to follow the driver standard Signed-off-by: Eduardo Valentin --- drivers/staging/omap-thermal/omap-bandgap.c | 42

[PATCH 29/50] staging: omap-thermal: document omap_bandgap_add_hyst function

2013-03-15 Thread Eduardo Valentin
Document function to handle hysteresis. Signed-off-by: Eduardo Valentin --- drivers/staging/omap-thermal/omap-bandgap.c | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/drivers/staging/omap-thermal/omap-bandgap.c b/drivers/staging/omap-thermal/omap-bandgap.c

[PATCH 30/50] staging: omap-thermal: threshold manipulation section

2013-03-15 Thread Eduardo Valentin
Section of functions manipulating thresholds for Alert and Shutdown. Signed-off-by: Eduardo Valentin --- drivers/staging/omap-thermal/omap-bandgap.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/staging/omap-thermal/omap-bandgap.c b/drivers/staging/omap

[PATCH 31/50] staging: omap-thermal: refactor temp_sensor_unmask_interrupts

2013-03-15 Thread Eduardo Valentin
This change improves temp_sensor_unmask_interrupts by: . renaming it to omap_bandgap_unmask_interrupts . making it a void function, as there is nothing really to report an error. Signed-off-by: Eduardo Valentin --- drivers/staging/omap-thermal/omap-bandgap.c | 14 -- 1 files

[PATCH 32/50] staging: omap-thermal: update omap_bandgap_unmask_interrupts documentation

2013-03-15 Thread Eduardo Valentin
Proper document the function to configure the IRQ event masks. Signed-off-by: Eduardo Valentin --- drivers/staging/omap-thermal/omap-bandgap.c | 10 +- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/drivers/staging/omap-thermal/omap-bandgap.c b/drivers/staging/omap

[PATCH 34/50] staging: omap-thermal: device initialization section

2013-03-15 Thread Eduardo Valentin
Section of helper functions to initilize the bandgap device Signed-off-by: Eduardo Valentin --- drivers/staging/omap-thermal/omap-bandgap.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/staging/omap-thermal/omap-bandgap.c b/drivers/staging/omap-thermal/omap

[PATCH 33/50] staging: omap-thermal: refactor APIs handling threshold values

2013-03-15 Thread Eduardo Valentin
ed to update any threshold. This patch also removes macros that are used only inside the _validate helper function. In this patch there is also an addition of an extra function section for Exposed APIs, used outside the omap-bandgap.c, but inside the omap-thermal driver. Signed-off-by: Eduardo Val

[PATCH 35/50] staging: omap-thermal: section of device driver callbacks

2013-03-15 Thread Eduardo Valentin
Section with platform device callbacks Signed-off-by: Eduardo Valentin --- drivers/staging/omap-thermal/omap-bandgap.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/staging/omap-thermal/omap-bandgap.c b/drivers/staging/omap-thermal/omap-bandgap.c index

[PATCH 36/50] staging: omap-thermal: rename enable_continuous_mode

2013-03-15 Thread Eduardo Valentin
This patch names 'enable_continuous_mode' accordingly to the file standard naming. Signed-off-by: Eduardo Valentin --- drivers/staging/omap-thermal/omap-bandgap.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/omap-thermal/omap-bandgap.c

[PATCH 37/50] staging: omap-thermal: update omap_bandgap_set_continous_mode documentation

2013-03-15 Thread Eduardo Valentin
Simple update on function documentation. Signed-off-by: Eduardo Valentin --- drivers/staging/omap-thermal/omap-bandgap.c |9 ++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/staging/omap-thermal/omap-bandgap.c b/drivers/staging/omap-thermal/omap-bandgap.c

[PATCH 38/50] staging: omap-thermal: document omap_bandgap_force_single_read

2013-03-15 Thread Eduardo Valentin
Document function to initialize the conversion state machine. Signed-off-by: Eduardo Valentin --- drivers/staging/omap-thermal/omap-bandgap.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/drivers/staging/omap-thermal/omap-bandgap.c b/drivers/staging/omap

[PATCH 39/50] staging: omap-thermal: document omap_bandgap_update_alert_threshold function

2013-03-15 Thread Eduardo Valentin
Document function to program alert thresholds Signed-off-by: Eduardo Valentin --- drivers/staging/omap-thermal/omap-bandgap.c | 14 ++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/drivers/staging/omap-thermal/omap-bandgap.c b/drivers/staging/omap-thermal/omap

[PATCH 40/50] staging: omap-thermal: document _omap_bandgap_write_threshold function

2013-03-15 Thread Eduardo Valentin
Document function to update alert thresholds. Signed-off-by: Eduardo Valentin --- drivers/staging/omap-thermal/omap-bandgap.c | 13 + 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/drivers/staging/omap-thermal/omap-bandgap.c b/drivers/staging/omap-thermal/omap

  1   2   3   4   5   6   7   8   9   10   >