gpio_to_irq in LSDK1803

cancel
Showing results for 
Search instead for 
Did you mean: 

gpio_to_irq in LSDK1803

250 Views
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 Kudos
1 Reply

70 Views
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 Kudos