diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-08-05 02:04:24 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-08-05 02:04:24 -0400 |
| commit | cefe8a32f2a5887246ed250115e34bee6ecc8d61 (patch) | |
| tree | 1e8220456df31a05c6c56889545f2d8360f5a7b9 /include/linux | |
| parent | 02073798a6b081bf74e6c10d6f7e7a693c067ecd (diff) | |
| parent | b1451e546899bc8f450773b2af02e0cd000cf1fa (diff) | |
Merge tag 'iio-fixes-for-3.11b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus
Jonathan writes:
Second round of IIO fixes for the 3.11 cycle.
1) Fix a long term race in the IIO trigger handling.
This only effects cases where a single trigger is in use
by multiple devices.
2) ti_am335x fix an issue with incorrect data due to reading before
the sequencer is finished.
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/iio/trigger.h | 3 | ||||
| -rw-r--r-- | include/linux/mfd/ti_am335x_tscadc.h | 16 |
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 | ||
| 123 | struct ti_tscadc_dev { | 139 | struct ti_tscadc_dev { |
