Re: Re: [RFC PATCH 3/4] i2c: core: treat EPROBE_DEFER when acquiring SCL/SDA GPIOs

From: wsa
Date: Mon Aug 03 2020 - 12:59:19 EST



> > This is correct but I think the code flow is/was confusing. Can you drop
> > this 'return' and use 'else if' for the next code block? I think this is
> > more readable.
>
> Ok, it makes sense. Should I make a separate patch for this only?

I am fine if this is included in this change.

> One more question, should we keep:
> if (!bri->set_sda && !bri->get_sda) {
> err_str = "either get_sda() or set_sda() needed";
> goto err;
> }
> ?
> Without {get/set}_sda we won't be able to generate stop commands and
> possibly check if the bus is free, but we can still generate the SCL
> clock pulses.

My gut feeling says we need to keep it. I can't recall the reason now
and want to send out this answer ASAP. Anyhow, this definately would be
a seperate patch. If you really want to, send a patch, and then I have
to think why we still need it ;)

> Ok. Perhaps I should also move the debug print with the registered
> adapter after calling i2c_init_recovery().

Yes, makes sense.

> Do you want me to integrate this patch in the previous one?

Nope, please keep it seperate.

Attachment: signature.asc
Description: PGP signature