gpio_to_irq in LSDK1803

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

gpio_to_irq in LSDK1803

917件の閲覧回数
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 返信

737件の閲覧回数
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 件の賞賛