Skip to content

staging: omap-thermal: several code refactoring

Eduardo Valentin linux-omap linux-pm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest50 patches 18 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/50staging: omap-thermal: use BIT() macrodrivers/staging/omap-thermal/omap-bandgap.h+48 -480 replies
2/50staging: omap-thermal: remove unused _SHIFT macrosdrivers/staging/omap-thermal/omap-bandgap.h+0 -570 replies
3/50staging: omap-thermal: create header for register, bitfields and definitionsdrivers/staging/omap-thermal/omap-bandgap.h drivers/staging/omap-thermal/omap4-thermal-data.c drivers/staging/omap-thermal/omap4xxx-bandgap.h +2 more+376 -1950 replies
4/50staging: omap-thermal: update documentation of omap-bandgap.hdrivers/staging/omap-thermal/omap-bandgap.h+189 -410 replies
5/50staging: omap-thermal: style cleanup on omap-bandgap.cdrivers/staging/omap-thermal/omap-bandgap.c+15 -170 replies
6/50staging: omap-thermal: fix error checkingdrivers/staging/omap-thermal/omap-thermal-common.c+2 -20 replies
7/50staging: omap-thermal: introduce RMW_BITS macrodrivers/staging/omap-thermal/omap-bandgap.c+46 -1323 replies
8/50staging: omap-thermal: add documentation for register access functionsdrivers/staging/omap-thermal/omap-bandgap.c+22 -10 replies
9/50staging: omap-thermal: make a omap_bandgap_power with only one exit pointdrivers/staging/omap-thermal/omap-bandgap.c+2 -13 replies
10/50staging: omap-thermal: add documentation for omap_bandgap_powerdrivers/staging/omap-thermal/omap-bandgap.c+8 -00 replies
11/50staging: omap-thermal: add documentation for omap_bandgap_read_tempdrivers/staging/omap-thermal/omap-bandgap.c+10 -00 replies
12/50staging: omap-thermal: rename talert handlerdrivers/staging/omap-thermal/omap-bandgap.c+2 -20 replies
13/50staging: omap-thermal: update documentation for talert irq handlerdrivers/staging/omap-thermal/omap-bandgap.c+11 -10 replies
14/50staging: omap-thermal: update tshut IRQ handler documentationdrivers/staging/omap-thermal/omap-bandgap.c+9 -10 replies
15/50staging: omap-thermal: remove duplicated codedrivers/staging/omap-thermal/omap-bandgap.c+0 -10 replies
16/50staging: omap-thermal: read status only once inside alert IRQdrivers/staging/omap-thermal/omap-bandgap.c+5 -50 replies
17/50staging: omap-thermal: add a section of register manipulationdrivers/staging/omap-thermal/omap-bandgap.c+2 -00 replies
18/50staging: omap-thermal: section of basic helpersdrivers/staging/omap-thermal/omap-bandgap.c+2 -00 replies
19/50staging: omap-thermal: IRQ handler sectiondrivers/staging/omap-thermal/omap-bandgap.c+2 -00 replies
20/50staging: omap-thermal: ADC sectiondrivers/staging/omap-thermal/omap-bandgap.c+2 -00 replies
21/50staging: omap-thermal: name adc_to_temp_conversion in a better waydrivers/staging/omap-thermal/omap-bandgap.c+6 -60 replies
22/50staging: omap-thermal: rewrite omap_bandgap_adc_to_mcelsius on kernel coding styledrivers/staging/omap-thermal/omap-bandgap.c+8 -31 reply
23/50staging: omap-thermal: add documentation for omap_bandgap_adc_to_mcelsiusdrivers/staging/omap-thermal/omap-bandgap.c+11 -00 replies
24/50staging: omap-thermal: name temp_to_adc_conversion in a better waydrivers/staging/omap-thermal/omap-bandgap.c+6 -50 replies
25/50staging: omap-thermal: rewrite omap_bandgap_mcelsius_to_adc on kernel coding styledrivers/staging/omap-thermal/omap-bandgap.c+7 -41 reply
26/50staging: omap-thermal: move conv table limits out of sensor datadrivers/staging/omap-thermal/omap-bandgap.c drivers/staging/omap-thermal/omap-bandgap.h drivers/staging/omap-thermal/omap4-thermal-data.c +1 more+30 -350 replies
27/50staging: omap-thermal: add documentation for omap_bandgap_mcelsius_to_adcdrivers/staging/omap-thermal/omap-bandgap.c+10 -00 replies
28/50staging: omap-thermal: rename add_hyst to omap_bandgap_add_hystdrivers/staging/omap-thermal/omap-bandgap.c+26 -160 replies
29/50staging: omap-thermal: document omap_bandgap_add_hyst functiondrivers/staging/omap-thermal/omap-bandgap.c+10 -00 replies
30/50staging: omap-thermal: threshold manipulation sectiondrivers/staging/omap-thermal/omap-bandgap.c+2 -00 replies
31/50staging: omap-thermal: refactor temp_sensor_unmask_interruptsdrivers/staging/omap-thermal/omap-bandgap.c+8 -60 replies
32/50staging: omap-thermal: update omap_bandgap_unmask_interrupts documentationdrivers/staging/omap-thermal/omap-bandgap.c+9 -10 replies
33/50staging: omap-thermal: refactor APIs handling threshold valuesdrivers/staging/omap-thermal/omap-bandgap.c+117 -1613 replies
34/50staging: omap-thermal: device initialization sectiondrivers/staging/omap-thermal/omap-bandgap.c+2 -00 replies
35/50staging: omap-thermal: section of device driver callbacksdrivers/staging/omap-thermal/omap-bandgap.c+2 -00 replies
36/50staging: omap-thermal: rename enable_continuous_modedrivers/staging/omap-thermal/omap-bandgap.c+2 -20 replies
37/50staging: omap-thermal: update omap_bandgap_set_continous_mode documentationdrivers/staging/omap-thermal/omap-bandgap.c+6 -30 replies
38/50staging: omap-thermal: document omap_bandgap_force_single_readdrivers/staging/omap-thermal/omap-bandgap.c+8 -00 replies
39/50staging: omap-thermal: document omap_bandgap_update_alert_threshold functiondrivers/staging/omap-thermal/omap-bandgap.c+14 -00 replies
40/50staging: omap-thermal: document _omap_bandgap_write_threshold functiondrivers/staging/omap-thermal/omap-bandgap.c+13 -00 replies
41/50staging: omap-thermal: document _omap_bandgap_read_threshold functiondrivers/staging/omap-thermal/omap-bandgap.c+12 -00 replies
42/50staging: omap-thermal: document omap_bandgap_tshut_init functiondrivers/staging/omap-thermal/omap-bandgap.c+12 -00 replies
43/50staging: omap-thermal: document omap_bandgap_alert_init functiondrivers/staging/omap-thermal/omap-bandgap.c+11 -10 replies
44/50staging: omap-thermal: document omap_bandgap_build functiondrivers/staging/omap-thermal/omap-bandgap.c+9 -00 replies
45/50staging: omap-thermal: change Kconfig dependency methoddrivers/staging/omap-thermal/Kconfig drivers/staging/omap-thermal/TODO+1 -20 replies
46/50staging: Add a MAINTAINERS entry for TI bandgap and thermal driverMAINTAINERS+6 -00 replies
47/50staging: omap-thermal: switch mutex to spinlock inside omap-bandgapdrivers/staging/omap-thermal/TODO drivers/staging/omap-thermal/omap-bandgap.c drivers/staging/omap-thermal/omap-bandgap.h+12 -113 replies
48/50staging: omap-thermal: remove TODO entry suggesting regmap usagedrivers/staging/omap-thermal/TODO+0 -10 replies
49/50staging: omap-thermal: remove TODO entry for exposed APIsdrivers/staging/omap-thermal/TODO+0 -10 replies
50/50staging: omap-thermal: add documentation for omap_bandgap_validatedrivers/staging/omap-thermal/omap-bandgap.c+8 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

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

Hello Greg,

Here is a series of patches improving the way the omap-thermal driver is written. There is a mix of added documentation, with functions rewrites and cleanups regarding coding style. I am also adding myself as maintainer of this driver.

Next I will be still improving the code in this way, but also working on the policy readiness and testing on other devices. I will probably rename the driver also to something that reflect the support to AMxx devices as well.

Hopefully, it should be soon ready for moving to drivers/thermal/.

All these are based on your staging/staging-next branch.

For those interested in testing and trying the driver, these patches are
also available, as usual, here:
[email protected]:thermal-framework/thermal-framework.git thermal_work/omap/omap-thermal-optimizations
https://git.gitorious.org/thermal-framework/thermal-framework.git thermal_work/omap/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
definitions
staging: omap-thermal: update documentation of omap-bandgap.h
staging: omap-thermal: style cleanup on omap-bandgap.c
staging: omap-thermal: fix error checking
staging: omap-thermal: introduce RMW_BITS macro
staging: omap-thermal: add documentation for register access
functions
staging: omap-thermal: make a omap_bandgap_power with only one exit
point
staging: omap-thermal: add documentation for omap_bandgap_power
staging: omap-thermal: add documentation for omap_bandgap_read_temp
staging: omap-thermal: rename talert handler
staging: omap-thermal: update documentation for talert irq handler
staging: omap-thermal: update tshut IRQ handler documentation
staging: omap-thermal: remove duplicated code
staging: omap-thermal: read status only once inside alert IRQ
staging: omap-thermal: add a section of register manipulation
staging: omap-thermal: section of basic helpers
staging: omap-thermal: IRQ handler section
staging: omap-thermal: ADC section
staging: omap-thermal: name adc_to_temp_conversion in a better way
staging: omap-thermal: rewrite omap_bandgap_adc_to_mcelsius on kernel
coding style
staging: omap-thermal: add documentation for
omap_bandgap_adc_to_mcelsius
staging: omap-thermal: name temp_to_adc_conversion in a better way
staging: omap-thermal: rewrite omap_bandgap_mcelsius_to_adc on kernel
coding style
staging: omap-thermal: move conv table limits out of sensor data
staging: omap-thermal: add documentation for
omap_bandgap_mcelsius_to_adc
staging: omap-thermal: rename add_hyst to omap_bandgap_add_hyst
staging: omap-thermal: document omap_bandgap_add_hyst function
staging: omap-thermal: threshold manipulation section
staging: omap-thermal: refactor temp_sensor_unmask_interrupts
staging: omap-thermal: update omap_bandgap_unmask_interrupts
documentation
staging: omap-thermal: refactor APIs handling threshold values
staging: omap-thermal: device initialization section
staging: omap-thermal: section of device driver callbacks
staging: omap-thermal: rename enable_continuous_mode
staging: omap-thermal: update omap_bandgap_set_continous_mode
documentation
staging: omap-thermal: document omap_bandgap_force_single_read
staging: omap-thermal: document omap_bandgap_update_alert_threshold
function
staging: omap-thermal: document _omap_bandgap_write_threshold
function
staging: omap-thermal: document _omap_bandgap_read_threshold function
staging: omap-thermal: document omap_bandgap_tshut_init function
staging: omap-thermal: document omap_bandgap_alert_init function
staging: omap-thermal: document omap_bandgap_build function
staging: omap-thermal: change Kconfig dependency method
staging: Add a MAINTAINERS entry for TI bandgap and thermal driver
staging: omap-thermal: switch mutex to spinlock inside omap-bandgap
staging: omap-thermal: remove TODO entry suggesting regmap usage
staging: omap-thermal: remove TODO entry for exposed APIs
staging: omap-thermal: add documentation for omap_bandgap_validate

 MAINTAINERS                                        |    6 +
 drivers/staging/omap-thermal/Kconfig               |    2 +-
 drivers/staging/omap-thermal/TODO                  |    4 -
 drivers/staging/omap-thermal/omap-bandgap.c        |  793 +++++++++++---------
 drivers/staging/omap-thermal/omap-bandgap.h        |  498 +++++--------
 drivers/staging/omap-thermal/omap-thermal-common.c |    4 +-
 drivers/staging/omap-thermal/omap4-thermal-data.c  |   11 +-
 drivers/staging/omap-thermal/omap4xxx-bandgap.h    |  175 +++++
 drivers/staging/omap-thermal/omap5-thermal-data.c  |    9 +-
 drivers/staging/omap-thermal/omap5xxx-bandgap.h    |  199 +++++
 10 files changed, 1030 insertions(+), 671 deletions(-)
 create mode 100644 drivers/staging/omap-thermal/omap4xxx-bandgap.h
 create mode 100644 drivers/staging/omap-thermal/omap5xxx-bandgap.h
Signature · 1 line
1.7.7.1.488.ge8e1c