From patchwork Sat May 7 04:40:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 67308 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp637223qge; Fri, 6 May 2016 21:40:33 -0700 (PDT) X-Received: by 10.67.10.205 with SMTP id ec13mr33669010pad.16.1462596031127; Fri, 06 May 2016 21:40:31 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 62si21883751pfm.150.2016.05.06.21.40.31; Fri, 06 May 2016 21:40:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-input-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; spf=pass (google.com: best guess record for domain of linux-input-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-input-owner@vger.kernel.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751780AbcEGEkX (ORCPT + 1 other); Sat, 7 May 2016 00:40:23 -0400 Received: from mail-pf0-f174.google.com ([209.85.192.174]:34962 "EHLO mail-pf0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751566AbcEGEkQ (ORCPT ); Sat, 7 May 2016 00:40:16 -0400 Received: by mail-pf0-f174.google.com with SMTP id 77so56174946pfv.2 for ; Fri, 06 May 2016 21:40:15 -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=rBxCyXctQCg7TiYCf7RwF0XCK9UjW3FrJz2sYZWc278=; b=Pi5wEyxRmuZTbH2blCb5PpTuCOnA1r/h3k46cAxzkz9oZ66QV6JbKlKCkdM+F8Diqw +Rve6uXqRsanKdv98VdrDKDmQIZOyNM+FcNP63s3y5V+0IweF20aT+tMDVJvo/EvmruA VFmt7SbA1kwLgknW8+h0VM4cDg2RqgWEurssk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=rBxCyXctQCg7TiYCf7RwF0XCK9UjW3FrJz2sYZWc278=; b=NXrH5iQ/HbGwyJXd7RxUYRfALn2Q/cVEEjV9wRSRlqxBNmjAnYQ0YW1eSYghCiZcuK zGJiEUGDVqEpW72Ii/jKDfA267wawpTNEBA5HFDufs3is6gVj8j2LzAYd5JvYoGooFfA oBzG0TUenjbpyXxkV5yA3cPJ49rXVLvwqnWaTDRLGB9TOrpp2OezIdw6/kjKgwtfiTa8 ynLKqXQkax/EIvnH38LhC1Tm9pEZBp8kVWCAJ2/merEKdPyn6kgIUQCzjMAk3j0HqPkE bm6aProVec+ab7u6i7/kM5oFKlPnl9NhPuBBjud0U1RC6zWAiFfcZZb28NdF7Qpkarh/ pB/A== X-Gm-Message-State: AOPr4FWhcqhFXQZavbL4bfGR463Yj97EyaDf2eO9HbTaLIYPwMRMiF+l3HmWDpkuKatMn0FV X-Received: by 10.98.78.132 with SMTP id c126mr33645581pfb.129.1462596014794; Fri, 06 May 2016 21:40:14 -0700 (PDT) Received: from localhost.localdomain (ip68-111-223-48.sd.sd.cox.net. [68.111.223.48]) by smtp.gmail.com with ESMTPSA id k78sm24443222pfk.70.2016.05.06.21.40.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 06 May 2016 21:40:14 -0700 (PDT) From: Bjorn Andersson To: Dmitry Torokhov , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Andrew Duggan , Christopher Heiny Cc: linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 3/3] input: rmi4: Remove set_page() call before core is initialized Date: Fri, 6 May 2016 21:40:08 -0700 Message-Id: <1462596008-21381-4-git-send-email-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1462596008-21381-1-git-send-email-bjorn.andersson@linaro.org> References: <1462596008-21381-1-git-send-email-bjorn.andersson@linaro.org> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org In the case of the chip not already being powered we can't call set_page() before we're letting the core driver enable power to the chip. Signed-off-by: Bjorn Andersson --- drivers/input/rmi4/rmi_i2c.c | 11 ++--------- drivers/input/rmi4/rmi_spi.c | 11 ++--------- 2 files changed, 4 insertions(+), 18 deletions(-) -- 2.5.0 -- To unsubscribe from this list: send the line "unsubscribe linux-input" 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/input/rmi4/rmi_i2c.c b/drivers/input/rmi4/rmi_i2c.c index 18f6a9f4aeef..3e32b320c8d2 100644 --- a/drivers/input/rmi4/rmi_i2c.c +++ b/drivers/input/rmi4/rmi_i2c.c @@ -215,15 +215,8 @@ static int rmi_i2c_probe(struct i2c_client *client, i2c_set_clientdata(client, rmi_i2c); - /* - * Setting the page to zero will (a) make sure the PSR is in a - * known state, and (b) make sure we can talk to the device. - */ - retval = rmi_set_page(rmi_i2c, 0); - if (retval) { - dev_err(&client->dev, "Failed to set page select to 0.\n"); - return retval; - } + /* Invalidate current page to force rmi_set_page() on next access */ + rmi_i2c->page = -1; retval = rmi_register_transport_device(&rmi_i2c->xport); if (retval) { diff --git a/drivers/input/rmi4/rmi_spi.c b/drivers/input/rmi4/rmi_spi.c index f3e9e488635c..36c6912685a7 100644 --- a/drivers/input/rmi4/rmi_spi.c +++ b/drivers/input/rmi4/rmi_spi.c @@ -410,15 +410,8 @@ static int rmi_spi_probe(struct spi_device *spi) if (retval) return retval; - /* - * Setting the page to zero will (a) make sure the PSR is in a - * known state, and (b) make sure we can talk to the device. - */ - retval = rmi_set_page(rmi_spi, 0); - if (retval) { - dev_err(&spi->dev, "Failed to set page select to 0.\n"); - return retval; - } + /* Invalidate current page to force rmi_set_page() on next access */ + rmi_spi->page = -1; retval = rmi_register_transport_device(&rmi_spi->xport); if (retval) {