Hi,
I would like to control the RESET input of a few different peripheral chips
(think I2C or SPI peripherals). Because my platform is pretty much
pin-starved, I would prefer to only use one HW signal to reset all chips
together exactly once during boot. I don't have access to the
power-on-reset circuitry of my SoC, unfortunately, so I need a SW way of
emulating something which changes the state at least once during boot, and
never after that until powerdown.
I cannot just add something like a "reset-gpios" DT property to each
foo_probe() function. If I did that, then those devices which are probed
later during boot would cause a reset of an already-configured chip.
Right now, I simply make use of my SoC internal pull-down resistor on a
particular GPIO pin. I rely on the fact that the SoC boots with a level-0
on that pin, and I use a DT gpio-hog to ensure that the line eventually
goes high. I'm perfectly OK with that, but I'm unsure on whether this is
prone to races or not. Can I somehow specify "hey, let's probe for these
SPI or I2C slaves only after the gpio-hog at gpio0 is in effect"? Is there
perhaps an unspoken rule saying the the SoC's pinctrl/gpio blocks,
including gpio-hogs, are initialized prior to probing for child devices on
SPI and I2C buses?
Or should I use e.g. a regulator-gpio for my devices and simulate the reset
line by that?
With kind regards,
Jan
--
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