From patchwork Mon Apr 16 07:26:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 133438 Delivered-To: patch@linaro.org Received: by 10.46.84.18 with SMTP id i18csp3264307ljb; Mon, 16 Apr 2018 00:26:53 -0700 (PDT) X-Google-Smtp-Source: AIpwx49eO/wb6LcJzdQbFSi1bD9SDZJAzZCcQ4mnArv7uiZgQpN/4SECnda/3mBTaBMVgUExbWgK X-Received: by 10.99.107.65 with SMTP id g62mr11819047pgc.180.1523863613342; Mon, 16 Apr 2018 00:26:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523863613; cv=none; d=google.com; s=arc-20160816; b=BVqGSrgRuW8/BmcRLgxIaYfgHpG9XUhn/T3PtG/bP0OJ+s/ZJRWPPUfCZ0xG9irEbv IKAXrHyr+UvPylHAX6qkfcaJ/ixuYqCkBFCusJewcaN+/yyjn23wI74ScbZUspM9IHlR ptWuEAVXKzPD7w2eUSxRpuF4aaV2KEma24bsbOUUoIUmfBJP8j2XiPw6BjNqkA87EHjJ IUXG7zS93WRubBgJZBlFlia4SUre/Xwi3BzCD9meOIs56cUulFKm3sFFm8RbcqipN4tS eVKkgwH8nHPseugx6anuU14l3YaLxU0Rfr70eMA7QaPKAFoQg0+q2xO+Y+biXgHKACm8 DBuw== 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=nymHhtY2E27fTXR6t1mXyHJk9f8BcpCaUQp6TcG9bqM=; b=IhPNu5H385RFhMVsJQDXVwu45pjVN3Rifx1o6qFGYOa5qt+/RGUQC0YM9EnOz5zJTo XPCszc07pSBOFsKcP7J5m5OeGnKdiKP2+zL6rZQzBDNd/ybFb88FlglpIh5e1Jf9XWE4 Qe+ta3M2AbGRDp3G8YxHPdMJaO+0VfXjwDYTE+mnwpCPD6qrJV19wCTrg2dVwa0KcZtW UZPRZbUY3ErPPwEWY+h8iPqqFIwI/mhmUZsp6pVksmV7TeJcrrZ8shzW/pLfkBCyuElm lriWaq8qv6iVagfiW+Q/zrtwVcXA+0Dj8t9b1ntbGpbRfXqg06lhVXuIsI55iQDvfLhJ bqxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=XH8ZQDl0; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (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 59-v6si5092176plc.103.2018.04.16.00.26.53; Mon, 16 Apr 2018 00:26:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=XH8ZQDl0; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754015AbeDPH0u (ORCPT + 6 others); Mon, 16 Apr 2018 03:26:50 -0400 Received: from mail-pg0-f65.google.com ([74.125.83.65]:42234 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753999AbeDPH0l (ORCPT ); Mon, 16 Apr 2018 03:26:41 -0400 Received: by mail-pg0-f65.google.com with SMTP id e12so3406802pgn.9 for ; Mon, 16 Apr 2018 00:26:41 -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=T56BmZygiB1C+1HBOpO0yBheHzNav9NSPpg2TO5/5Y0=; b=XH8ZQDl0FDEBkvHl8tu4P/X5834TkfI0jIzLcpdVTjeAVxoDJpkxgIgauI+fzUtl4g 2vFNbZqA5qJd5iS16LvnJDE5meoszPzXBeP9biYr+3r9cOYLU5DtJxa5foSnOA1BItPK BmBmLsHBtaPEiapWrU8gO5QpieOeZqdAfvGA8= 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=T56BmZygiB1C+1HBOpO0yBheHzNav9NSPpg2TO5/5Y0=; b=rki9ISYFtIW+cjY9jMA3rqQzs7q0Toxur/1rUe3s3QO5W0yOOmJ3INnXHD/ayXdy7U jwPaEE92JT4FKPE0IC2froLHtuf4LAD6tvoBwGf4y7f5axl5JAANQw3bJdIrbNf2RJ/J HV2Vcygm9g8IwHUYMNnNSu7R2dThzB71MIvgpZGsmJmFIkEtcWDFCDdRedbwz81gVD/v lafKq9cYTJY78foT50XVkUaT8ok22wJagMwgfI/rEBQoQJpoO5W6W4tyzFuLj1ZjAacd UZJ0GsUsmbVr0/71r9EPatKUIJHswiwM+GRled57/DbY06RUtkzA0hcxsbVrGdycOG4F 5IPw== X-Gm-Message-State: ALQs6tA2rJKmbQgj1wL5xlLrZoY6v7gw/d+1lju2tdIztxKjzOVLjs73 4fPBl8Z5vTecABMi6/eynil1fg== X-Received: by 10.99.103.67 with SMTP id b64mr12215795pgc.14.1523863600968; Mon, 16 Apr 2018 00:26:40 -0700 (PDT) Received: from localhost ([122.171.228.188]) by smtp.gmail.com with ESMTPSA id t65sm22678121pfe.174.2018.04.16.00.26.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Apr 2018 00:26:40 -0700 (PDT) From: Viresh Kumar To: Rob Herring , Frank Rowand Cc: Viresh Kumar , Vincent Guittot , Stephen Boyd , devicetree@vger.kernel.org Subject: [PATCH V2] of: Don't create device for OPP tables Date: Mon, 16 Apr 2018 12:56:21 +0530 Message-Id: <469dfad07762787ea2cf446d71d355c0b5d969b3.1523863527.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.15.0.194.g9af6a3dea062 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@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 device for the OPP table unconditionally, which is not used by any kernel code. This patch creates another OF device_id table for the nodes which must be skipped while creating devices and OPP is the only user of it for now. Reported-by: Stephen Boyd Signed-off-by: Viresh Kumar Reviewed-by: Stephen Boyd --- V1->V2: - Added Reviewed-by from Stephen. - Created a table for nodes to be skipped. drivers/of/platform.c | 11 +++++++++++ 1 file changed, 11 insertions(+) -- 2.15.0.194.g9af6a3dea062 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/of/platform.c b/drivers/of/platform.c index c00d81dfac0b..93aff2bf56f9 100644 --- a/drivers/of/platform.c +++ b/drivers/of/platform.c @@ -32,6 +32,11 @@ const struct of_device_id of_default_bus_match_table[] = { {} /* Empty terminated list */ }; +const struct of_device_id of_skipped_node_table[] = { + { .compatible = "operating-points-v2", }, + {} /* Empty terminated list */ +}; + static int of_dev_node_match(struct device *dev, void *data) { return dev->of_node == data; @@ -356,6 +361,12 @@ static int of_platform_bus_create(struct device_node *bus, return 0; } + /* Skip nodes for which we don't want to create devices */ + if (unlikely(of_match_node(of_skipped_node_table, bus))) { + pr_debug("%s() - skipping %pOF node\n", __func__, bus); + return 0; + } + if (of_node_check_flag(bus, OF_POPULATED_BUS)) { pr_debug("%s() - skipping %pOF, already populated\n", __func__, bus);