Re: [PATCH v2 1/1] i2c: designware: set pinctrl recovery information from device pinctrl

From: Hawa, Hanna
Date: Thu Dec 15 2022 - 09:25:40 EST




On 12/15/2022 4:06 PM, Linus Walleij wrote:
Getter with a stub sounds better to me, so you won't access some device core
fields.

Linus, what do you think about all these (including previous paragraph)?
A getter may be a good solution, it depends, it can also be pushed
somewhere local in the designware i2c driver can it not?
I am thinking that the rest of the code that is using that field is
certainly not going to work without pinctrl either.

the compilation failure occurs on platform which not define the CONFIG_PINCTRL , most of the pinctrl APIs are wrapped with PINCTRL config, for example pinctrl_select_state() or devm_pinctrl_get().

In addition if we add the getter in pinctrl/devinfo.h other drivers may access the pins field without re-call devm_pinctrl_get().

Thanks,
Hanna