This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/am3352: Enabling GPIO pull-up in device tree

Part Number: AM3352
Other Parts Discussed in Thread: AM3352

Tool/software: Linux

Hi, 

I am  trying to enable a gpio pull-up in device tree whilst still allowing the gpio to be controlled via the sysfs interface. 

I can enable the gpio pull up but afterwards I am not able to control it via sys/class/gpio. It seems any gpio pin i define in the device tree makes communicating with it from sysfs impossible. 

Are there any other methods of defining a gpio pin in the device tree?

i found this documentation but fi'm not sure how to implement it in my device tree and I don't think there is a pull-up/down control field: https://www.kernel.org/doc/Documentation/devicetree/bindings/gpio/gpio.txt

Extract from my device tree:

&am33xx_pinmux {

gpio2_pins_default: gpio2_pins_default {
pinctrl-single,pins = <
0x88 ( PIN_INPUT | MUX_MODE7 ) /* (U17) gpmc_csn3.gpio2[0] */
0x9c ( PIN_OUTPUT_PULLUP | MUX_MODE7 ) /* (V8) gpmc_be0n_cle.gpio2[5] */
>;
};

};

&gpio2 {
pinctrl-names = "default";
pinctrl-0 = <&gpio2_pins_default>;
status = "okay";
};

Thanks for your help!