[PATCH 2/3] pinctrl: get rid of some ifdeffery

Marek Vasut marex at denx.de
Wed Jan 18 14:39:58 CET 2023


On 1/18/23 14:10, Michael Walle wrote:
> Am 2023-01-18 14:08, schrieb Marek Vasut:
>> On 1/18/23 13:43, Michael Walle wrote:
>>> Am 2023-01-18 13:18, schrieb Marek Vasut:
>>>> On 1/18/23 13:12, Michael Walle wrote:
>>>>
>>>> [...]
>>>>
>>>>> @@ -411,12 +405,11 @@ static int __maybe_unused 
>>>>> pinctrl_post_bind(struct udevice *dev)
>>>>>       }
>>>>>         /*
>>>>> -     * If set_state callback is set, we assume this pinctrl driver 
>>>>> is the
>>>>> -     * full implementation.  In this case, its child nodes should 
>>>>> be bound
>>>>> -     * so that peripheral devices can easily search in parent devices
>>>>> -     * during later DT-parsing.
>>>>> +     * If the pinctrl driver has the full implementation, its 
>>>>> child nodes
>>>>> +     * should be bound so that peripheral devices can easily 
>>>>> search in
>>>>> +     * parent devices during later DT-parsing.
>>>>>        */
>>>>> -    if (ops->set_state)
>>>>> +    if (CONFIG_IS_ENABLED(PINCTRL_FULL))
>>>>>           return pinconfig_post_bind(dev);
>>>>
>>>> Is it correct to drop the ops->set_state non-NULL check ?
>>>
>>> See include/dm/pinctrl.h. set_state() is mandatory. Although,
>>> that seems to be wrong for the simple implementation.
>>
>> Could that be fixed for the simple case ? I think that should be easy
>> to do, right ?
> 
> You mean a documentation fix?

Reading the original comment one more time, no, I think this patch is 
fine as is, sorry for the noise.

Reviewed-by: Marek Vasut <marex at denx.de>


More information about the U-Boot mailing list