Linux - Embedded & Single-board computerThis forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am working on a project which needs me to configure the gpio pins and add sensors to atom board. The kernel has configured the gpio ... CONFIG_GPIO_SYSFS=y is one of the kernel options.
I am using fedora version 2.6.29-10
But i am not able to write to export file in gpio folder using
GPIO=22 // to add pin 22 to userspace echo $GPIO > /sys/class/gpio/export
I get the error bash: echo: write error: Invalid argument
I also tried the same with sudo and sh -c but no use ,unless i can expose these pins to userspace i cant write any code.What am i doing wrong?
Is the problem with the kernel version or some other kernel options needs to set??
This error is not present in the Android x86 BSP for Atom. The command populates the gpio entry as documented.
My guess is that something is amiss with that particular Fedora kernel. Have you tried any other traditional Linux distros? What's your platform, specifically?
My suggestion would be to just develop the GPIO code as a kernel module. May I ask why you're wanting to do it in user space, currently? I mean for one, GPIOs are good for interrupts, and you won't have those in user space.
I am working on intel atom Processor E6 series .And I cant boot other os into it other than what was provided by our sponsorer(i am in a college). We are still working on how to load other os, that's because its not like other system with a bios and boot loader(like grub), efi is hard coded into eeprom and I am trying to modify it .
I also tried it on ubuntu 2.6.32-38 , its the same problem .
I have to add sensors(for a portable medical kit) to the board provided.I want to use GPIO as other way to add sensors ex: through USB is power consuming,I cant build a portable device which is power hungry ... . Hence I am also constrained to using interrupts and making the processor use efficient. But I can as of now i can ignore using interrupts and stick to traditional ways of polling if it can solve my problem.
Are you suggesting that I can still write code to access these pins provided it's run as a kernel module?Because all that I have read till now wanted me to expose these pins first in userspace and then start to code.I do have root privilege so I can develop the GPIO code as a kernel module.
Can you please suggest a place where I can find relevant stuff(write kernel module for devices). New to embedded develpoment please bear with me if I have written something silly
Sir,
I contacted the people who supplied us the boards,they gave a kernel module which had to complied , now that issue is sorted , thanks for your help.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.