From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9BC62C4332F for ; Fri, 18 Nov 2022 21:32:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229666AbiKRVb6 (ORCPT ); Fri, 18 Nov 2022 16:31:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229483AbiKRVb6 (ORCPT ); Fri, 18 Nov 2022 16:31:58 -0500 X-Greylist: delayed 9630 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Fri, 18 Nov 2022 13:31:57 PST Received: from mail.3ffe.de (0001.3ffe.de [159.69.201.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 508D877222; Fri, 18 Nov 2022 13:31:57 -0800 (PST) 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 AB6681382; Fri, 18 Nov 2022 22:31:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2022082101; t=1668807115; 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=jhsoQZGuusQB+cmhOr0OjTamtUUcvXLkhCvJFGQv/dM=; b=dyqmJDrhlD49WDtt67kx3e41wuqADtomYJdL3P9JWqaY9HodYZSEwm66ELysqQdEuRFCGm d4gR1HQJnixVwcD8QqsnKVeQz4wJ1usztknklJQEZiFpqBbBOLrtVlhoB/SOhHIdu4KQex /dhB5zAMYT2ch4k5OQWd261mx0G15jDeUkm0hWn6hZ0DFgZNwNS19KS9VuztfAw6hIrHf+ NocsD8ySWtxr72mPW+uWo5Y4KHVihNz66+5MD+z+3lwI40i5guJCIoKng3ni67NSQeXdG5 ppwKu3g5rV8hu9RKpiINMWfGsseo3Hy+TO6oCRTGHcWlxMQ8yvOwOoij2W1OIg== MIME-Version: 1.0 Date: Fri, 18 Nov 2022 22:31:55 +0100 From: Michael Walle To: Jonathan Corbet , Srinivas Kandagatla , Miquel Raynal , Rob Herring , Frank Rowand Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, Rob Herring Subject: Re: [PATCH v3 02/18] of: base: add of_parse_phandle_with_optional_args() In-Reply-To: <20221118185118.1190044-3-michael@walle.cc> References: <20221118185118.1190044-1-michael@walle.cc> <20221118185118.1190044-3-michael@walle.cc> User-Agent: Roundcube Webmail/1.4.13 Message-ID: <8b976cf546bad3aa159a6f05cd3c15d1@walle.cc> X-Sender: michael@walle.cc Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-doc@vger.kernel.org Am 2022-11-18 19:51, schrieb Michael Walle: > Add a new variant of the of_parse_phandle_with_args() which treats the > cells name as optional. If it's missing, it is assumed that the phandle > has no arguments. > > Up until now, a nvmem node didn't have any arguments, so all the device > trees haven't any '#*-cells' property. But there is a need for an > additional argument for the phandle, for which we need a '#*-cells' > property. Therefore, we need to support nvmem nodes with and without > this property. I've just noticed that this isn't enough. We also need to fix the parsing in drivers/of/property.c, otherwise spurious device links will be created because the phandle argument is treated as a phandle itself. -michael From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A6C3EC433FE for ; Fri, 18 Nov 2022 21:33:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-ID:References:In-Reply-To:Subject:Cc:To:From :Date:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ON1ZI51p5l3v9rd4MPD/LYRvusHlbVr9Kx4IKfQWBAA=; b=rTt15LZq1YrXTCJqJIS9Ebwwrz 8xOQZnAp18IrnZOlrO9LDdrxJ70TMvallrTJo8HfjGdEKSsL9TgcCPA6xKxAWiHSzTTiOIxOwGxtE ur/9RxdELRUFC9RcYAhxYanDuh6Eeihb9korPv7a0WN0eRqGiOZw/Y2QH6yj8KcCqBvITV0B/dJ6S xmAF2ovCcvYfXDoAZNrvf+3EZpWc+wAALeDE7pJqIaGxv7C+Ie9Dj/Q9mqFkCQy//0Gui6mNyF0r3 9mGKWNsAu5G8fZQKU4bUIpgU4LS6RvW9Hw+xbUCYKcVVx/jcda8b3BrYERHqwbQ3wvx7JtvdonHEe wUzmKmng==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ow8xv-008C7s-54; Fri, 18 Nov 2022 21:32:03 +0000 Received: from 0001.3ffe.de ([159.69.201.130] helo=mail.3ffe.de) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ow8xr-008C6I-Iq for linux-arm-kernel@lists.infradead.org; Fri, 18 Nov 2022 21:32:01 +0000 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 AB6681382; Fri, 18 Nov 2022 22:31:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2022082101; t=1668807115; 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=jhsoQZGuusQB+cmhOr0OjTamtUUcvXLkhCvJFGQv/dM=; b=dyqmJDrhlD49WDtt67kx3e41wuqADtomYJdL3P9JWqaY9HodYZSEwm66ELysqQdEuRFCGm d4gR1HQJnixVwcD8QqsnKVeQz4wJ1usztknklJQEZiFpqBbBOLrtVlhoB/SOhHIdu4KQex /dhB5zAMYT2ch4k5OQWd261mx0G15jDeUkm0hWn6hZ0DFgZNwNS19KS9VuztfAw6hIrHf+ NocsD8ySWtxr72mPW+uWo5Y4KHVihNz66+5MD+z+3lwI40i5guJCIoKng3ni67NSQeXdG5 ppwKu3g5rV8hu9RKpiINMWfGsseo3Hy+TO6oCRTGHcWlxMQ8yvOwOoij2W1OIg== MIME-Version: 1.0 Date: Fri, 18 Nov 2022 22:31:55 +0100 From: Michael Walle To: Jonathan Corbet , Srinivas Kandagatla , Miquel Raynal , Rob Herring , Frank Rowand Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, Rob Herring Subject: Re: [PATCH v3 02/18] of: base: add of_parse_phandle_with_optional_args() In-Reply-To: <20221118185118.1190044-3-michael@walle.cc> References: <20221118185118.1190044-1-michael@walle.cc> <20221118185118.1190044-3-michael@walle.cc> User-Agent: Roundcube Webmail/1.4.13 Message-ID: <8b976cf546bad3aa159a6f05cd3c15d1@walle.cc> X-Sender: michael@walle.cc X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221118_133159_822160_D05076B5 X-CRM114-Status: GOOD ( 11.55 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Am 2022-11-18 19:51, schrieb Michael Walle: > Add a new variant of the of_parse_phandle_with_args() which treats the > cells name as optional. If it's missing, it is assumed that the phandle > has no arguments. > > Up until now, a nvmem node didn't have any arguments, so all the device > trees haven't any '#*-cells' property. But there is a need for an > additional argument for the phandle, for which we need a '#*-cells' > property. Therefore, we need to support nvmem nodes with and without > this property. I've just noticed that this isn't enough. We also need to fix the parsing in drivers/of/property.c, otherwise spurious device links will be created because the phandle argument is treated as a phandle itself. -michael _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel