GPIO pullup/pulldown function


I want to use one of the gpio pin from the expansion board of my beagle board xm. From /sys/class/gpio I can set successfully the “high or 1” and “low or 0” of VALUE (from a voltmeter it gives 1.8V for 1 and 0V for 0 form the pin) to a particular gpio given the DIRECTION is “out”, but when I set the DIRECTION to “in” the VALUE change to always “high or 1”. For my application I need to configure the GPIO with “in”=DIRECTION that will give “low/0”=VALUE so that when I apply 1.8V to that pin it will give “1”= Value. Probably, the reason why the GPIO pin gives always “1” during input state because it is currently set as pull-up function, Im wondering if there is a way to set it up to pulldown function.


some gpio in expansion board may not be configured (by default) as
gpio. Look at the documentation to see the other functionality of the
said pin.

I have instructions on how to set the gpio pull up/down on a bone here [1]. It uses /sys/kernel/debug/omap_mux. I don’t know if that’s available on your xM. You may have to run

**mount -t debugfs debugfs /sys/kernel/debug/**

to get debug info to appear. omap_mux doesn’t appear on my xM.