gpio_to_irq in LSDK1803

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

gpio_to_irq in LSDK1803

1,674 次查看
shijj
Contributor I

hi

I want to make a gpio interrupt driver.my chip is ls1046a

In my code:

irq_no=gpio_to_irq(GPIO_NUM);

the func"gpio_to_irq()" return -22, my GPIO_NUM=gpio1_26=480+26=506;

Does nxp not provide this interface? In IMX platform i can this function successfully.

here is my code:

#define BASE_GPIO2           506   

static int __init button_init(void){
int error,a;
a = gpio_is_valid(BASE_GPIO2);
printk(KERN_INFO"value a is:%d.\n",a);
irq_no = gpio_to_irq(BASE_GPIO2);
printk(KERN_INFO"irq_no is:%d.\n",irq_no);

0 项奖励
回复
1 回复

1,494 次查看
yipingwang
NXP TechSupport
NXP TechSupport

Please refer to "mpc8xxx_gpio_to_irq" in drivers/gpio/gpio-mpc8xxx.c in Linux Kernel source code.

Please refer to the section "2. Configure GPIO driver in Linux Kernel" in LS1043 GPIO support in Linux SDK.

Please refer to the attached GPIO driver source code.

0 项奖励
回复