GPIO acces on x86

Victor Rodriguez vm.rod25 at gmail.com
Fri Jul 22 21:30:31 EDT 2011


Hi

I want to access to the GPIO on a Intel Atom N450.

I have already read the kernel GPIO documentation

http://www.mjmwired.net/kernel/Documentation/gpio.txt

And by sysfs (/sys/class/gpio)

echo 19 > export

shows me an error of permisions

Do i have to recompile the kernel like with this instructions ?

http://elinux.org/GPIO

I really would prefer to make a char driver , I already have one for
OMAP technology, on that case  in order to access to gpio is necessary
to do this :


#define PIN_LED		GPIO_TO_PIN(6, 12)
#define MUX_LED		DA850_GPIO6_12

	/*Free gpio */
	gpio_free(PIN_LED);
	
	/*Configure in mux.h  */
	ret = davinci_cfg_reg (MUX_LED);
		if (ret<0)
		{
			return ret;
		}
	
	/*Ask permision to turn it on */
	ret = gpio_request(PIN_LED, "led");
		if (ret)
		{
			return ret;
		}
		
	

	/*Configure as out put */
	gpio_direction_output(PIN_LED, 1);

	/*TURN ON */
	gpio_set_value(PIN_LED, 1);


But how can I do the GPIO_TO_PIN(6, 12) on Atom technology ?


Thanks a lot for your help

Regards

Sincerely yours

Victor Rodriguez



More information about the Kernelnewbies mailing list