Commit 8feaf0ce authored by Eduardo Valentin's avatar Eduardo Valentin Committed by Greg Kroah-Hartman

staging: OMAP4+: thermal: introduce bandgap temperature sensor

In the System Control Module, OMAP supplies a voltage reference
and a temperature sensor feature that are gathered in the band
gap voltage and temperature sensor (VBGAPTS) module. The band
gap provides current and voltage reference for its internal
circuits and other analog IP blocks. The analog-to-digital
converter (ADC) produces an output value that is proportional
to the silicon temperature.

This patch provides a platform driver which expose this feature.
It is moduled as a MFD child of the System Control Module core
MFD driver.

This driver provides only APIs to access the device properties,
like temperature, thresholds and update rate.
Signed-off-by: default avatarEduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: default avatarJ Keerthy <j-keerthy@ti.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 493aa896
...@@ -134,4 +134,6 @@ source "drivers/staging/gdm72xx/Kconfig" ...@@ -134,4 +134,6 @@ source "drivers/staging/gdm72xx/Kconfig"
source "drivers/staging/csr/Kconfig" source "drivers/staging/csr/Kconfig"
source "drivers/staging/omap-thermal/Kconfig"
endif # STAGING endif # STAGING
...@@ -59,3 +59,4 @@ obj-$(CONFIG_USB_WPAN_HCD) += ozwpan/ ...@@ -59,3 +59,4 @@ obj-$(CONFIG_USB_WPAN_HCD) += ozwpan/
obj-$(CONFIG_USB_G_CCG) += ccg/ obj-$(CONFIG_USB_G_CCG) += ccg/
obj-$(CONFIG_WIMAX_GDM72XX) += gdm72xx/ obj-$(CONFIG_WIMAX_GDM72XX) += gdm72xx/
obj-$(CONFIG_CSR_WIFI) += csr/ obj-$(CONFIG_CSR_WIFI) += csr/
obj-$(CONFIG_OMAP_BANDGAP) += omap-thermal/
config OMAP_BANDGAP
tristate "Texas Instruments OMAP4+ temperature sensor driver"
depends on THERMAL
depends on ARCH_OMAP4 || SOC_OMAP5
help
If you say yes here you get support for the Texas Instruments
OMAP4460+ on die bandgap temperature sensor support. The register
set is part of system control module.
This includes alert interrupts generation and also the TSHUT
support.
obj-$(CONFIG_OMAP_BANDGAP) += omap-thermal.o
omap-thermal-y := omap-bandgap.o
List of TODOs (by Eduardo Valentin)
on omap-bandgap.c:
- Rework locking
- Improve driver code by adding usage of regmap-mmio
- Test every exposed API to userland
- Add support to hwmon
- Review and revisit all API exposed
- Revisit PM support
- Revisit data structures and simplify them
- Once SCM-core api settles, update this driver accordingly
on omap-thermal-common.c/omap-thermal.h:
- Revisit extrapolation constants for O4/O5
- Revisit need for locking
- Revisit trips and its definitions
- Revisit trending
on omap5-thermal.c
- Add support for GPU cooling
generally:
- write Kconfig dependencies so that omap variants are covered
- make checkpatch.pl and sparse happy
- make sure this code works on OMAP4430, OMAP4460 and OMAP5430
- update documentation
Copy patches to Eduardo Valentin <eduardo.valentin@ti.com>
This diff is collapsed.
This diff is collapsed.
* Texas Instrument OMAP SCM bandgap bindings
In the System Control Module, OMAP supplies a voltage reference
and a temperature sensor feature that are gathered in the band
gap voltage and temperature sensor (VBGAPTS) module. The band
gap provides current and voltage reference for its internal
circuits and other analog IP blocks. The analog-to-digital
converter (ADC) produces an output value that is proportional
to the silicon temperature.
Required properties:
- compatible : Should be:
- "ti,omap4460-control-bandgap" : for OMAP4460 bandgap
- "ti,omap5430-control-bandgap" : for OMAP5430 bandgap
- interrupts : this entry should indicate which interrupt line
the talert signal is routed to;
Specific:
- ti,tshut-gpio : this entry should be used to inform which GPIO
line the tshut signal is routed to;
Example:
bandgap {
reg = <0x4a002260 0x4
0x4a00232C 0x4
0x4a002378 0x18>;
compatible = "ti,omap4460-control-bandgap";
interrupts = <0 126 4>; /* talert */
ti,tshut-gpio = <86>;
};
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment