2

So I'm doing development on an ARM embedded system which is using the device trees. We're going to integrate a small PCB with a processor and support components onto a bigger PCB, which will be the base board of our system.

We've received a device tree hierarchy from the processor PCB manufacturer as a part of a board support package, and the BSP device tree hogs all unused GPIOs in a single hog group.
I need a GPIO to use as an interrupt line for a driver, and since it's hogged, I'm getting iomux issues.

My current workaround is to manually remove the needed pin from the hog group, but that feels a bit blunt.

So my question is: Is there a better or a recommended way to unhog a pin?

AndrejaKo
  • 213
  • 1
  • 3
  • 11
  • 1
    I think you'd better results from asking this on https://electronics.stackexchange.com/ – JigglyNaga Feb 06 '18 at 12:22
  • @JigglyNaga My feeling is that we don't provide so good answers to complicated Linux questions there... – AndrejaKo Feb 06 '18 at 12:29
  • 1
    hog/unhog what does that mean? – Rui F Ribeiro Feb 06 '18 at 13:05
  • @Rui F Ribeiro this is a technical term used in Device Trees, used mostly by the Linux kernel. The definition is:`GPIO hogging is a mechanism providing automatic GPIO request and configuration as part of the gpio-controller's driver probe function.` This is done by adding pint to a hog pin group. Unhogging is removing a pin from a hog group. It appears that hogged pins cannot be used by another device and are taken up by the GPIO controller, so I can't attach them to a driver, for example. – AndrejaKo Feb 06 '18 at 14:07
  • Just asking: are you trying to make some kind of "RaspberryPi Clone"? Niceeee!!!! – k.Cyborg Feb 06 '18 at 14:11
  • 1
    @k.Cyborg Yeah, something like that, but a bit more boring. It's supposed to be a high reliability, safety-critical solution capable of working for many years at high temperatures without being turned off and so on. Unlike Pi, it's supposed to just execute one program, and the user will interact pretty much only using the touchscreen. Such systems are very common in modern industrial machines. – AndrejaKo Feb 06 '18 at 14:16
  • Still! Pretty impressive what you're doing! It's some kind of PLC but instead of use micro-controllers you use some kind of mini-armPC. Sharing my knowledge: for the OS you can see [ARMBian](https://www.armbian.com), perhaps the SoC that you use have a ready-to-go OS there – k.Cyborg Feb 06 '18 at 14:21
  • 1
    @k.Cyborg Yeah, we're replacing a PLC that was previously used. Also, thanks for the link! – AndrejaKo Feb 06 '18 at 14:29

0 Answers0