On Tue, Dec 6, 2016 at 11:34 PM, Gerd v. Egidy <lists@xxxxxxxx> wrote: > I have a x86 mainboard with a Intel Sunrise Point chipset. I think you should address Mika Westerberg, he know all stuff Intel GPIO. > One function I want > to control is tied to a specific GPIO on the chipset (GPP_E1 / SATAXPCIE_1). > There seems to be a driver for this in the kernel: > pinctrl/intel/pinctrl-sunrisepoint.c > > The easiest solution for me would be if I could control this GPIO from > userspace. - What kernel version are you running? - Have you tried compiling tools/gpio/* and running "lsgpio"? https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/tools/gpio > I have seen examples where a pin from pinctrl is made available to the "gpio" > driver with a devicetree setting on arm devices. But I have a x86 system with > a classic BIOS, so no devicetree here to help me. Pin control per se is not available from userspace, only GPIO. We only expose GPIO lines to userspace from the GPIO subsystem. That said, GPIO can use pin control as a back-end and pin control drivers are often "dual devices" registering both pin control and GPIO. > I have seen that there is pinconf which should give some info and control over > pinctrl through debugfs, correct?. Nope. debugfs is for debugging, development, not for proper use. We always thought the name "debugfs" would strike a chord :D Use the GPIO character device as exemplified with tools/gpio/* > So I enabled CONFIG_PINCONF, but after > loading the pinctrl-sunrisepoint module I could not see anything relating to > this show up in /sys/kernel/debug. That is probably because you need to: - Enable CONFIG_DEBUGFS - mount debugfs on /sys/kernel/debug Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html