Hi Jim, thanks for your patch! On Tue, Nov 8, 2022 at 10:29 AM Jim Liu <jim.t90615@xxxxxxxxx> wrote: > > NPCM750 include two SGPIO modules. > Each module supports up to 64 input and 64 output pins. > the output pin must be serial to parallel device(such as the hc595) > the input in must be parallel to serial device(such as the hc165) > > Signed-off-by: Jim Liu <JJLIU0@xxxxxxxxxxx> > --- > Changes for v2: > - modify description (...) This: > + GPIO pins can be programmed to support the following options > + - Support interrupt option for each input port and various interrupt > + sensitivity option (level-high, level-low, edge-high, edge-low) > + - Directly connected to APB bus and its shift clock is from APB bus clock > + divided by a programmable value. > + - nin_gpios is number of input GPIO lines > + - nout_gpios is number of output GPIO lines > + - ngpios is number of nin_gpios GPIO lines and nout_gpios GPIO lines. Why does input/output have to be configured uniquely/static per system? What is wrong with just using direction_input() and direction_output() at runtime like everybody else? > + nin_gpios = <64>; > + nout_gpios = <64>; Especially since in the example you just set them all to be both input and output so they all depend on runtime direction configuration anyway. Yours, Linus Walleij