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 9ADD1C678DC for ; Wed, 18 Jan 2023 13:08:45 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4617585103; Wed, 18 Jan 2023 14:08:43 +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=1674047323; bh=AsAMh9Bdn0yvAIa4TNxz7OeMF+cnn3UEhaAGLOIGcEQ=; h=Date:Subject:To:Cc:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=ps4mdxwWijm7Z3JxOFA3VqHzRhFHiAZ/NV0ymjo+98lSStTjNNc6sNs7o/i6jl6wU XGhlTWb/onX2aTWJhTrVkzp19piDv+w87L6oHR5n8uNqWVfxeQ/RAuRjH2mF1PNtQD cgT02N0pvYxf28fYYi6mNyk181snOYOQ21LaKGKE488V8bEmjdU8XAlF5dnFHCpr50 K/Vmo5iUgLHG1h5CS+ldOsElKG1Eb4TMa5tE441dtOep75AvYdvGONCma5oT4hIeFf /ZA/7euL1IWKJ5k8YEfNdQIHyATU0UQeHAlPv/r/RsYqnHINdXoEBMiRSDPwG6qAk4 U8IPDAJ0dF7IQ== 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 DAC2D84D64; Wed, 18 Jan 2023 14:08:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1674047322; bh=AsAMh9Bdn0yvAIa4TNxz7OeMF+cnn3UEhaAGLOIGcEQ=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=b3codqpyK51u03hDIlB0FyC/jMydQX8+lV00EW1rZXvPABRvovQZlvjV8ZFkTaUCe 5ARiiGPGegk2rl/ELA/L5v14x4fmLmNqmjtAGy30vugy5TFvapLNIALV2hiNKbEUsb smnjJs8YmHF78SSb+QR5Yw2BKMgOMX+15N9i77Tns14wkTfdt3hCkY+1BhGp26tMDj h+B5C3gX8jwQf2NBRW8yUOb+XeEmwQqAdz3kINMyTw8Fc1WKdxB1dqdK+zC8Q+B7Ye MQ0TdFQ2/nSyfB0rI/BolnTlIjChq1KQqQoGCO5aNISKJyCzNar42TKX/jzNRSaBeX aKnJQXOrEa9KA== Message-ID: Date: Wed, 18 Jan 2023 14:08:41 +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: <5b2aa377d29614c4305895b1f1d76a77@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 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 ?