mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 12:17:12 +09:00
add expand gpio soft interrupt in kconfig, so modify raho defconfig, amended some places which is not standard
This commit is contained in:
1
arch/arm/configs/rk2818_raho_defconfig
Normal file → Executable file
1
arch/arm/configs/rk2818_raho_defconfig
Normal file → Executable file
@@ -885,6 +885,7 @@ CONFIG_GPIOLIB=y
|
||||
# CONFIG_IOEXTEND_TCA6424 is not set
|
||||
CONFIG_EXPANDED_GPIO_NUM=96
|
||||
CONFIG_EXPANDED_GPIO_IRQ_NUM=16
|
||||
# CONFIG_EXPAND_GPIO_SOFT_INTERRUPT is not set
|
||||
CONFIG_SPI_FPGA_GPIO_NUM=96
|
||||
CONFIG_SPI_FPGA_GPIO_IRQ_NUM=16
|
||||
# CONFIG_W1 is not set
|
||||
|
||||
@@ -1388,7 +1388,6 @@ struct platform_device rk2818_device_dm9k = {
|
||||
/*
|
||||
* InfoPhone Matrix Keyboard Device
|
||||
*/
|
||||
|
||||
#define KEYOUT0 TCA6424_P01
|
||||
#define KEYOUT1 TCA6424_P02
|
||||
#define KEYOUT2 TCA6424_P03
|
||||
@@ -1400,31 +1399,7 @@ struct platform_device rk2818_device_dm9k = {
|
||||
#define KEYIN2 TCA6424_P14
|
||||
#define KEYIN3 TCA6424_P15
|
||||
|
||||
|
||||
#if 1
|
||||
static const uint32_t rk2818matrix_keymap[] = {
|
||||
#if 0
|
||||
KEY(0, 0, KEY_1),
|
||||
KEY(0, 1, KEY_3),
|
||||
KEY(0, 2, KEY_5),
|
||||
KEY(0, 3, KEY_6),
|
||||
KEY(0, 4, KEY_7),
|
||||
KEY(1, 0, KEY_2),
|
||||
KEY(1, 1, KEY_4),
|
||||
KEY(1, 2, KEY_R),
|
||||
KEY(1, 3, KEY_Y),
|
||||
KEY(1, 4, KEY_8),
|
||||
KEY(2, 0, KEY_TAB),
|
||||
KEY(2, 1, KEY_Q),
|
||||
KEY(2, 2, KEY_E),
|
||||
KEY(2, 3, KEY_T),
|
||||
KEY(2, 4, KEY_G),
|
||||
KEY(3, 0, KEY_LEFTCTRL),
|
||||
KEY(3, 1, KEY_W),
|
||||
KEY(3, 2, KEY_S),
|
||||
KEY(3, 3, KEY_F),
|
||||
KEY(3, 4, KEY_V),
|
||||
#else
|
||||
KEY(0, 0, KEY_1),
|
||||
KEY(1, 0, KEY_2),
|
||||
KEY(2, 0, KEY_3),
|
||||
@@ -1445,33 +1420,7 @@ static const uint32_t rk2818matrix_keymap[] = {
|
||||
KEY(1, 4, KEY_S),
|
||||
KEY(2, 4, KEY_F),
|
||||
KEY(3, 4, KEY_V),
|
||||
#endif
|
||||
};
|
||||
#else
|
||||
static const uint32_t rk2818matrix_keymap[] = {
|
||||
KEY(0, 0, KEY_1),
|
||||
KEY(0, 1, KEY_2),
|
||||
KEY(0, 2, KEY_3),
|
||||
KEY(0, 3, KEY_TAB),
|
||||
KEY(1, 0, KEY_4),
|
||||
KEY(1, 1, KEY_5),
|
||||
KEY(1, 2, KEY_6),
|
||||
KEY(1, 3, KEY_R),
|
||||
KEY(2, 0, KEY_7),
|
||||
KEY(2, 1, KEY_8),
|
||||
KEY(2, 2, KEY_9),
|
||||
KEY(2, 3, KEY_LEFTCTRL),
|
||||
KEY(3, 0, KEY_SWITCHVIDEOMODE),
|
||||
KEY(3, 1, KEY_0),
|
||||
KEY(3, 2, KEY_S),
|
||||
KEY(3, 3, KEY_F),
|
||||
KEY(4, 0, KEY_G),
|
||||
KEY(4, 1, KEY_W),
|
||||
KEY(4, 2, KEY_S),
|
||||
KEY(4, 3, KEY_F),
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
static struct matrix_keymap_data rk2818matrix_keymap_data = {
|
||||
.keymap = rk2818matrix_keymap,
|
||||
|
||||
@@ -252,7 +252,7 @@ config EXPANDED_GPIO_IRQ_NUM
|
||||
int "setting the amount of expanded gpio irqs"
|
||||
help
|
||||
for tca6424, set 24
|
||||
config SOFT_INTERRUPT
|
||||
config EXPAND_GPIO_SOFT_INTERRUPT
|
||||
bool "soft interrupt for expand gpio use"
|
||||
help
|
||||
if you want expand gpio support interrupt,choose it
|
||||
|
||||
@@ -21,4 +21,4 @@ obj-$(CONFIG_GPIO_VR41XX) += vr41xx_giu.o
|
||||
obj-$(CONFIG_GPIO_WM831X) += wm831x-gpio.o
|
||||
obj-$(CONFIG_GPIO_PCA9554) += pca9554.o
|
||||
obj-$(CONFIG_IOEXTEND_TCA6424) += tca6424.o
|
||||
obj-$(CONFIG_SOFT_INTERRUPT) += soft_interrupt.o
|
||||
obj-$(CONFIG_EXPAND_GPIO_SOFT_INTERRUPT) += expand_gpio_soft_interrupt.o
|
||||
|
||||
@@ -44,7 +44,7 @@ NOTES :
|
||||
#include <linux/delay.h>
|
||||
#include <linux/i2c/tca6424.h>
|
||||
#include <linux/ktime.h>
|
||||
#include "../drivers/gpio/soft_interrupt.h"
|
||||
#include "../drivers/gpio/expand_gpio_soft_interrupt.h"
|
||||
|
||||
#if 0
|
||||
#define DBG(x...) printk(KERN_INFO x)
|
||||
@@ -64,12 +64,13 @@ NOTES :
|
||||
#define MIN(x,y) (((x)<(y))?(x):(y))
|
||||
|
||||
|
||||
int expand_gpio_irq_en = -1;
|
||||
int expand_gpio_irq_ctrflag = -1;
|
||||
unsigned int expand_gpio_irq_num = 0;
|
||||
static int expand_gpio_irq_en = -1;
|
||||
static int expand_gpio_irq_ctrflag = -1;
|
||||
static unsigned int expand_gpio_irq_num = 0;
|
||||
|
||||
static struct workqueue_struct *irqworkqueue;
|
||||
static struct lock_class_key gpio_lock_class;
|
||||
|
||||
struct workqueue_struct *irqworkqueue;
|
||||
extern struct lock_class_key gpio_lock_class;
|
||||
struct expand_gpio_soft_int expand_irq_data;
|
||||
|
||||
void expand_gpio_irq_ctr_dis(int irq,int ctrflag)
|
||||
@@ -43,7 +43,7 @@ NOTES :
|
||||
#include <linux/delay.h>
|
||||
#include <linux/i2c/tca6424.h>
|
||||
#include <linux/ktime.h>
|
||||
#include "../drivers/gpio/soft_interrupt.h"
|
||||
#include "../drivers/gpio/expand_gpio_soft_interrupt.h"
|
||||
|
||||
#if 0
|
||||
#define TCA6424DEB
|
||||
@@ -293,7 +293,7 @@ static int tca6424_gpio_get_value(struct gpio_chip *gc, unsigned pin_num)
|
||||
|
||||
chip = container_of(gc, struct tca6424_chip, gpio_chip);
|
||||
|
||||
#ifdef CONFIG_SOFT_INTERRUPT
|
||||
#ifdef CONFIG_EXPAND_GPIO_SOFT_INTERRUPT
|
||||
ret = wait_untill_input_reg_flash( );
|
||||
if(ret<0)
|
||||
return -1;
|
||||
@@ -306,7 +306,7 @@ static int tca6424_gpio_get_value(struct gpio_chip *gc, unsigned pin_num)
|
||||
if((gpioPortNum>=TCA6424_PortNum)||(gpioPortPinNum>=portnum[gpioPortNum]))
|
||||
return -1;
|
||||
|
||||
#ifndef CONFIG_SOFT_INTERRUPT
|
||||
#ifndef CONFIG_EXPAND_GPIO_SOFT_INTERRUPT
|
||||
uint8_t reg_val;
|
||||
ret = tca6424_read_reg(chip->client, Regaddr, ®_val);
|
||||
if (ret < 0)
|
||||
@@ -514,7 +514,7 @@ static int __devinit tca6424_probe(struct i2c_client *client,const struct i2c_de
|
||||
chip->client = client;
|
||||
chip->names = pdata->names;
|
||||
|
||||
#ifdef CONFIG_SOFT_INTERRUPT
|
||||
#ifdef CONFIG_EXPAND_GPIO_SOFT_INTERRUPT
|
||||
chip->expand = &expand_irq_data;
|
||||
chip->expand->gpio_irq_start =pdata->gpio_irq_start;
|
||||
chip->expand->irq_pin_num = pdata->irq_pin_num;
|
||||
@@ -543,7 +543,7 @@ static int __devinit tca6424_probe(struct i2c_client *client,const struct i2c_de
|
||||
}
|
||||
i2c_set_clientdata(client, chip);
|
||||
|
||||
#ifdef CONFIG_SOFT_INTERRUPT
|
||||
#ifdef CONFIG_EXPAND_GPIO_SOFT_INTERRUPT
|
||||
expand_irq_init(chip,&chip->gtca6424_struct,tca6424_irq_read_inputreg);
|
||||
#endif
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user