|
@@ -576,3 +576,124 @@ static struct ad714x_button_plat ad7147_spi_button_plat[] = {
|
|
|
.keycode = BTN_BACK,
|
|
|
.l_mask = 0x200,
|
|
|
.h_mask = 0x400,
|
|
|
+ },
|
|
|
+};
|
|
|
+static struct ad714x_platform_data ad7147_spi_platform_data = {
|
|
|
+ .slider_num = 1,
|
|
|
+ .button_num = 5,
|
|
|
+ .slider = ad7147_spi_slider_plat,
|
|
|
+ .button = ad7147_spi_button_plat,
|
|
|
+ .stage_cfg_reg = {
|
|
|
+ {0xFBFF, 0x1FFF, 0, 0x2626, 1600, 1600, 1600, 1600},
|
|
|
+ {0xEFFF, 0x1FFF, 0, 0x2626, 1650, 1650, 1650, 1650},
|
|
|
+ {0xFFFF, 0x1FFE, 0, 0x2626, 1650, 1650, 1650, 1650},
|
|
|
+ {0xFFFF, 0x1FFB, 0, 0x2626, 1650, 1650, 1650, 1650},
|
|
|
+ {0xFFFF, 0x1FEF, 0, 0x2626, 1650, 1650, 1650, 1650},
|
|
|
+ {0xFFFF, 0x1FBF, 0, 0x2626, 1650, 1650, 1650, 1650},
|
|
|
+ {0xFFFF, 0x1EFF, 0, 0x2626, 1650, 1650, 1650, 1650},
|
|
|
+ {0xFFFF, 0x1BFF, 0, 0x2626, 1600, 1600, 1600, 1600},
|
|
|
+ {0xFF7B, 0x3FFF, 0x506, 0x2626, 1100, 1100, 1150, 1150},
|
|
|
+ {0xFDFE, 0x3FFF, 0x606, 0x2626, 1100, 1100, 1150, 1150},
|
|
|
+ {0xFEBA, 0x1FFF, 0x1400, 0x2626, 1200, 1200, 1300, 1300},
|
|
|
+ {0xFFEF, 0x1FFF, 0x0, 0x2626, 1100, 1100, 1150, 1150},
|
|
|
+ },
|
|
|
+ .sys_cfg_reg = {0x2B2, 0x0, 0x3233, 0x819, 0x832, 0xCFF, 0xCFF, 0x0},
|
|
|
+};
|
|
|
+#endif
|
|
|
+
|
|
|
+#if defined(CONFIG_INPUT_AD714X_I2C) || defined(CONFIG_INPUT_AD714X_I2C_MODULE)
|
|
|
+#include <linux/input/ad714x.h>
|
|
|
+static struct ad714x_button_plat ad7142_i2c_button_plat[] = {
|
|
|
+ {
|
|
|
+ .keycode = BTN_1,
|
|
|
+ .l_mask = 0,
|
|
|
+ .h_mask = 0x1,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ .keycode = BTN_2,
|
|
|
+ .l_mask = 0,
|
|
|
+ .h_mask = 0x2,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ .keycode = BTN_3,
|
|
|
+ .l_mask = 0,
|
|
|
+ .h_mask = 0x4,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ .keycode = BTN_4,
|
|
|
+ .l_mask = 0x0,
|
|
|
+ .h_mask = 0x8,
|
|
|
+ },
|
|
|
+};
|
|
|
+static struct ad714x_platform_data ad7142_i2c_platform_data = {
|
|
|
+ .button_num = 4,
|
|
|
+ .button = ad7142_i2c_button_plat,
|
|
|
+ .stage_cfg_reg = {
|
|
|
+ /* fixme: figure out right setting for all comoponent according
|
|
|
+ * to hardware feature of EVAL-AD7142EB board */
|
|
|
+ {0xE7FF, 0x3FFF, 0x0005, 0x2626, 0x01F4, 0x01F4, 0x028A, 0x028A},
|
|
|
+ {0xFDBF, 0x3FFF, 0x0001, 0x2626, 0x01F4, 0x01F4, 0x028A, 0x028A},
|
|
|
+ {0xFFFF, 0x2DFF, 0x0001, 0x2626, 0x01F4, 0x01F4, 0x028A, 0x028A},
|
|
|
+ {0xFFFF, 0x37BF, 0x0001, 0x2626, 0x01F4, 0x01F4, 0x028A, 0x028A},
|
|
|
+ {0xFFFF, 0x3FFF, 0x0000, 0x0606, 0x01F4, 0x01F4, 0x0320, 0x0320},
|
|
|
+ {0xFFFF, 0x3FFF, 0x0000, 0x0606, 0x01F4, 0x01F4, 0x0320, 0x0320},
|
|
|
+ {0xFFFF, 0x3FFF, 0x0000, 0x0606, 0x01F4, 0x01F4, 0x0320, 0x0320},
|
|
|
+ {0xFFFF, 0x3FFF, 0x0000, 0x0606, 0x01F4, 0x01F4, 0x0320, 0x0320},
|
|
|
+ {0xFFFF, 0x3FFF, 0x0000, 0x0606, 0x01F4, 0x01F4, 0x0320, 0x0320},
|
|
|
+ {0xFFFF, 0x3FFF, 0x0000, 0x0606, 0x01F4, 0x01F4, 0x0320, 0x0320},
|
|
|
+ {0xFFFF, 0x3FFF, 0x0000, 0x0606, 0x01F4, 0x01F4, 0x0320, 0x0320},
|
|
|
+ {0xFFFF, 0x3FFF, 0x0000, 0x0606, 0x01F4, 0x01F4, 0x0320, 0x0320},
|
|
|
+ },
|
|
|
+ .sys_cfg_reg = {0x0B2, 0x0, 0x690, 0x664, 0x290F, 0xF, 0xF, 0x0},
|
|
|
+};
|
|
|
+#endif
|
|
|
+
|
|
|
+#if defined(CONFIG_AD2S90) || defined(CONFIG_AD2S90_MODULE)
|
|
|
+static struct bfin5xx_spi_chip ad2s90_spi_chip_info = {
|
|
|
+ .enable_dma = 0,
|
|
|
+};
|
|
|
+#endif
|
|
|
+
|
|
|
+#if defined(CONFIG_AD2S120X) || defined(CONFIG_AD2S120X_MODULE)
|
|
|
+static unsigned short ad2s120x_platform_data[] = {
|
|
|
+ /* used as SAMPLE and RDVEL */
|
|
|
+ GPIO_PF5, GPIO_PF6, 0
|
|
|
+};
|
|
|
+
|
|
|
+static struct bfin5xx_spi_chip ad2s120x_spi_chip_info = {
|
|
|
+ .enable_dma = 0,
|
|
|
+};
|
|
|
+#endif
|
|
|
+
|
|
|
+#if defined(CONFIG_AD2S1210) || defined(CONFIG_AD2S1210_MODULE)
|
|
|
+static unsigned short ad2s1210_platform_data[] = {
|
|
|
+ /* use as SAMPLE, A0, A1 */
|
|
|
+ GPIO_PF7, GPIO_PF8, GPIO_PF9,
|
|
|
+# if defined(CONFIG_AD2S1210_GPIO_INPUT) || defined(CONFIG_AD2S1210_GPIO_OUTPUT)
|
|
|
+ /* the RES0 and RES1 pins */
|
|
|
+ GPIO_PF4, GPIO_PF5,
|
|
|
+# endif
|
|
|
+ 0,
|
|
|
+};
|
|
|
+
|
|
|
+static struct bfin5xx_spi_chip ad2s1210_spi_chip_info = {
|
|
|
+ .enable_dma = 0,
|
|
|
+};
|
|
|
+#endif
|
|
|
+
|
|
|
+#if defined(CONFIG_AD7314) || defined(CONFIG_AD7314_MODULE)
|
|
|
+static struct bfin5xx_spi_chip ad7314_spi_chip_info = {
|
|
|
+ .enable_dma = 0,
|
|
|
+};
|
|
|
+#endif
|
|
|
+
|
|
|
+#if defined(CONFIG_AD7816) || defined(CONFIG_AD7816_MODULE)
|
|
|
+static unsigned short ad7816_platform_data[] = {
|
|
|
+ GPIO_PF4, /* rdwr_pin */
|
|
|
+ GPIO_PF5, /* convert_pin */
|
|
|
+ GPIO_PF7, /* busy_pin */
|
|
|
+ 0,
|
|
|
+};
|
|
|
+
|
|
|
+static struct bfin5xx_spi_chip ad7816_spi_chip_info = {
|
|
|
+ .enable_dma = 0,
|