2021-07-13 2:22 AM
currently i have a pin <STM32_PINMUX('F', 14, GPIO)> how to mux as a GPIO before using as a gpiolib, export work fine, but i2c4 is not working but i can see GPIO is getting based on sys gpiolib.
as before export i see PF14 line is muxed as pin 94 (PF14): input - low - pull up
and this line has AF as a i2c4-clk
2021-07-15 7:17 AM
Hi Ara.1 (Community Member)
I am not sure to understand what you try to acheive here. if you've declared PF14 as AF assigned to i2c4-clk, the i2c driver will use this pin (pinctrl framework). This is mutually exclusive to control PF14 as a GPIO using gpiolib framework.
Maybe a good starting point: https://wiki.st.com/stm32mpu/wiki/Overview_of_GPIO_pins
Regards,
Olivier
2021-07-15 8:44 AM
point 1
echo 94 > /sys/class/gpio/export -
point 2
gpioset gpiochip5 14=1
2021-07-15 8:52 AM
Hi Ara.1 (Community Member)
Understood...
sysfs gpio is deprecated since Linux 4.8, you should use gpiochip instead.
BR
Olivier
2021-07-15 11:00 AM
sysfs gpio i can set and reset, same reflecting on PF14, but why i2c4 lines are different touch is failing this looks strange.
2021-07-21 8:23 AM
In order to give better visibility on the answered topics, please click on 'Select as Best' on the reply which solved your issue or answered your question. See also 'Best Answers'
We’re moving the ST Community to a new platform to give you a better and more reliable community experience.