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 9BED3C32793 for ; Wed, 18 Jan 2023 12:43:23 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id F3AC08535B; Wed, 18 Jan 2023 13:43:20 +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="xWaho29e"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C22AE8526F; Wed, 18 Jan 2023 13:43:19 +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 95035855F2 for ; Wed, 18 Jan 2023 13:43:17 +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 2EEAA1260; Wed, 18 Jan 2023 13:43:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2022082101; t=1674045797; 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=Jwiwm4PhEm0QTTvaikbrjNbFUbYIOdG6aiPFvyluKJU=; b=xWaho29eWbDkWhHYpiHpOxoOfKx2mLydp77QHQo9dT9LIX9vrbMTicF2jLqZs9r2xqWO3D WzQPuBIOhZUVRFV02zYR+TQqUQLb5lpC1T14KaayQn3y60nQZYtiU13X9iUqC8WPoiPRDj 7zB0VSIgTmtdc4LJ/05Ui9ovDUXqctzYV3h/mISC0mYSNHFRvE3DzZTrvxZE3lQdATF1Ha uyAJ8BgAttgcDuZhelz5zDz+bn1jRFrd3UyUUNUbBBsFOAl48b9bC8Oi7+qcZ8PWOwYMJG yhA0wuQjKa7R6re7dbnJieKArYvy2UuZGbYogYrfMFD2U9zjmF2BlHTtyZ7nXA== MIME-Version: 1.0 Date: Wed, 18 Jan 2023 13:43:17 +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: <8637b95f-5621-87a6-be3f-f29f56c5fa60@denx.de> References: <20230118121224.253241-1-michael@walle.cc> <20230118121224.253241-2-michael@walle.cc> <8637b95f-5621-87a6-be3f-f29f56c5fa60@denx.de> User-Agent: Roundcube Webmail/1.4.13 Message-ID: <5b2aa377d29614c4305895b1f1d76a77@walle.cc> X-Sender: michael@walle.cc Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit 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 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. -michael