aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-08-10 12:00:51 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-08-10 12:00:51 -0400
commit8ae3f1d09566038606a18576604ecc957a935c48 (patch)
tree428a087efd8596ec38c2cf9af557eac97d887353 /include
parente6e8ac441cd2c1fed16f1864b170d9d471aeb7fe (diff)
parentcefe8a32f2a5887246ed250115e34bee6ecc8d61 (diff)
Merge tag 'staging-3.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging driver fixes from Greg KH: "Here are 3 small fixes for staging/IIO drivers for 3.11-rc5. Nothing huge, two IIO driver fixes, and a zcache fix. All of these have been in linux-next for a while" * tag 'staging-3.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: staging: zcache: fix "zcache=" kernel parameter iio: ti_am335x_adc: Fix wrong samples received on 1st read iio:trigger: Fix use_count race condition
Diffstat (limited to 'include')
-rw-r--r--include/linux/iio/trigger.h3
-rw-r--r--include/linux/mfd/ti_am335x_tscadc.h16
2 files changed, 18 insertions, 1 deletions
diff --git a/include/linux/iio/trigger.h b/include/linux/iio/trigger.h
index 3869c525b052..369cf2cd5144 100644
--- a/include/linux/iio/trigger.h
+++ b/include/linux/iio/trigger.h
@@ -8,6 +8,7 @@
8 */ 8 */
9#include <linux/irq.h> 9#include <linux/irq.h>
10#include <linux/module.h> 10#include <linux/module.h>
11#include <linux/atomic.h>
11 12
12#ifndef _IIO_TRIGGER_H_ 13#ifndef _IIO_TRIGGER_H_
13#define _IIO_TRIGGER_H_ 14#define _IIO_TRIGGER_H_
@@ -61,7 +62,7 @@ struct iio_trigger {
61 62
62 struct list_head list; 63 struct list_head list;
63 struct list_head alloc_list; 64 struct list_head alloc_list;
64 int use_count; 65 atomic_t use_count;
65 66
66 struct irq_chip subirq_chip; 67 struct irq_chip subirq_chip;
67 int subirq_base; 68 int subirq_base;
diff --git a/include/linux/mfd/ti_am335x_tscadc.h b/include/linux/mfd/ti_am335x_tscadc.h
index 8d73fe29796a..db1791bb997a 100644
--- a/include/linux/mfd/ti_am335x_tscadc.h
+++ b/include/linux/mfd/ti_am335x_tscadc.h
@@ -113,11 +113,27 @@
113#define CNTRLREG_8WIRE CNTRLREG_AFE_CTRL(3) 113#define CNTRLREG_8WIRE CNTRLREG_AFE_CTRL(3)
114#define CNTRLREG_TSCENB BIT(7) 114#define CNTRLREG_TSCENB BIT(7)
115 115
116/* FIFO READ Register */
117#define FIFOREAD_DATA_MASK (0xfff << 0)
118#define FIFOREAD_CHNLID_MASK (0xf << 16)
119
120/* Sequencer Status */
121#define SEQ_STATUS BIT(5)
122
116#define ADC_CLK 3000000 123#define ADC_CLK 3000000
117#define MAX_CLK_DIV 7 124#define MAX_CLK_DIV 7
118#define TOTAL_STEPS 16 125#define TOTAL_STEPS 16
119#define TOTAL_CHANNELS 8 126#define TOTAL_CHANNELS 8
120 127
128/*
129* ADC runs at 3MHz, and it takes
130* 15 cycles to latch one data output.
131* Hence the idle time for ADC to
132* process one sample data would be
133* around 5 micro seconds.
134*/
135#define IDLE_TIMEOUT 5 /* microsec */
136
121#define TSCADC_CELLS 2 137#define TSCADC_CELLS 2
122 138
123struct ti_tscadc_dev { 139struct ti_tscadc_dev {