[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

[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

[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 eduardo.valen...@ti.com --- drivers/staging/omap-thermal/omap-bandgap.h | 96 +- 1 files changed, 48 insertions(+), 48 deletions

[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 eduardo.valen...@ti.com --- drivers/staging/omap-thermal/omap-bandgap.h | 57 --- 1 files changed, 0 insertions(+), 57 deletions(-) diff

[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 eduardo.valen...@ti.com --- drivers/staging/omap-thermal/omap-bandgap.h | 195 drivers/staging/omap-thermal/omap4-thermal-data.c |1

[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 eduardo.valen...@ti.com --- drivers/staging/omap-thermal/omap-bandgap.h | 230 ++- 1 files changed, 189 insertions(+), 41

[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 eduardo.valen...@ti.com --- 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

[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 eduardo.valen...@ti.com --- drivers/staging/omap-thermal/omap-thermal-common.c

[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 eduardo.valen...@ti.com --- drivers/staging/omap-thermal/omap-bandgap.c | 178 +++ 1 files changed, 46 insertions(+), 132

[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 eduardo.valen...@ti.com --- drivers/staging/omap-thermal/omap-bandgap.c | 23 ++- 1 files changed, 22 insertions(+), 1

[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 eduardo.valen...@ti.com --- drivers/staging/omap-thermal/omap-bandgap.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git

[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 eduardo.valen...@ti.com --- drivers/staging/omap-thermal/omap-bandgap.c | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/drivers/staging/omap

[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 eduardo.valen...@ti.com --- 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

[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 eduardo.valen...@ti.com --- 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

[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 eduardo.valen...@ti.com --- 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

[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 eduardo.valen...@ti.com --- 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

[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 eduardo.valen...@ti.com --- drivers/staging/omap-thermal/omap-bandgap.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/drivers/staging/omap-thermal/omap

[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 eduardo.valen...@ti.com --- 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

[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 eduardo.valen...@ti.com --- drivers/staging/omap-thermal/omap-bandgap.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff

[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 eduardo.valen...@ti.com --- 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

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

2013-03-15 Thread Eduardo Valentin
Section of IRQ handlers Signed-off-by: Eduardo Valentin eduardo.valen...@ti.com --- 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

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

2013-03-15 Thread Eduardo Valentin
Section of ADC helpers functions Signed-off-by: Eduardo Valentin eduardo.valen...@ti.com --- 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 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 eduardo.valen...@ti.com --- drivers/staging/omap-thermal/omap-bandgap.c | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions

[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 eduardo.valen...@ti.com --- drivers/staging/omap-thermal/omap-bandgap.c | 11 --- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/staging/omap-thermal/omap

[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 eduardo.valen...@ti.com --- 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

[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 eduardo.valen...@ti.com --- drivers/staging

[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 eduardo.valen...@ti.com --- drivers/staging/omap-thermal/omap-bandgap.c | 11 +++ 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/staging/omap-thermal/omap

[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 eduardo.valen...@ti.com --- drivers/staging/omap-thermal/omap

[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 eduardo.valen...@ti.com --- 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

[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 eduardo.valen...@ti.com --- drivers/staging/omap-thermal/omap-bandgap.c

[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 eduardo.valen...@ti.com --- 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

[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 eduardo.valen...@ti.com --- 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

[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 eduardo.valen...@ti.com --- drivers/staging/omap-thermal/omap-bandgap.c | 14

[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 eduardo.valen...@ti.com --- 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

[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 eduardo.valen...@ti.com --- 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

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

2013-03-15 Thread Eduardo Valentin
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 Valentin

[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 eduardo.valen...@ti.com --- 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

[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 eduardo.valen...@ti.com --- drivers/staging/omap-thermal/omap-bandgap.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/omap-thermal/omap

[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 eduardo.valen...@ti.com --- 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

[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 eduardo.valen...@ti.com --- 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

[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 eduardo.valen...@ti.com --- 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

[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 eduardo.valen...@ti.com --- 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

[PATCH 41/50] staging: omap-thermal: document _omap_bandgap_read_threshold function

2013-03-15 Thread Eduardo Valentin
Add documentation of the function for reading alert thresholds Signed-off-by: Eduardo Valentin eduardo.valen...@ti.com --- drivers/staging/omap-thermal/omap-bandgap.c | 12 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/drivers/staging/omap-thermal/omap-bandgap.c

[PATCH 42/50] staging: omap-thermal: document omap_bandgap_tshut_init function

2013-03-15 Thread Eduardo Valentin
Add documentation for the function to setup TSHUT handling Signed-off-by: Eduardo Valentin eduardo.valen...@ti.com --- drivers/staging/omap-thermal/omap-bandgap.c | 12 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/drivers/staging/omap-thermal/omap-bandgap.c b

[PATCH 43/50] staging: omap-thermal: document omap_bandgap_alert_init function

2013-03-15 Thread Eduardo Valentin
Document function that sets talert handling up. Signed-off-by: Eduardo Valentin eduardo.valen...@ti.com --- 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

[PATCH 44/50] staging: omap-thermal: document omap_bandgap_build function

2013-03-15 Thread Eduardo Valentin
Document function to build omap_bandgap structure Signed-off-by: Eduardo Valentin eduardo.valen...@ti.com --- drivers/staging/omap-thermal/omap-bandgap.c |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/drivers/staging/omap-thermal/omap-bandgap.c b/drivers

[PATCH 45/50] staging: omap-thermal: change Kconfig dependency method

2013-03-15 Thread Eduardo Valentin
that it is required to device the data structures that maps the registers and their bitfields. The DT compatible list must also be updated. CC: Santosh Shilimkar santosh.shilim...@ti.com CC: Vaibhav Bedia vaibhav.be...@ti.com Signed-off-by: Eduardo Valentin eduardo.valen...@ti.com --- drivers/staging/omap

[PATCH 46/50] staging: Add a MAINTAINERS entry for TI bandgap and thermal driver

2013-03-15 Thread Eduardo Valentin
Add myself as maintainer of the TI bandgap and thermal driver. CC: Santosh Shilimkar santosh.shilim...@ti.com CC: Zhang Rui rui.zh...@intel.com Signed-off-by: Eduardo Valentin eduardo.valen...@ti.com --- MAINTAINERS |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git

[PATCH 47/50] staging: omap-thermal: switch mutex to spinlock inside omap-bandgap

2013-03-15 Thread Eduardo Valentin
there are registers shared among the sensors, this lock is global, not per sensor. Signed-off-by: Eduardo Valentin eduardo.valen...@ti.com --- drivers/staging/omap-thermal/TODO |1 - drivers/staging/omap-thermal/omap-bandgap.c | 18 ++ drivers/staging/omap-thermal

[PATCH 48/50] staging: omap-thermal: remove TODO entry suggesting regmap usage

2013-03-15 Thread Eduardo Valentin
It is hard to use regmap because benefit of using regmap cache may not be applicable as there is a specific sequence to restore the bandgap context. Signed-off-by: Eduardo Valentin eduardo.valen...@ti.com --- drivers/staging/omap-thermal/TODO |1 - 1 files changed, 0 insertions(+), 1

[PATCH 49/50] staging: omap-thermal: remove TODO entry for exposed APIs

2013-03-15 Thread Eduardo Valentin
Not all APIs exposed today are used. However all unused APIs will be required once the thermal layer allows IRQ based policies. Signed-off-by: Eduardo Valentin eduardo.valen...@ti.com --- drivers/staging/omap-thermal/TODO |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git

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

2013-03-15 Thread Eduardo Valentin
Document the helper to validate a struct omap_bandgap and a sensor id. Signed-off-by: Eduardo Valentin eduardo.valen...@ti.com --- drivers/staging/omap-thermal/omap-bandgap.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/drivers/staging/omap-thermal/omap

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

2013-03-16 Thread Eduardo Valentin
Hello Dan, On 15-03-2013 17:09, Dan Carpenter wrote: On Fri, Mar 15, 2013 at 08:59:55AM -0400, Eduardo Valentin wrote: This patch introduce a macro to read, update, write bitfields. It will be specific to bandgap data structures. Signed-off-by: Eduardo Valentin eduardo.valen...@ti.com

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

2013-03-16 Thread Eduardo Valentin
Hey Dan, On 15-03-2013 17:22, Dan Carpenter wrote: On Fri, Mar 15, 2013 at 08:59:57AM -0400, Eduardo Valentin wrote: Change the way the omap_bandgap_power is written so that it has only one exit entry (Documentation/CodingStyle). It's only if there is an unlock or something that you should

Re: [PATCH 47/50] staging: omap-thermal: switch mutex to spinlock inside omap-bandgap

2013-03-16 Thread Eduardo Valentin
On 16-03-2013 04:59, Dan Carpenter wrote: On Fri, Mar 15, 2013 at 09:00:35AM -0400, Eduardo Valentin wrote: Because there is a need to lock inside IRQ handler, this patch changes the locking mechanism inside the omap-bandgap.[c,h] to spinlocks. Now this lock is used to protect omap_bandgap

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

2013-03-16 Thread Eduardo Valentin
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 don't really like the bunny hop patches and I'm trying to discourage that going forward. ;P But I wouldn't say it's a Redo

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

2013-03-16 Thread Eduardo Valentin
On 16-03-2013 04:39, Dan Carpenter wrote: On Fri, Mar 15, 2013 at 09:00:21AM -0400, Eduardo Valentin wrote: if (ret) { dev_err(bg_ptr-dev, failed to read thot\n); - return -EIO; + ret = -EIO; + goto exit; } - *thot

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 don't

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

2013-03-18 Thread Eduardo Valentin
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): staging: omap

[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 dan.carpen...@oracle.com Signed-off-by: Eduardo Valentin eduardo.valen...@ti.com diff --git a/drivers/staging/omap-thermal/omap-bandgap.c b/drivers/staging/omap-thermal/omap-bandgap.c index 33bfe3b..cb7aa35 100644

[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 dan.carpen...@oracle.com Signed-off-by: Eduardo

[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 b-cous...@ti.com Signed-off-by: Eduardo Valentin eduardo.valen...@ti.com 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

[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 eduardo.valen...@ti.com diff --git a/drivers/staging/ti-soc-thermal/ti-bandgap.c b/drivers/staging/ti-soc-thermal/ti-bandgap.c index 6a0b1ac..c850e13

[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 eduardo.valen...@ti.com 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

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

2013-03-18 Thread Eduardo Valentin
. Signed-off-by: Eduardo Valentin eduardo.valen...@ti.com 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

[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 n...@ti.com Signed-off-by: Eduardo Valentin eduardo.valen...@ti.com diff --git a/drivers/staging/ti-soc-thermal/ti-bandgap.c

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 dan.carpen...@orcle.com 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

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

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 convention

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

2013-03-19 Thread Eduardo Valentin
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 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 dan.carpen...@oracle.com Signed-off-by: Eduardo Valentin eduardo.valen...@ti.com --- drivers/staging/omap-thermal/omap-bandgap.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git

[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 b-cous...@ti.com Cc: Dan Carpenter dan.carpen...@oracle.com Signed-off-by: Eduardo Valentin eduardo.valen...@ti.com --- drivers/staging/omap-thermal/omap-bandgap.c| 562 ++-- drivers/staging/omap-thermal/omap-bandgap.h

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

2013-03-19 Thread Eduardo Valentin
...@ti.com Cc: Nishanth Menon n...@ti.com Cc: Dan Carpenter dan.carpen...@oracle.com Signed-off-by: Eduardo Valentin eduardo.valen...@ti.com --- drivers/staging/Kconfig|2 +- drivers/staging/Makefile |2 +- drivers/staging/omap-thermal

[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 santosh.shilim...@ti.com Cc: Benoit b-cous...@ti.com Cc: Nishanth Menon n...@ti.com Cc: Dan Carpenter dan.carpen...@oracle.com Signed-off-by: Eduardo Valentin eduardo.valen...@ti.com --- drivers

[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 eduardo.valen...@ti.com --- drivers/staging/ti-soc-thermal/ti-bandgap.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git

[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 eduardo.valen...@ti.com --- drivers/staging/ti-soc-thermal/ti-bandgap.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/staging/ti-soc

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

2013-03-19 Thread Eduardo Valentin
. Signed-off-by: Eduardo Valentin eduardo.valen...@ti.com --- 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

[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 n...@ti.com Signed-off-by: Eduardo Valentin eduardo.valen...@ti.com --- drivers/staging/ti-soc-thermal/ti-bandgap.c | 56

[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 eduardo.valen

[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 eduardo.valen...@ti.com --- drivers/staging/ti-soc-thermal/ti-bandgap.c |8 1

[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 eduardo.valen...@ti.com --- drivers/staging/ti-soc-thermal/ti-bandgap.c |2 +- 1 files changed, 1 insertions(+), 1

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: cut * @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/null

[PATCH 00/11] thermal: clean ups on thermal code base

2013-03-22 Thread Eduardo Valentin
/thermal_fw/coding_style Eduardo Valentin (11): thermal: use strlcpy instead of strcpy thermal: update driver license thermal: rename notify_thermal_framework to thermal_notify_framework thermal: rename get_thermal_instance to thermal_instance_get thermal: rename get_tz_trend

[PATCH 01/11] thermal: use strlcpy instead of strcpy

2013-03-22 Thread Eduardo Valentin
For memory boundaries safety, use strlcpy instead of strcpy. Signed-off-by: Eduardo Valentin eduardo.valen...@ti.com --- drivers/thermal/thermal_sys.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c index

[PATCH 02/11] thermal: update driver license

2013-03-22 Thread Eduardo Valentin
As per the comment at the top of this file, this is a GPLv2 driver. This patch updates the driver license accordingly. Signed-off-by: Eduardo Valentin eduardo.valen...@ti.com --- drivers/thermal/thermal_sys.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers

[PATCH 03/11] thermal: rename notify_thermal_framework to thermal_notify_framework

2013-03-22 Thread Eduardo Valentin
To follow the prefix names used by the thermal exported functions, this patch renames notify_thermal_framework to thermal_notify_framework. Signed-off-by: Eduardo Valentin eduardo.valen...@ti.com --- Documentation/thermal/sysfs-api.txt |2 +- drivers/thermal/thermal_sys.c |6

[PATCH 04/11] thermal: rename get_thermal_instance to thermal_instance_get

2013-03-22 Thread Eduardo Valentin
To follow the prefix names used by the thermal exported functions, this patch renames get_thermal_instance to thermal_instance_get. Signed-off-by: Eduardo Valentin eduardo.valen...@ti.com --- Documentation/thermal/sysfs-api.txt |2 +- drivers/thermal/fair_share.c|2 +- drivers

[PATCH 05/11] thermal: rename get_tz_trend to thermal_zone_trend_get

2013-03-22 Thread Eduardo Valentin
To follow the prefix names used by the thermal exported functions, this patch renames get_tz_trend to thermal_zone_trend_get. Signed-off-by: Eduardo Valentin eduardo.valen...@ti.com --- Documentation/thermal/sysfs-api.txt |2 +- drivers/thermal/step_wise.c |2 +- drivers/thermal

[PATCH 06/11] thermal: use EXPORT_SYMBOL_GPL

2013-03-22 Thread Eduardo Valentin
Restrict usage of GPL modules. Signed-off-by: Eduardo Valentin eduardo.valen...@ti.com --- drivers/thermal/thermal_sys.c | 24 1 files changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c index 242c82a

[PATCH 07/11] thermal: update kernel-doc for thermal_zone_bind_cooling_device

2013-03-22 Thread Eduardo Valentin
This patch updates the documentation for thermal_zone_bind_cooling_device and removes the warnings generated by scripts/kernel-doc -v. Signed-off-by: Eduardo Valentin eduardo.valen...@ti.com --- drivers/thermal/thermal_sys.c | 16 +--- 1 files changed, 13 insertions(+), 3 deletions

[PATCH 08/11] thermal: update kernel-doc for thermal_zone_unbind_cooling_device

2013-03-22 Thread Eduardo Valentin
This patch updates the documentation for thermal_zone_unbind_cooling_device and removes the warnings generated by scripts/kernel-doc -v. Signed-off-by: Eduardo Valentin eduardo.valen...@ti.com --- drivers/thermal/thermal_sys.c | 11 --- 1 files changed, 8 insertions(+), 3 deletions

[PATCH 09/11] thermal: update kernel-doc for thermal_cooling_device_register

2013-03-22 Thread Eduardo Valentin
This patch updates the documentation for thermal_cooling_device_register and removes the warnings generated by scripts/kernel-doc -v. Signed-off-by: Eduardo Valentin eduardo.valen...@ti.com --- drivers/thermal/thermal_sys.c |9 - 1 files changed, 8 insertions(+), 1 deletions(-) diff

[PATCH 10/11] thermal: update kernel-doc for create_trip_attrs

2013-03-22 Thread Eduardo Valentin
This patch updates the documentation for create_trip_attrs and removes the warnings generated by scripts/kernel-doc -v. Signed-off-by: Eduardo Valentin eduardo.valen...@ti.com --- drivers/thermal/thermal_sys.c |7 ++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/drivers

[PATCH 11/11] thermal: update kernel-doc for thermal_zone_device_register

2013-03-22 Thread Eduardo Valentin
This patch updates the documentation for thermal_zone_device_register and removes the warnings generated by scripts/kernel-doc -v. Signed-off-by: Eduardo Valentin eduardo.valen...@ti.com --- drivers/thermal/thermal_sys.c |9 - 1 files changed, 8 insertions(+), 1 deletions(-) diff

[PATCH 0/2] thermal: lookup temperature

2013-03-22 Thread Eduardo Valentin
hello Rui, Here is a temperature lookup helper function. The usage of it is exemplified on patch 02. Please review. This may overlap with Durgas recent work. But I am resending as no one has commented my RFC. Cheers, Eduardo Valentin (2): thermal: introduce thermal_zone_lookup_temperature

[PATCH 1/2] thermal: introduce thermal_zone_lookup_temperature helper function

2013-03-22 Thread Eduardo Valentin
code. Signed-off-by: Eduardo Valentin eduardo.valen...@ti.com --- drivers/thermal/thermal_sys.c | 32 include/linux/thermal.h |1 + 2 files changed, 33 insertions(+), 0 deletions(-) diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal

[PATCH 2/2] staging: ti-soc-thermal: remove external heat while extrapolating hotspot

2013-03-22 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: [PATCH 2/2] staging: ti-soc-thermal: remove external heat while extrapolating hotspot

2013-03-25 Thread Eduardo Valentin
On 25-03-2013 02:23, Zhang Rui wrote: On Fri, 2013-03-22 at 17:13 -0400, Eduardo Valentin wrote: 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

Re: [PATCH 1/2] thermal: introduce thermal_zone_lookup_temperature helper function

2013-03-25 Thread Eduardo Valentin
On 25-03-2013 02:26, Zhang Rui wrote: On Mon, 2013-03-25 at 00:20 -0600, R, Durgadoss wrote: -Original Message- From: linux-pm-ow...@vger.kernel.org [mailto:linux-pm- ow...@vger.kernel.org] On Behalf Of Zhang Rui Sent: Monday, March 25, 2013 11:41 AM To: Eduardo Valentin Cc: linux

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

2013-03-25 Thread Eduardo Valentin
On 25-03-2013 14:22, Greg KH wrote: On Tue, Mar 19, 2013 at 10:54:25AM -0400, Eduardo Valentin wrote: 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 n...@ti.com Signed

<    1   2   3   4   5   6   7   8   9   10   >