Commit graph

9 commits

Author SHA1 Message Date
Eduardo Valentin d52361c6bd staging: ti-soc-thermal: propagate error code
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.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25 11:28:32 -07:00
Eduardo Valentin 0fb3c244fe staging: ti-soc-thermal: fix bitfield writing while updating thresholds
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.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25 11:28:31 -07:00
Eduardo Valentin f5d43b7a51 staging: ti-soc-thermal: fix condition to apply hyst
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.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25 11:28:31 -07:00
Eduardo Valentin 61603af326 staging: ti-soc-thermal: fix several kernel-doc warnings and error
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 <nm@ti.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25 11:28:31 -07:00
Eduardo Valentin f6843569de stating: ti-soc-thermal: use sizeof(*pointer) while allocating
Follow Documentation/CodingStyle and use sizeof(*pointer)
instead of sizeof(struct type).

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25 11:28:31 -07:00
Eduardo Valentin 9879b2c46f staging: ti-soc-thermal: split writable data from readonly data
This patch changes the data structures of this driver so
that readonly data can reside only in the conf pointer.
Now each register has a struct to hold its configuration info,
to be used base on chip version for instance, and a
struct of values to be written, like register shadow and priv data.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25 11:28:31 -07:00
Eduardo Valentin 2f8ec2a971 staging: ti-soc-thermal: make unexported functions local
Move _ti_bandgap_write_threshold and _ti_bandgap_read_threshold to static
area, as they are local functions.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25 11:28:31 -07:00
Eduardo Valentin 03e859d344 staging: ti-soc-thermal: rename symbols to use better prefix
As this driver has been renamed to cope with the chips it
is supposed to support, this patch also changes the symbol
names to use a proper prefix, so it is not suggestive that
this driver supports only OMAP devices.

Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: Benoit <b-cousson@ti.com>
Cc: Nishanth Menon <nm@ti.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25 11:27:49 -07:00
Eduardo Valentin 7372add4a1 staging: rename omap-thermal driver to ti-soc-thermal
Because this driver will support also OMAP derivatives,
this patch does a big rename inside this driver, so it
better fits its usage.

This patch only renames the directory, file names,
includes, Makefiles and Kconfig includes.

Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: Benoit <b-cousson@ti.com>
Cc: Nishanth Menon <nm@ti.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25 11:25:35 -07:00
Renamed from drivers/staging/omap-thermal/omap-bandgap.c (Browse further)