From patchwork Tue Jun 4 10:44:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 165754 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp5668579ili; Tue, 4 Jun 2019 03:45:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqyVmRpEpaDVmzeYwJpFUzLizCNVCkT+fOIt8cMQqLCnvmpyfYtum/YcfaWk7Tf1Kn/R4eMe X-Received: by 2002:a17:90a:24e4:: with SMTP id i91mr15090432pje.9.1559645142171; Tue, 04 Jun 2019 03:45:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559645142; cv=none; d=google.com; s=arc-20160816; b=gnVMwkJ9V38NtiGIbJR6ovewOgJjJfWWMR2R8tM1/z8GkfbU1Zt/RYQEGpO6DLHQLB NV2nFHpvc/uMzZJt+a9PjoFfkC3AM7dEvyIQ2jbjWsXHpjr8Yakw41DklmMHMzPOIeDG jImCxVxc8HdbZnk0N9wAYQp4Lybcd6eXN/NiavX3XctEya6sbhD+adtg9FV2r2B2lPUQ OF1/Xukr/Cx/sWK7EWA6GhVlvSDNxr3z1SYHwpQ8p+XjCcGjiv/1kfETYvYL2o85kKSO m10Py/RS1vOikzqPVB0+Hvsafnr7e32/W7vxOaHOuhgr2flEn6XYVuUWpRXOwRJnxCQW u0nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=FFbRmXkMAE6sjv34a7ljnhiVGkAFw+tIZvmrUIY2GGo=; b=k1uDuuDpwjf96sGam7dxCO0ORoxLDzQhiHWIdVp545RiJb6Oqmy+6sdNhZcq17CI7N ePpQLTb3tvmkXPubeZje+GSbQP6k6JyNfGNRya9brjPmIISz9mzN6CcrdEQt98kzmSBP XasLFhZWnb0uX4b1dsiv3qxxJpBuoGfF1NAZTCtpOtRbcofrS8VJrolbL5+4Wz4k+YNm JtwfTqLKjx+yf034eIw04/iaTY3VvVjh6KRMs421a0BKZvLdMggulz4ChDiELEeyYOHA 50neZsHDZneBmkZ6LK+6RpB+d1uEjm+mwH8OL2ILNGMkb08RJFOW04SlQjLK805r7xjS 2EBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Y6qiFnTJ; spf=pass (google.com: best guess record for domain of linux-i2c-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-i2c-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 l15si13532451pgm.548.2019.06.04.03.45.41; Tue, 04 Jun 2019 03:45:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-i2c-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=Y6qiFnTJ; spf=pass (google.com: best guess record for domain of linux-i2c-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-i2c-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 S1727394AbfFDKpC (ORCPT + 2 others); Tue, 4 Jun 2019 06:45:02 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:43224 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727306AbfFDKpB (ORCPT ); Tue, 4 Jun 2019 06:45:01 -0400 Received: by mail-wr1-f66.google.com with SMTP id r18so6265690wrm.10 for ; Tue, 04 Jun 2019 03:45:01 -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:in-reply-to:references; bh=FFbRmXkMAE6sjv34a7ljnhiVGkAFw+tIZvmrUIY2GGo=; b=Y6qiFnTJ1MRpHUuCgNqujGVCKMSi3o1dTrg5paygrkOoY89q1o3/qKqVZda1lpsOEk aepjpT3mjU4Jdjty6fQnmvWB2Tz0hwigSNf52sJspJ7fiUowJiz/3HxN7sLf0BmtbclX 1CYvUvUFCgmtIh5WO9E92aRfTfvmY2qVMebf3kSoqAxRiszD6jflq0TsLoqUZjsmMflP 5Nn+i2AxwRqEHDKXGQFLfnIWghiz1Yx68Qod0Tn9bIasPgvwp/o0HsX32zKdRxB2q94L fedstP7MFi1DjVWWZ6Z6IVAdw+r6UsQ3ZyYEisYtl/QOcYnyFQBNJ07J8Ab2SH71T4nd i7gA== 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:in-reply-to :references; bh=FFbRmXkMAE6sjv34a7ljnhiVGkAFw+tIZvmrUIY2GGo=; b=k5gijm8y52VoqmkLAsQjMSpidpR/hz+4Eu8opTs1SDM9i3xThyw6DLxEeIvl1e0Jg3 J1VYzY4FhjsW1uBs2iVt1z++0KEuFxRgtTJftMWnjob+Wy+MOFMpcJUyRsIob/9Hv2bw eUUi2fDGHcVHHi/d9xJNIf8B0XQ0ffKfqER7nSR8NnEs0uQiPvkwj6cclFK6ZtvrTIq2 7pfA7Nb/bB0jcIZo1sqse6bDjHa22uh16VeoNsQPrbKlnkDgXhUhCxZ+rENMwM5VsDs6 tODbyJDaaMnxMfiS+doUWhKpfuZBHw7xJ6gbAviJehdSmqr4mBoJkV2ElAQ1oJYoEyLI SMlQ== X-Gm-Message-State: APjAAAWwv8/xTUiP5dotEsMP7+zMknQbzrxlYqpCwVKN8/eOzbo2TvsQ XJ4566eQRbVHw4fB+3HJDnJFKw== X-Received: by 2002:adf:ce03:: with SMTP id p3mr21460783wrn.94.1559645100592; Tue, 04 Jun 2019 03:45:00 -0700 (PDT) Received: from localhost.localdomain ([2.27.167.43]) by smtp.gmail.com with ESMTPSA id t140sm2718623wmt.0.2019.06.04.03.44.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Jun 2019 03:45:00 -0700 (PDT) From: Lee Jones To: alokc@codeaurora.org, kramasub@codeaurora.org, andy.gross@linaro.org, david.brown@linaro.org, wsa+renesas@sang-engineering.com, bjorn.andersson@linaro.org, linus.walleij@linaro.org, balbi@kernel.org, gregkh@linuxfoundation.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, jlhugo@gmail.com, linux-i2c@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-gpio@vger.kernel.org, linux-usb@vger.kernel.org, Lee Jones Subject: [PATCH 2/8] i2c: i2c-qcom-geni: Signify successful driver probe Date: Tue, 4 Jun 2019 11:44:49 +0100 Message-Id: <20190604104455.8877-2-lee.jones@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190604104455.8877-1-lee.jones@linaro.org> References: <20190604104455.8877-1-lee.jones@linaro.org> Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org The Qualcomm Geni I2C driver currently probes silently which can be confusing when debugging potential issues. Add a low level (INFO) print when each I2C controller is successfully initially set-up. Signed-off-by: Lee Jones --- drivers/i2c/busses/i2c-qcom-geni.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.17.1 diff --git a/drivers/i2c/busses/i2c-qcom-geni.c b/drivers/i2c/busses/i2c-qcom-geni.c index 0fa93b448e8d..e27466d77767 100644 --- a/drivers/i2c/busses/i2c-qcom-geni.c +++ b/drivers/i2c/busses/i2c-qcom-geni.c @@ -598,6 +598,8 @@ static int geni_i2c_probe(struct platform_device *pdev) return ret; } + dev_info(&pdev->dev, "Geni-I2C adaptor successfully added\n"); + return 0; } From patchwork Tue Jun 4 10:44:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 165753 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp5668390ili; Tue, 4 Jun 2019 03:45:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqyRAF1+lnFj8Xsc0kksGtHCKrPJ/PNBrrhhDJqVFTpELycRdJryms+LVVXur3zxs7t1NyGF X-Received: by 2002:a17:90a:2562:: with SMTP id j89mr21536236pje.123.1559645131583; Tue, 04 Jun 2019 03:45:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559645131; cv=none; d=google.com; s=arc-20160816; b=wCztG0QcLZ/umvjVgl5y7LAPMpraPoTkJqf462eDfDV45NvD/kbS/idSNFyTK9z6tE 5QP1q6cJckKVegIsuH/UJdwATLNuE2rW7yT0dsFXMKLdB9Q3IGKNbVditO4Yr5cB3g+i 6hCBdZf8YmRxO1tUiReF25Eqe0f5O0Csq204KG+YltsvMYBnmzBXOwwbHA6jYMKQww+H EytyowrdRhkV8J/j6xPvjHvTOmqvjQAFodJ1dkt9YgosDEtgpjAK7CyKTOUOHAMdv7/M UOF/jr8dWBea1qWTmsP+EYuLyKFpXUyFsvNZ7wP+5VHgOUyqHJA19sEbxsWW45wLS+SF 823g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=Ixa6PZM7Qd3yNTQ1/2lb9UJukHzNBYD4+3OM8ec4OSs=; b=DRW5NL7H/pmmpRB3rp50FPdwc9crzV1n4RDNwCX3clHLODSYh+1f98t4qM5r7gfG79 fWKSClbgDq9/YANhXwOS3NC4JdWZHIWflB7hWq4Giis4O3Khndk/qdRrItXvfuNERpcT 4qOGxfYhQzZIHR5E3PRMiZgvQuvDeVjR+vq+N564nJW+0rKctwXO0XAgD4o2mzLEeYTP DedLQ0nxvTjFjnft8z6mGx2xgfow4FR/3GMG8j6lQjjlewAS2ipfwairYBCVE2BpqRYU VZ7CWAxNf068X7/snjgQT/rXNngDT9mh6Xc8Y3XCGFc4Ai0b82s2CCvpGWbuPLQJUPbC jgEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SrM3zAvH; spf=pass (google.com: best guess record for domain of linux-i2c-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-i2c-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 g18si17582783plq.104.2019.06.04.03.45.31; Tue, 04 Jun 2019 03:45:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-i2c-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=SrM3zAvH; spf=pass (google.com: best guess record for domain of linux-i2c-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-i2c-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 S1727423AbfFDKpa (ORCPT + 2 others); Tue, 4 Jun 2019 06:45:30 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:45066 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727437AbfFDKpF (ORCPT ); Tue, 4 Jun 2019 06:45:05 -0400 Received: by mail-wr1-f68.google.com with SMTP id f9so552668wre.12 for ; Tue, 04 Jun 2019 03:45:04 -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:in-reply-to:references; bh=Ixa6PZM7Qd3yNTQ1/2lb9UJukHzNBYD4+3OM8ec4OSs=; b=SrM3zAvHO7s4r4kfWRb3yKeFRE5PBTe75g4T6jp6QVLZ+DbjYiqMYZ/caaJl2svogL Dho1YX4HBmmhcjNwienKNpKLHxULynaK4RwnoYB8aEOifJlkpTWldE/+L9a6CBOW2SBV 8TY+kVlRP8QzflACyJFTgmXnlx9rJAUzH4CNwmMUfhVqaznt97K1fxCP8/Zawp6/IgVv nclsKzImAAkMxU8Y2NicxZ+aWSjqdzGCXD6Uy2EN7XkkhnMLxpGxX+mLyl/mAhj77crl 3OedRVGkpp68L5HrhDth6eUQCdIJppx09j67O+gWfpNvj+pXqJRqm3HD5nbQBk9OGfYV t2xQ== 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:in-reply-to :references; bh=Ixa6PZM7Qd3yNTQ1/2lb9UJukHzNBYD4+3OM8ec4OSs=; b=U4kkGlFR0AoJuAImCSda++IcVPeR5p15MYy9jr9qBFTtjwuwRnKVGEjBv9P1YjB8TN 2qTJpgfvi4zYQ3k2aEkkBz/h8kOZeK1hIKiTIsw/TWBsNd/SDqo8I2qemEr9EWidWZGr vgj3t2snLPcyPDGQi8DHw7EV7jUcmb3uB6RCyLuHB0NHVhlVZQMgG+9Tx4fZl5J6eTaD OcxfyOKmEDOtZ4sP4qQ6lA23m+GSK3rYBy6T6aN+sxuTioaN+1rjaqFv21Q0EiM+Mf/l 22PVpgkrShQZB7XhYrCIVFjjqlCkws68heIWksjPJVsc8ufImjZXJHxtrLyxMsrEyYYJ mSbQ== X-Gm-Message-State: APjAAAVhEhgJujO1XOSd/dlpSQYZIenC11x3cNU/WsLR3FQq3gOY5/Q6 sBzQL9JigXsxV0uMPEGhzl6CbA== X-Received: by 2002:adf:e286:: with SMTP id v6mr6228022wri.340.1559645103884; Tue, 04 Jun 2019 03:45:03 -0700 (PDT) Received: from localhost.localdomain ([2.27.167.43]) by smtp.gmail.com with ESMTPSA id t140sm2718623wmt.0.2019.06.04.03.45.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Jun 2019 03:45:03 -0700 (PDT) From: Lee Jones To: alokc@codeaurora.org, kramasub@codeaurora.org, andy.gross@linaro.org, david.brown@linaro.org, wsa+renesas@sang-engineering.com, bjorn.andersson@linaro.org, linus.walleij@linaro.org, balbi@kernel.org, gregkh@linuxfoundation.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, jlhugo@gmail.com, linux-i2c@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-gpio@vger.kernel.org, linux-usb@vger.kernel.org, Lee Jones Subject: [PATCH 5/8] soc: qcom: geni: Add support for ACPI Date: Tue, 4 Jun 2019 11:44:52 +0100 Message-Id: <20190604104455.8877-5-lee.jones@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190604104455.8877-1-lee.jones@linaro.org> References: <20190604104455.8877-1-lee.jones@linaro.org> Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org When booting with ACPI as the active set of configuration tables, all; clocks, regulators, pin functions ect are expected to be at their ideal values/levels/rates, thus the associated frameworks are unavailable. Ensure calls to these APIs are shielded when ACPI is enabled. Signed-off-by: Lee Jones --- drivers/soc/qcom/qcom-geni-se.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) -- 2.17.1 diff --git a/drivers/soc/qcom/qcom-geni-se.c b/drivers/soc/qcom/qcom-geni-se.c index 6b8ef01472e9..cff0a413e59a 100644 --- a/drivers/soc/qcom/qcom-geni-se.c +++ b/drivers/soc/qcom/qcom-geni-se.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 // Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. +#include #include #include #include @@ -450,6 +451,9 @@ int geni_se_resources_off(struct geni_se *se) { int ret; + if (ACPI_HANDLE(se->dev)) + return 0; + ret = pinctrl_pm_select_sleep_state(se->dev); if (ret) return ret; @@ -487,6 +491,9 @@ int geni_se_resources_on(struct geni_se *se) { int ret; + if (ACPI_HANDLE(se->dev)) + return 0; + ret = geni_se_clks_on(se); if (ret) return ret; @@ -724,12 +731,14 @@ static int geni_se_probe(struct platform_device *pdev) if (IS_ERR(wrapper->base)) return PTR_ERR(wrapper->base); - wrapper->ahb_clks[0].id = "m-ahb"; - wrapper->ahb_clks[1].id = "s-ahb"; - ret = devm_clk_bulk_get(dev, NUM_AHB_CLKS, wrapper->ahb_clks); - if (ret) { - dev_err(dev, "Err getting AHB clks %d\n", ret); - return ret; + if (!ACPI_HANDLE(&pdev->dev)) { + wrapper->ahb_clks[0].id = "m-ahb"; + wrapper->ahb_clks[1].id = "s-ahb"; + ret = devm_clk_bulk_get(dev, NUM_AHB_CLKS, wrapper->ahb_clks); + if (ret) { + dev_err(dev, "Err getting AHB clks %d\n", ret); + return ret; + } } dev_set_drvdata(dev, wrapper);