Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 34383C32793 for ; Wed, 18 Jan 2023 13:45:29 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B261D8481F; Wed, 18 Jan 2023 14:45:27 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1674049527; bh=y6CVVxOcZuhvdin4khUSFRX1YQDQBV6e8K3jxMyK4gY=; h=Date:Subject:To:Cc:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=G/XQ2PgE0Zc9AM7yAgsOrw30BeH3zZbri/BmtA1VyYNDmU9utfVo8z+oKRRhWIyQY uZ0PyinqLEDGaoGBM48Gc2PHtxBfXRHMnHxYZ3hrpReIn+ngEdmHxq1XlOdBgbrKPg YhsBRwLjd21ALcINjpSwW1PyNo1QbS+dTOqEW9Z8Pl8dvQt56aH8kURyS5E9PkndVs ESVcU5vOLvEJcCIZKpnI89FNt74tfMYkdtdsfRCkizHRp/2n/cWn9SdwCkV0tqmFpH tu/YrDyknqMwvrK1RwjMFOCGlWS5gDqUCMtXx2NyBGpOnZNlW2hiPtKkE+DW9xyv+b bVQX7K0KZyJiA== Received: from [127.0.0.1] (p578adb1c.dip0.t-ipconnect.de [87.138.219.28]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 01A3F83623; Wed, 18 Jan 2023 14:45:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1674049526; bh=y6CVVxOcZuhvdin4khUSFRX1YQDQBV6e8K3jxMyK4gY=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=Pa0SBKpE+hFJCtKvN8Ae9N70qFPzvYErVITkSidJj0ULSS135et0Spo8W6gRnaxhC iKgs0VQNHSMDno2s/UwtFu43ubDsVksjqFn0dBZ20WQbMfUcTrxYRtxCtYYYT5kfFk Smw++qsJR5vE6oE+jy4Mjg8fUM37S/tIVKTh5gVvaJyO+m+7/TIutoqXSgqLcX7q17 TlMOkAEV2fUNwpzSJK1+S13SWUL87nQmB82U+oKm0KxgAy6Fkx9Y6UjqTjuP7aS7rG Js6dL63rYJPVrF5+9k0Jndfj0X3JzSemy4Nb8HY5+vrOcf7M5E4tLgYrxAfOw1/G7f lGp9v3y7DwHsg== Message-ID: Date: Wed, 18 Jan 2023 14:39:58 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: [PATCH 2/3] pinctrl: get rid of some ifdeffery Content-Language: en-US To: Michael Walle Cc: u-boot@lists.denx.de References: <20230118121224.253241-1-michael@walle.cc> <20230118121224.253241-2-michael@walle.cc> <8637b95f-5621-87a6-be3f-f29f56c5fa60@denx.de> <5b2aa377d29614c4305895b1f1d76a77@walle.cc> From: Marek Vasut In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean 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