From patchwork Tue Apr 10 09:05:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 133064 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp1086225ljb; Tue, 10 Apr 2018 02:05:34 -0700 (PDT) X-Google-Smtp-Source: AIpwx48Un/0OYSkgIz9zdQQdyXRLzIsTMAkysAIudBPGMqg3G3z4xSncmaOUrolWy5BTFmy18nSS X-Received: by 2002:a17:902:b2c7:: with SMTP id x7-v6mr5544438plw.124.1523351133876; Tue, 10 Apr 2018 02:05:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523351133; cv=none; d=google.com; s=arc-20160816; b=Wgc6LV7ROVJ1u7pOC3skP0anedsub+411vty9fjOqvPdzGV+Hvz0Y/w7QrU7UYQ8gC Y99wtAox8vfPkyeR8oC70+2xllBEf1MMTJQZKHpFNiKDTh7fq79wNFhpnAnBUBP0VgI4 36xkoRl93WMcgzv0itQLu+tm8eovLDVHVXD5a/g+rM3QJdzfBAWdJHyxDQPKovE1uHwQ oJE9Q3xskdKOMXXLxZJbilzwVjuu/UVbCq59XpjEXwYnke7OT6VkOX2EHgAfUgVKGUgU QyNylkM2XBJM4ai5oRYgZsbdMhmPJvHtDEPFbKvSYIq0ykTKPAOg5XIWiGrfaYDMx/KG zfWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=NzU4PV3LvQJRMs4wGmpCWlckc4J6646DJflnCvmFnrI=; b=sycUk2sqYJF0OgF9lHYDkU3M5I2QeNXBs5nxCP6rn/1J7aef9GfyNza36ePuJyecVn 4IUIfwAw2sOTxhm3WlwwC/reWsCF/XaGih/vjLsYJV+tMhN+eCU2KySmEBkuztzf91wp 6cu63SJQkki1yud8DMv7/EZrx4tVylXJv2XuwyPu8PnrMoIhAO/zejoWIAZ22Clu6SU6 Bkx0CZr7tTuzfKhzY3JfzQOSFBC84yCSWB1/XGF5TDejHCgCgLNGZ+3sKhGTlR0inGn9 3WUL3r0X4IWwrWJ5ZyjX5JFwtgl97t2KGhXVAslhZRGRAT2vE8cB/H7EnkYaKCs0bkuW q6Yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fYaifv+G; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k8si1472044pgt.786.2018.04.10.02.05.33; Tue, 10 Apr 2018 02:05:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fYaifv+G; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752920AbeDJJFa (ORCPT + 29 others); Tue, 10 Apr 2018 05:05:30 -0400 Received: from mail-pl0-f65.google.com ([209.85.160.65]:41998 "EHLO mail-pl0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752487AbeDJJF2 (ORCPT ); Tue, 10 Apr 2018 05:05:28 -0400 Received: by mail-pl0-f65.google.com with SMTP id t20-v6so4218000ply.9 for ; Tue, 10 Apr 2018 02:05:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=NzU4PV3LvQJRMs4wGmpCWlckc4J6646DJflnCvmFnrI=; b=fYaifv+GB/2f8ovX7fTPTa1O2RfAPbpim14cQr6lFDZGdnF4Ny/wsdOn1niv4lALJk SyK1B/0/JVG04l7MzAuwYsMqXKMJLgWK9+aTqYD043naQ3e5jRGOphEEPmJAK2v2Ud3E RPpm824iLS7bfqKHNEU1KL/tARbO+XImqWCEg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=NzU4PV3LvQJRMs4wGmpCWlckc4J6646DJflnCvmFnrI=; b=smQToEN9KK5GLY0vFZ1tRvbTx85UCGMpRIm6uX1QGKaQBZIHBu5LLoLmlljij9XftY 90Ugh39IsO1vGJH7PdzZsMJNNFUdq0/AFcsokPlI/oPmuEBVjKpM5GQOXmYISHX/EW+P oMDkmKdt5yWpGER3gUC+VuBYdA8NLfK6sqgvt1IdXOTnsQkEb2NBxtmfmMEZ/JQ5DHUI YxRYLt6N5YcOEqghYF64cG2hpnLRib6JFljPAlEQK0xSz23YqukCe+XtDHKB4hx0SDWW Rv3rpXFWh5GsyVn2+aU4RVWULur43gcTowkINP5WhI4q8cyD4gIkWu09k2F2rqYirjqQ 7Kdg== X-Gm-Message-State: AElRT7F8Ys0qcgiEnzJ1CGyYF96bx9hfKWEHOF5vgY2y+RMBivIv+nft dFB5GfglXjBQ3AxhN8yFo4DEuxSj/YI= X-Received: by 2002:a17:902:3084:: with SMTP id v4-v6mr43111216plb.262.1523351127660; Tue, 10 Apr 2018 02:05:27 -0700 (PDT) Received: from localhost ([122.171.228.188]) by smtp.gmail.com with ESMTPSA id e18sm2513359pgt.44.2018.04.10.02.05.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Apr 2018 02:05:26 -0700 (PDT) From: Viresh Kumar To: Rob Herring , Frank Rowand Cc: Viresh Kumar , Vincent Guittot , linux-kernel@vger.kernel.org, Stephen Boyd , devicetree@vger.kernel.org Subject: [PATCH] of: Don't create platform device for OPP tables Date: Tue, 10 Apr 2018 14:35:22 +0530 Message-Id: X-Mailer: git-send-email 2.15.0.194.g9af6a3dea062 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The OPP tables are present as separate nodes, whose phandle is used in the "operating-points-v2" property of devices. Currently the OF core creates a platform device for the OPP table unconditionally, which is not used by any kernel code. Skip creating OPP table platform devices. Reported-by: Stephen Boyd Signed-off-by: Viresh Kumar --- drivers/of/platform.c | 6 ++++++ 1 file changed, 6 insertions(+) -- 2.15.0.194.g9af6a3dea062 diff --git a/drivers/of/platform.c b/drivers/of/platform.c index c00d81dfac0b..aaae5d90433d 100644 --- a/drivers/of/platform.c +++ b/drivers/of/platform.c @@ -356,6 +356,12 @@ static int of_platform_bus_create(struct device_node *bus, return 0; } + /* OPP tables have separate nodes, but we don't want devices for them */ + if (unlikely(of_device_is_compatible(bus, "operating-points-v2"))) { + pr_debug("%s() - skipping OPP node %pOF\n", __func__, bus); + return 0; + } + if (of_node_check_flag(bus, OF_POPULATED_BUS)) { pr_debug("%s() - skipping %pOF, already populated\n", __func__, bus);