On Wed, 24 Apr 2024 at 15:53, quic_zijuhu <quic_zijuhu@xxxxxxxxxxx> wrote: > > >>> > >>> Please slow down here. Zijun's patch works and Bartosz's patch does not. > >>> I don't think Zijun means any ill intent. I am replying to Bartosz's > >>> patch right now. > >> > >> Ok, that is great feedback, so I might be picking up the Zijun v7 set > >> if we don't find any major problems with it. > >> > > > > Luiz, > > > > Please consider my alternative[1] also tested by Wren. Zijun's usage > > of GPIO API is wrong. > > > why is it wrong ? > I have already told you that at least three times. But whatever, let me repeat again: gpiod_get_optional() returns NULL if the given GPIO is not assigned to the device in question OR a pointer to a valid GPIO descriptor. Anything else returned by it is an error and the driver must abort probe(). Bart