Re: Kernel updating : export gpio not working ?
Hi, Thank you for your answer ! :) No problem to post back my solution. I think it can always be useful to know the solution of a problem even if it is a specific one. And I would be happy if it could help other kernel-newbies not to do the same error ;) Best regards, -- Mylène JOSSERAND Le 27/02/2013 18:42, Mulyadi Santosa a écrit : On Wed, Feb 27, 2013 at 10:19 PM, Mylene Josserand mylene.josser...@navocap.com wrote: Just to update you that I have found my problem ! In my config file, I did not notice that my own board and an other imx27 board was enabled ! So the gpios configured was the one from this board and not mine's (thanks debugfs !). That is why it did not act like I wanted. This is the kind of post that I like most some one has problem but he/she also still find a way to solve. Then post it back to kernelnewbies. Nice info to know. ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Kernel updating : export gpio not working ?
Hi everyone ! I am currently updating the kernel of my company and I have some problems about gpios so I am asking you some help ! :) I think I am in the good mailist because it is the first time I update a kernel and a board configuration ! :D The previous kernel used was 2.6.31.14 and I am trying to update it to last stable version 3.7.9. In the previous kernel for a home-made board (with a IMx27 and a ARM9), we used these methods to export gpios in sysfs (for example for Gpio OUT) : mxc_gpio_mode(gpio_number | GPIO_GPIO | GPIO_OUT); gpio_request(gpio_number, name_of_gpio); gpio_export(gpio_number, 0); gpio_direction_output(gpio_number, gpio_value); In the sysfs, the gpio exported was visible under name_of_gpio. Now, if I use the same methods, I can not get anything in sysfs except gpiochip0, gpiochip32 etc. I tried to use these functions in a module and I could export a gpio but under gpioXX and not name_of_gpio. Moreover, I tried to export a gpio using the sysfs interface. I succeeded to export it and set direction to out but when I try to set the value, it did not work and the value is always set to 0 (and this gpio was configured as OUT in the board). I make a diff about the gpio documentation and the old kernel used did not seem to have many differences with the new kernel ! There is only some methods added such as gpio_resquest_one and gpio_export_link. I tried them without good results. What am I doing wrong ? What am I missing to make it work ? Is there some other configurations to add in the board configuration ? Thank you for any help/explanation ! -- Mylène JOSSERAND ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Kernel updating : export gpio not working ?
Just to update you that I have found my problem ! In my config file, I did not notice that my own board and an other imx27 board was enabled ! So the gpios configured was the one from this board and not mine's (thanks debugfs !). That is why it did not act like I wanted. Otherwise, the gpios are still exported as gpioXX and not with name_of_gpio. The label name_of_gpio can be found in the debugfs but not printed in the sysfs. I don't know if there is a way to change that, I will search for it if I have time. Best regards, -- Mylène JOSSERAND Le 27/02/2013 11:51, Mylene Josserand a écrit : Hi everyone ! I am currently updating the kernel of my company and I have some problems about gpios so I am asking you some help ! :) I think I am in the good mailist because it is the first time I update a kernel and a board configuration ! :D The previous kernel used was 2.6.31.14 and I am trying to update it to last stable version 3.7.9. In the previous kernel for a home-made board (with a IMx27 and a ARM9), we used these methods to export gpios in sysfs (for example for Gpio OUT) : mxc_gpio_mode(gpio_number | GPIO_GPIO | GPIO_OUT); gpio_request(gpio_number, name_of_gpio); gpio_export(gpio_number, 0); gpio_direction_output(gpio_number, gpio_value); In the sysfs, the gpio exported was visible under name_of_gpio. Now, if I use the same methods, I can not get anything in sysfs except gpiochip0, gpiochip32 etc. I tried to use these functions in a module and I could export a gpio but under gpioXX and not name_of_gpio. Moreover, I tried to export a gpio using the sysfs interface. I succeeded to export it and set direction to out but when I try to set the value, it did not work and the value is always set to 0 (and this gpio was configured as OUT in the board). I make a diff about the gpio documentation and the old kernel used did not seem to have many differences with the new kernel ! There is only some methods added such as gpio_resquest_one and gpio_export_link. I tried them without good results. What am I doing wrong ? What am I missing to make it work ? Is there some other configurations to add in the board configuration ? Thank you for any help/explanation ! ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Kernel updating : export gpio not working ?
On Wed, Feb 27, 2013 at 10:19 PM, Mylene Josserand mylene.josser...@navocap.com wrote: Just to update you that I have found my problem ! In my config file, I did not notice that my own board and an other imx27 board was enabled ! So the gpios configured was the one from this board and not mine's (thanks debugfs !). That is why it did not act like I wanted. This is the kind of post that I like most some one has problem but he/she also still find a way to solve. Then post it back to kernelnewbies. Nice info to know. -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies