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 85526C32793 for ; Wed, 18 Jan 2023 13:11:01 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8FE648526F; Wed, 18 Jan 2023 14:10:59 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=walle.cc Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; secure) header.d=walle.cc header.i=@walle.cc header.b="sDiGcdfA"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1F5B5855F3; Wed, 18 Jan 2023 14:10:58 +0100 (CET) Received: from mail.3ffe.de (0001.3ffe.de [IPv6:2a01:4f8:c0c:9d57::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 1D6198526F for ; Wed, 18 Jan 2023 14:10:56 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=walle.cc Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=michael@walle.cc Received: from 3ffe.de (0001.3ffe.de [IPv6:2a01:4f8:c0c:9d57::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.3ffe.de (Postfix) with ESMTPSA id BE1081645; Wed, 18 Jan 2023 14:10:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2022082101; t=1674047455; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=r3qZpTtzFk/9x2xhmkZ8dnbBd9jHNx9IAf4pUgWm8tM=; b=sDiGcdfAnFrUUck0VfLQhK3Tju4XdOxYO7/v0aBBb1BbF8I1g6GSryd6oOPD6Rpu7k9nrn j1vRIkucDM0KkWFW1TUC8LA5bsl7tqZ/KDIRhMeMvqepZaE6ZEj9W2WWQLFFrKsP9zfXWw orYT8P9mRT7W+mOFReMu+RZQ01HlCPsRR5lp4WC7zydoQJdkQyL+Tee+5mPJGjV2WgKGVE 6ICiMOB4CkkoUMhBF7+gNHMSGrpO1Yb32x9LlX3S42kTVqnqv1PMd6j5EAG2Uo0VUV1GaX 7PWVXw2ZcWejL68WMdmZMnee6xQRKx3OEcUUp2EYuywxB029TvPQ11NlxKE1ig== MIME-Version: 1.0 Date: Wed, 18 Jan 2023 14:10:55 +0100 From: Michael Walle To: Marek Vasut Cc: u-boot@lists.denx.de Subject: Re: [PATCH 2/3] pinctrl: get rid of some ifdeffery In-Reply-To: References: <20230118121224.253241-1-michael@walle.cc> <20230118121224.253241-2-michael@walle.cc> <8637b95f-5621-87a6-be3f-f29f56c5fa60@denx.de> <5b2aa377d29614c4305895b1f1d76a77@walle.cc> User-Agent: Roundcube Webmail/1.4.13 Message-ID: X-Sender: michael@walle.cc 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 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? -michael