summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorXinyu Chen <xinyu.chen@freescale.com>2012-11-08 10:24:56 +0800
committerXinyu Chen <xinyu.chen@freescale.com>2012-11-08 10:24:56 +0800
commitac758db7a1ff13fbde98f4f3d1d2ac2c77780ccf (patch)
tree47df51297eaaf05ed6abe31df318e799b3946eb7 /include
parent249d44a6a33b134efd248e5a6ab759c4218de0de (diff)
parentfa610478f592b1a65fe170848b9d2226cd32a254 (diff)
Merge remote branch 'fsl-linux-sdk/imx_3.0.35' into imx_3.0.35_android
Conflicts: arch/arm/plat-mxc/dvfs_core.c drivers/input/keyboard/mpr121.c drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_driver.c include/linux/i2c/mpr.h sound/soc/imx/imx-wm8962.c
Diffstat (limited to 'include')
-rw-r--r--include/linux/fsl_devices.h2
-rw-r--r--include/linux/i2c/mpr.h80
-rw-r--r--include/linux/mfd/max17135.h5
-rw-r--r--include/linux/mxc_asrc.h59
4 files changed, 43 insertions, 103 deletions
diff --git a/include/linux/fsl_devices.h b/include/linux/fsl_devices.h
index ab22c4a9472e..78a50acf22a0 100644
--- a/include/linux/fsl_devices.h
+++ b/include/linux/fsl_devices.h
@@ -320,6 +320,8 @@ struct fsl_mxc_tvin_platform_data {
void (*reset)(void);
void (*io_init)(void);
bool cvbs;
+ /* adv7280 mipi-csi i2c slave addr */
+ u8 csi_tx_addr;
};
struct mpc8xx_pcmcia_ops {
diff --git a/include/linux/i2c/mpr.h b/include/linux/i2c/mpr.h
deleted file mode 100644
index 8dbbee648098..000000000000
--- a/include/linux/i2c/mpr.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (C) 2010-2012 Freescale Semiconductor, Inc. All Rights Reserved.
- */
-
-/*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
-
-/* mpr.h - Header file for Freescale MPR121 Capacitive Touch Sensor Controllor */
-
-#ifndef MPR_H
-#define MPR_H
-
-/* Register definitions */
-#define ELE_TOUCH_STATUS_0_ADDR 0x0
-#define ELE_TOUCH_STATUS_1_ADDR 0X1
-#define MHD_RISING_ADDR 0x2b
-#define NHD_RISING_ADDR 0x2c
-#define NCL_RISING_ADDR 0x2d
-#define FDL_RISING_ADDR 0x2e
-#define MHD_FALLING_ADDR 0x2f
-#define NHD_FALLING_ADDR 0x30
-#define NCL_FALLING_ADDR 0x31
-#define FDL_FALLING_ADDR 0x32
-#define ELE0_TOUCH_THRESHOLD_ADDR 0x41
-#define ELE0_RELEASE_THRESHOLD_ADDR 0x42
-/* ELE0...ELE11's threshold will set in a loop */
-#define AFE_CONF_ADDR 0x5c
-#define FILTER_CONF_ADDR 0x5d
-
-/* ELECTRODE_CONF: this register is most important register, it
- * control how many of electrode is enabled. If you set this register
- * to 0x0, it make the sensor going to suspend mode. Other value(low
- * bit is non-zero) will make the sensor into Run mode. This register
- * should be write at last.
- */
-#define ELECTRODE_CONF_ADDR 0x5e
-#define ECR_CL_BT_5BIT_VAL 0x80
-#define AUTO_CONFIG_CTRL_ADDR 0x7b
-/* AUTO_CONFIG_USL: Upper Limit for auto baseline search, this
- * register is related to VDD supplied on your board, the value of
- * this register is calc by EQ: `((VDD-0.7)/VDD) * 256`.
- * AUTO_CONFIG_LSL: Low Limit of auto baseline search. This is 65% of
- * USL AUTO_CONFIG_TL: The Traget Level of auto baseline search, This
- * is 90% of USL */
-#define AUTO_CONFIG_USL_ADDR 0x7d
-#define AUTO_CONFIG_LSL_ADDR 0x7e
-#define AUTO_CONFIG_TL_ADDR 0x7f
-
-/* Threshold of touch/release trigger */
-#define TOUCH_THRESHOLD 0x0c
-#define RELEASE_THRESHOLD 0x0a
-/* Mask Button bits of STATUS_0 & STATUS_1 register */
-#define TOUCH_STATUS_MASK 0xfff
-/* MPR121 have 12 electrodes */
-#define MPR121_MAX_KEY_COUNT 12
-
-
-/**
- * @keycount: how many key maped
- * @vdd_uv: voltage of vdd supply the chip in uV
- * @matrix: maxtrix of keys
- * @wakeup: can key wake up system.
- */
-struct mpr121_platform_data {
- u16 keycount;
- u16 *matrix;
- int wakeup;
- int vdd_uv;
-};
-
-#endif
diff --git a/include/linux/mfd/max17135.h b/include/linux/mfd/max17135.h
index 265b1588c10a..5785ed415a71 100644
--- a/include/linux/mfd/max17135.h
+++ b/include/linux/mfd/max17135.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010-2011 Freescale Semiconductor, Inc. All Rights Reserved.
+ * Copyright (C) 2010-2012 Freescale Semiconductor, Inc. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -167,9 +167,6 @@ struct max17135 {
/* powerup/powerdown wait time */
int max_wait;
-
- /* Dynamically determined polarity for PWRGOOD */
- int pwrgood_polarity;
};
enum {
diff --git a/include/linux/mxc_asrc.h b/include/linux/mxc_asrc.h
index 081fafa65ab0..8c0c45d86cfd 100644
--- a/include/linux/mxc_asrc.h
+++ b/include/linux/mxc_asrc.h
@@ -27,16 +27,11 @@
#define ASRC_REQ_PAIR _IOWR(ASRC_IOC_MAGIC, 0, struct asrc_req)
#define ASRC_CONFIG_PAIR _IOWR(ASRC_IOC_MAGIC, 1, struct asrc_config)
#define ASRC_RELEASE_PAIR _IOW(ASRC_IOC_MAGIC, 2, enum asrc_pair_index)
-#define ASRC_QUERYBUF _IOWR(ASRC_IOC_MAGIC, 3, struct asrc_buffer)
-#define ASRC_Q_INBUF _IOW(ASRC_IOC_MAGIC, 4, struct asrc_buffer)
-#define ASRC_DQ_INBUF _IOW(ASRC_IOC_MAGIC, 5, struct asrc_buffer)
-#define ASRC_Q_OUTBUF _IOW(ASRC_IOC_MAGIC, 6, struct asrc_buffer)
-#define ASRC_DQ_OUTBUF _IOW(ASRC_IOC_MAGIC, 7, struct asrc_buffer)
-#define ASRC_START_CONV _IOW(ASRC_IOC_MAGIC, 8, enum asrc_pair_index)
-#define ASRC_STOP_CONV _IOW(ASRC_IOC_MAGIC, 9, enum asrc_pair_index)
-#define ASRC_STATUS _IOW(ASRC_IOC_MAGIC, 10, struct asrc_status_flags)
-#define ASRC_FLUSH _IOW(ASRC_IOC_MAGIC, 11, enum asrc_pair_index)
-
+#define ASRC_CONVERT _IOW(ASRC_IOC_MAGIC, 3, struct asrc_convert_buffer)
+#define ASRC_START_CONV _IOW(ASRC_IOC_MAGIC, 4, enum asrc_pair_index)
+#define ASRC_STOP_CONV _IOW(ASRC_IOC_MAGIC, 5, enum asrc_pair_index)
+#define ASRC_STATUS _IOW(ASRC_IOC_MAGIC, 6, struct asrc_status_flags)
+#define ASRC_FLUSH _IOW(ASRC_IOC_MAGIC, 7, enum asrc_pair_index)
enum asrc_pair_index {
ASRC_PAIR_A,
@@ -112,12 +107,21 @@ struct asrc_querybuf {
unsigned long output_offset;
};
+struct asrc_convert_buffer {
+ void *input_buffer_vaddr;
+ void *output_buffer_vaddr;
+ unsigned int input_buffer_length;
+ unsigned int output_buffer_length;
+};
+
struct asrc_buffer {
unsigned int index;
unsigned int length;
+ unsigned int output_last_length;
int buf_valid;
};
+
struct asrc_status_flags {
enum asrc_pair_index index;
unsigned int overload_error;
@@ -134,10 +138,15 @@ enum asrc_error_status {
};
#ifdef __KERNEL__
+#include <linux/scatterlist.h>
#define ASRC_DMA_BUFFER_NUM 2
-#define ASRC_INPUTFIFO_THRESHOLD 32
-#define ASRC_OUTPUTFIFO_THRESHOLD 32
+#define ASRC_INPUTFIFO_THRESHOLD 4
+#define ASRC_OUTPUTFIFO_THRESHOLD 2
+#define ASRC_DMA_BUFFER_SIZE (1024 * 48 * 4)
+#define ASRC_MAX_BUFFER_SIZE (1024 * 48)
+#define ASRC_OUTPUT_LAST_SAMPLE 8
+
#define ASRC_ASRCTR_REG 0x00
#define ASRC_ASRIER_REG 0x04
@@ -182,10 +191,19 @@ enum asrc_error_status {
#define ASRC_ASRMCR1C_REG 0xC8
+#define ASRC_ASRFSTX_INPUT_FIFO_WIDTH 7
+#define ASRC_ASRFSTX_INPUT_FIFO_OFFSET 0
+#define ASRC_ASRFSTX_INPUT_FIFO_MASK 0x7F
+
+#define ASRC_ASRFSTX_OUTPUT_FIFO_WIDTH 7
+#define ASRC_ASRFSTX_OUTPUT_FIFO_OFFSET 12
+#define ASRC_ASRFSTX_OUTPUT_FIFO_MASK (0x7F << ASRC_ASRFSTX_OUTPUT_FIFO_OFFSET)
+
+
struct dma_block {
unsigned int index;
unsigned int length;
- unsigned char *dma_vaddr;
+ void *dma_vaddr;
dma_addr_t dma_paddr;
struct list_head queue;
};
@@ -197,16 +215,10 @@ struct asrc_p2p_params {
struct asrc_pair_params {
enum asrc_pair_index index;
- struct list_head input_queue;
- struct list_head input_done_queue;
- struct list_head output_queue;
- struct list_head output_done_queue;
wait_queue_head_t input_wait_queue;
wait_queue_head_t output_wait_queue;
unsigned int input_counter;
unsigned int output_counter;
- unsigned int input_queue_empty;
- unsigned int output_queue_empty;
struct dma_chan *input_dma_channel;
struct dma_chan *output_dma_channel;
unsigned int input_buffer_size;
@@ -219,8 +231,17 @@ struct asrc_pair_params {
struct dma_block input_dma[ASRC_DMA_BUFFER_NUM];
struct dma_block output_dma_total;
struct dma_block output_dma[ASRC_DMA_BUFFER_NUM];
+ struct dma_block output_last_period;
struct dma_async_tx_descriptor *desc_in;
struct dma_async_tx_descriptor *desc_out;
+ struct work_struct task_output_work;
+ unsigned int input_sg_nodes;
+ unsigned int output_sg_nodes;
+ struct scatterlist input_sg[4], output_sg[4];
+ enum asrc_word_width input_word_width;
+ enum asrc_word_width output_word_width;
+ u32 input_sample_rate;
+ u32 output_sample_rate;
};
struct asrc_data {