From patchwork Fri Jan 24 00:00:20 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Courtney Cavin X-Patchwork-Id: 3532521 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 4D2249F39B for ; Fri, 24 Jan 2014 00:00:05 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 85F66201B6 for ; Fri, 24 Jan 2014 00:00:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A4DC520181 for ; Fri, 24 Jan 2014 00:00:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752966AbaAXAAC (ORCPT ); Thu, 23 Jan 2014 19:00:02 -0500 Received: from seldrel01.sonyericsson.com ([212.209.106.2]:19839 "EHLO seldrel01.sonyericsson.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752734AbaAXAAB (ORCPT ); Thu, 23 Jan 2014 19:00:01 -0500 From: Courtney Cavin To: CC: , Subject: [PATCH 12/15] Input: synaptics-rmi4 - don't immediately set page on probe Date: Thu, 23 Jan 2014 16:00:20 -0800 Message-ID: <1390521623-6491-13-git-send-email-courtney.cavin@sonymobile.com> X-Mailer: git-send-email 1.8.1.5 In-Reply-To: <1390521623-6491-12-git-send-email-courtney.cavin@sonymobile.com> References: <1390521623-6491-1-git-send-email-courtney.cavin@sonymobile.com> <1390521623-6491-2-git-send-email-courtney.cavin@sonymobile.com> <1390521623-6491-3-git-send-email-courtney.cavin@sonymobile.com> <1390521623-6491-4-git-send-email-courtney.cavin@sonymobile.com> <1390521623-6491-5-git-send-email-courtney.cavin@sonymobile.com> <1390521623-6491-6-git-send-email-courtney.cavin@sonymobile.com> <1390521623-6491-7-git-send-email-courtney.cavin@sonymobile.com> <1390521623-6491-8-git-send-email-courtney.cavin@sonymobile.com> <1390521623-6491-9-git-send-email-courtney.cavin@sonymobile.com> <1390521623-6491-10-git-send-email-courtney.cavin@sonymobile.com> <1390521623-6491-11-git-send-email-courtney.cavin@sonymobile.com> <1390521623-6491-12-git-send-email-courtney.cavin@sonymobile.com> MIME-Version: 1.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since at the point of I2C probe, we cannot know if the voltage regulators are on, wait until the physical driver requests a read before setting the page. Cc: Christopher Heiny Cc: Dmitry Torokhov Signed-off-by: Courtney Cavin --- drivers/input/rmi4/rmi_i2c.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/input/rmi4/rmi_i2c.c b/drivers/input/rmi4/rmi_i2c.c index 377d4cc..50ed5fd 100644 --- a/drivers/input/rmi4/rmi_i2c.c +++ b/drivers/input/rmi4/rmi_i2c.c @@ -209,15 +209,8 @@ static int rmi_i2c_probe(struct i2c_client *client, rmi_i2c->xport.proto_name = "i2c"; rmi_i2c->xport.ops = &rmi_i2c_ops; - /* - * 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; - } + /* make sure we set the page on the first write */ + rmi_i2c->page = -1; retval = rmi_register_transport_device(&rmi_i2c->xport); if (retval) {