Commit Graph

362628 Commits

Author SHA1 Message Date
H Hartley Sweeten
5f8eb72cef staging: comedi: range: introduce range_unipolar2_5
Introduce a simple unipolar 0 to 2.5 range, range_unipolar2_5, for
use by the comedi drivers.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-05 14:13:29 -07:00
H Hartley Sweeten
ff0f7ad58f staging: comedi: dt9812: use comedi provided range_bipolar10
Remove the private ranges, dt9812_10_a{in,out}_range, in this driver
and use the comedi provided range_bipolar10 instead.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-05 14:13:29 -07:00
H Hartley Sweeten
f737279b36 staging: comedi: das800: use comedi provided range_bipolar5
Remove the private range, range_das800_ai, in this driver and use
the comedi provided range_bipolar5 instead.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-05 14:13:29 -07:00
H Hartley Sweeten
5d5cabb675 staging: comedi: das1800: use comedi provided range_bipolar10
Remove the private range, range_ao_1, in this driver and use the
comedi provided range_bipolar10 instead.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-05 14:13:29 -07:00
H Hartley Sweeten
7cf24bb433 staging: comedi: cb_pcidas64: use comedi provided range_bipolar10
Remove the private range, ao_ranges_60xx, in this driver and use
the comedi provided range_bipolar10 instead.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-05 14:13:29 -07:00
H Hartley Sweeten
e9e7023c99 staging: comedi: rtd520: rename thisboard variable
For aesthetic reasons. rename the local variable 'thisboard' to 'board'
throughout the driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-03 13:54:05 -07:00
H Hartley Sweeten
34db8ef946 staging: comedi: rtd520: rename CamelCase chanBipolar
Rename the CamelCase private data variable chanBipolar to chan_is_bipolar.
Remove the unnecessary comment about it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-03 13:54:05 -07:00
H Hartley Sweeten
b0ae4368d7 staging: comedi: rtd520: rename CamelCase in rtdConvertChanGain()
Rename the CamelCase function rtdConvertChanGain() as well as the
CamelCase parameters to the function.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-03 13:54:05 -07:00
H Hartley Sweeten
dcc2358fa4 staging: comedi: rtd520: rename CamelCase rtdBoard
Rename the CamelCase struct rtdBoard to rtd_boardinfo. Also, rename the
range10Start and rangeUniStart variables in the struct to range_bip10
and range_uni10.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-03 13:54:04 -07:00
H Hartley Sweeten
8bc1bd1fc0 staging: comedi: rtd520: rename CamelCase aiCount
Rename this private data variable to ai_count.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-03 13:54:04 -07:00
H Hartley Sweeten
2f0210346a staging: comedi: rtd520: rename CamelCase in rtd_interrupt()
Rename the CamelCase local variable fifoStatus to fifo_status.

Also rename the goto lables abortTransfer and transferDone to
xfer_abort and xfer_done.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-03 13:54:04 -07:00
H Hartley Sweeten
cd5e2d0628 staging: comedi: rtd520: rename CamelCase fifoLen
Rename this private data variable to fifosz.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-03 13:54:04 -07:00
H Hartley Sweeten
2d7b8b9434 staging: comedi: rtd520: rename CamelCase transCount
Rename this private data variable to xfer_count.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-03 13:54:04 -07:00
H Hartley Sweeten
d7c115cea7 staging: comedi: rtd520: rename CamelCase aoValue
Rename this private data variable to ao_readback and remove the
unnecessary comments.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-03 13:54:04 -07:00
H Hartley Sweeten
4686a0e642 staging: comedi: rtd520: rename CamelCase rtdPrivate
Rename the private data struct to rtd_private.

Also, remove the unnecessary comment about it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-03 13:54:03 -07:00
H Hartley Sweeten
efa5b32658 staging: comedi: rtd520: cleanup rtd_dio_insn_config()
Add a local variable to make this function a bit cleaner and
remove the unnecessary comments.

The comedi core expects this function to return the number of
data parameters used. Change the return from '1' to 'insn->n'
to make this more apparent.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-03 13:54:03 -07:00
Wanpeng Li
4460838376 staging: zcache: clean TODO list
Cleanup TODO list since support zero-filled pages more efficiently has
already done by this patchset.

Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-03 13:38:37 -07:00
Wanpeng Li
834e3a1cea staging: zcache: introduce zero-filled page stat count
Introduce zero-filled page statistics to monitor the number of
zero-filled pages.

Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-03 13:38:37 -07:00
Wanpeng Li
90874fc21c staging: zcache: fix static variables defined in debug.h but used in mutiple C files
After commit 95bdaee214 ("zcache: Move debugfs code out of zcache-main.c file")
be merged, most of knods in zcache debugfs just export zero since these variables
are defined in debug.h but are in use in multiple C files zcache-main.c and debug.c,
in this case variables can't be treated as shared variables.

Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-03 13:38:37 -07:00
Marek Vasut
afb12edf94 staging: imx-drm: Make IPU KMS parse display-timings
This patch adds support for parsing of the DT display-timings prop
to IPU KMS driver.

Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-03 11:04:08 -07:00
Wanpeng Li
eee53d9218 staging: zcache: fix zcache writeback in debugfs
commit 9c0ad59ef ("zcache/debug: Use an array to initialize/use debugfs attributes")
use an array to initialize/use debugfs attributes, .name = #x, .val = &zcache_##x.
For zcache writeback, this commit set .name = zcache_outstanding_writeback_pages and
.name = zcache_writtenback_pages seperately, however, corresponding .val =
&zcache_zcache_outstanding_writeback_pages and .val = &zcache_zcache_writtenback_pages,
which are not correct.

Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-02 12:55:37 -07:00
Wanpeng Li
380cb19e40 staging: zcache: fix pers_pageframes|_max aren't exported in debugfs
Before commit 9c0ad59ef ("zcache/debug: Use an array to initialize/use
debugfs attributes"), pers_pageframes|_max are exported in debugfs, but
this commit forgot use array export pers_pageframes|_max. This patch add
pers_pageframes|_max back.

Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-02 12:55:37 -07:00
Wanpeng Li
b0749e77ae staging: zcache: handle zcache_[eph|pers]_zpages for zero-filled page
Increment/decrement zcache_[eph|pers]_zpages for zero-filled pages,
the main point of the counters for zpages and pageframes is to be
able to calculate density == zpages/pageframes. A zero-filled page
becomes a zpage that "compresses" to zero bytes and, as a result,
requires zero pageframes for storage. So the zpages counter should
be increased but the pageframes counter should not.

[Dan Magenheimer <dan.magenheimer@oracle.com>: patch description]
Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-02 12:49:51 -07:00
Wanpeng Li
8762c7dde7 staging: zcache: zero-filled pages awareness
Compression of zero-filled pages can unneccessarily cause internal
fragmentation, and thus waste memory. This special case can be
optimized.

This patch captures zero-filled pages, and marks their corresponding
zcache backing page entry as zero-filled. Whenever such zero-filled
page is retrieved, we fill the page frame with zero.

Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-02 12:49:51 -07:00
Wanpeng Li
bdcde42d74 staging: zcache: introduce zero-filled pages handler
Introduce zero-filled pages handler to capture and handle zero pages.

Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-02 12:49:51 -07:00
Bob Liu
6fd3d05a8f drivers: staging: zcache: fix compile warning
Fix below compile warning:
staging/zcache/zcache-main.c: In function ‘zcache_autocreate_pool’:
staging/zcache/zcache-main.c:1393:13: warning: ‘cli’ may be used uninitialized
in this function [-Wuninitialized]

Signed-off-by: Bob Liu <bob.liu@oracle.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-02 12:43:41 -07:00
Bob Liu
555ee46f58 drivers: staging: zcache: fix compile error
Because 'ramster_debugfs_init' is not defined if !CONFIG_DEBUG_FS, there is
compile error:

$ make drivers/staging/zcache/
staging/zcache/ramster/ramster.c: In function ‘ramster_init’:
staging/zcache/ramster/ramster.c:981:2: error: implicit declaration of
function ‘ramster_debugfs_init’ [-Werror=implicit-function-declaration]

This patch fix it and reduce some #ifdef CONFIG_DEBUG_FS in .c files the same
way.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Bob Liu <bob.liu@oracle.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-02 12:43:41 -07:00
Greg Kroah-Hartman
6d3a63790c Third round of IIO cleanups, graduations and new stuff for the 3.10 cycle.
A small set including 3 things.
 1) A short cleanup series for the ak8975.
 2) Graduation of ak8975 out of staging.
 3) Some additional bits for the at91 adc driver to cover low resolution
    modes, sleep and a little bit of missing documentation.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iQIcBAABAgAGBQJRWyOiAAoJEFSFNJnE9BaIQa8QALIgb//+AvAWg1pVkIJVkA0y
 U0lKA94ynO+WXM7jcWonDfjx02/lyWdNd5gSSbujtxOeanIg29c/RK3vJ4a1Y7Tq
 7b0nzSuX//9F6VsUafF+h8WAmjVLIY+yN/ovGB8s5RzvSj4TsU6lcnxtjp2KV5Os
 koxURUtVF9xwdUIdNHE++zp6vT0EYVhUzOC1WQZxpooUf6UJtTmDLiL1D+b7guWO
 Pc+zW5TWdN1db15XUPhnzVnA/aBGeTM+y9y/Eh9v4IW2oMS4lqjFIdKRFBQ+Yf9k
 4mm7gj5cXxMj2K1GGhofJUvgm++gXkcReXDvI8fXwlKOM+DJNqoYQ0aqk4XdzNch
 T/JOUR1rF9ZE3SlaD2diELFfrzp4WDZti0czW9qduqQh/Rjc7RAkWMngaOJKMfrE
 hdao5TKGfhY4YfBLROPddNesqlNlcppFlEmAeybyw3R8kuPc7Jihv5HzMpIg0gtN
 pz3ATWYwtRP7dATvmTmcvZedaMvIEpqajZKPjONFq/TSoXpubtmxxOq2frHz+FrG
 7VMsSrKyoLsC0jMkwsJzpPTUMJgjOthxii3DlNO/YgzTcj0gspgEN+Pm+s6xX4Mv
 N4t5r8c9jPTCWC/W6wpwIeIFCCdyPrjr+gMegKnM3bbLT9JHiGWnodsJ4lzwL/pI
 yGivjxp+srOqcpDX3l+V
 =HIcb
 -----END PGP SIGNATURE-----

Merge tag 'iio-for-3.10c' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next

Jonathan writes:
	Third round of IIO cleanups, graduations and new stuff for the 3.10 cycle.

	A small set including 3 things.
	1) A short cleanup series for the ak8975.
	2) Graduation of ak8975 out of staging.
	3) Some additional bits for the at91 adc driver to cover low resolution
	   modes, sleep and a little bit of missing documentation.
2013-04-02 12:37:02 -07:00
Jean-Christophe PLAGNIOL-VILLARD
beca9e767e iio: at91_adc: fix missing Sample and Hold time
On the at91_adc a minimal Sample and Hold Time is necessary for the ADC to
guarantee the best converted final value between two channels selection.
This time has to be programmed through the bitfield SHTIM in the
Mode Register ADC_MR.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-04-02 19:22:16 +01:00
Jean-Christophe PLAGNIOL-VILLARD
e748783c55 iio: at91_adc: add sleep mode support
The sleep mode will allow to put the adc in sleep between conversion.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-04-02 19:17:39 +01:00
Ludovic Desroches
47be16b668 iio: at91_adc: add low and high res support
at91 adc offers the choice between two resolutions: low and high.
The low and high resolution values depends on adc IP version, as many IP
properties have been exposed through device tree, these settings have also
been added to the dt bindings.

Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2013-04-02 19:17:26 +01:00
Jonathan Cameron
2fc72cd835 iio:magnetometer:ak8975 move driver out of staging
Issues raised in last series to propose this have now been resolved
so there should be no reason this driver cannot graduate from staging.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
2013-04-02 18:36:47 +01:00
Jonathan Cameron
c411f600ce staging:iio:magnetometer:ak8975 use standard i2c_smbus read functions.
Now the mysterious NOSTART flag is gone from the read, we can use the
i2c_smbus_read_byte/word/i2c_block_data functions instead of the
local reimplementation of these standard functions.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
2013-04-02 18:36:35 +01:00
Jonathan Cameron
aa9922579f staging:iio:magnetometer:ak8975 drop I2C_M_NOSTART flag in read_data
This flag makes no sense whatsoever where it is.
Documentation/i2c/i2c-protocol states:

  If you set the I2C_M_NOSTART variable for the first partial message,
  we do not generate Addr, but we do generate the startbit S. This will
  probably confuse all other clients on your bus, so don't try this.

This is exactly what is going on here.  Likelihood given that the
driver never checked for this protocol mangling being available is that
it wasn't present on the test boards and hence this flag was simply
ignored.  No indication of why it would be necessary has been found in
the datasheets.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
2013-04-02 18:36:24 +01:00
Jonathan Cameron
dea120e665 staging:iio:magnetometer:ak8975 drop unused eoc_irq
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
2013-04-02 18:35:57 +01:00
J Keerthy
03b7f67bd1 staging: ti-soc-thermal: Add get_trend support
Patch adds get_trend functionality for OMAP Bandgap thermal devices.

Signed-off-by: J Keerthy <j-keerthy@ti.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-01 12:27:31 -07:00
J Keerthy
2f440b0622 staging: ti-soc-thermal:Introduce ti_bandgap_get_trend function for OMAP5
The patch adds ti_bandgap_get_trend function. This is specific
to OMAP5 for now it computes the trend from the temp values stored
in the hardware history buffer.

Formula: (T1 - T2) / P.

Where:
                T1: Last read valid temperature.
                T2: Last but one read valid temperature.
                P:  Update Interval.

Signed-off-by: J Keerthy <j-keerthy@ti.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-01 12:27:30 -07:00
J Keerthy
54b59c9224 staging: ti-soc-thermal: Enable HISTORY_BUFFER Feature for OMAP5
This patch enables the HISTORY_BUFFER eature for OMAP5.

Signed-off-by: J Keerthy <j-keerthy@ti.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-01 12:27:30 -07:00
J Keerthy
07a7fb648f staging: ti-soc-thermal: Introduce HAS_HISTORY_BUFFER feature for bandgap
The patch introduces HISTORY_BUFFER feature. This is present in OMAP5 bandgap
and it is a hardware history buffer of previously read temperatures.

Signed-off-by: J Keerthy <j-keerthy@ti.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-01 12:27:30 -07:00
J Keerthy
58bccd073b staging: ti-soc-thermal: Modify update_interval r/w functions to incorporate the OMAP5 feature of COUNTER_DELAY.
Update ti_bandgap_write_update_interval and ti_bandgap_read_update_interval
functions to incorporate the OMAP5 feature of COUNTER_DELAY. The way we
program the delay between two successive temperature conversions
is different for OMAP5 as when compared with OMAP4. Incorporating
the changes required to program the delay for OMAP5.

Signed-off-by: J Keerthy <j-keerthy@ti.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-01 12:27:30 -07:00
J Keerthy
16b39738f9 staging: ti-soc-thermal: Enable COUNTER_DELAY feature for OMAP5
Enable COUNTER_DELAY feature for OMAP5.

Signed-off-by: J Keerthy <j-keerthy@ti.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-01 12:27:30 -07:00
J Keerthy
3ff027f1b7 staging: ti-soc-thermal: Introduce HAS_COUNTER_DELAY feature for bandgap
Introduce HAS_COUNTER_DELAY feature for bandgap.

Signed-off-by: J Keerthy <j-keerthy@ti.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-01 12:27:30 -07:00
J Keerthy
8b6ecd3584 staging: ti-soc-thermal: Initialise counter_delay field for OMAP5 sensors
Initialize all 3 temperature sensors of OMAP5 bandgap with the counter delay
mask.

Signed-off-by: J Keerthy <j-keerthy@ti.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-01 12:27:29 -07:00
J Keerthy
525ee2818f staging: ti-soc-thermal: Add counter_delay_mask field to temp_sensor_registers struct
Add counter_delay_mask field to temp_sensor_registers structure.

Signed-off-by: J Keerthy <j-keerthy@ti.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-01 12:27:29 -07:00
Eduardo Valentin
97df4ecb8e staging: ti-soc-thermal: report alert events on OMAP5 devices
OMAP5430 devices have the capability to generate
alert temperature. Thus, whenever a T_ALERT IRQ is served,
the ti-bandgap will call .report_temperature to notify the
thermal framework about thermal zone update request.

This patch allows OMAP5430 devices to notify
the thermal framework about T_ALERT events.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-01 12:27:29 -07:00
Eduardo Valentin
7a779490b9 staging: ti-soc-thermal: report alert events on OMAP4 devices
OMAP4460 and OMAP4470 devices have the capability to generate
alert temperature. Thus, whenever a T_ALERT IRQ is served,
the ti-bandgap will call .report_temperature to notify the
thermal framework about thermal zone update request.

This patch allows OMAP4460 and OMAP4470 devices to notify
the thermal framework about T_ALERT events.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-01 12:27:29 -07:00
Eduardo Valentin
8c99c166bd staging: ti-soc-thermal: expose ti_thermal_report_temperature
Whenever a sensor has an alert to be reported to the thermal framework,
it can use the report ti_thermal_report_temperature helper. This patch
expose this function so that bandgap data config declarations could use it.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-01 12:27:29 -07:00
Nishanth Menon
169e8d03f0 staging: ti-soc-thermal: remove kernel-doc warnings reported with -v
Fix all kernel-doc warnings by add documentation about returns.

Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-01 12:27:29 -07:00
Eduardo Valentin
422a306380 staging: ti-soc-thermal: return error in case power switch is not supported
Improve ti_bandgap_power by returning an error code in case
the device does not support controlling its power state.

Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-01 12:27:28 -07:00
Shawn Guo
af56976dd2 staging: rts5139: device_reset() can be static
Function device_reset() is only used in rts51x_scsi.c, so make it be
static.  Otherwise, it will have a name collision with the new added
reset API.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-01 12:25:43 -07:00