[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1462596008-21381-4-git-send-email-bjorn.andersson@linaro.org>
Date: Fri, 6 May 2016 21:40:08 -0700
From: Bjorn Andersson <bjorn.andersson@...aro.org>
To: Dmitry Torokhov <dmitry.torokhov@...il.com>,
Rob Herring <robh+dt@...nel.org>,
Pawel Moll <pawel.moll@....com>,
Mark Rutland <mark.rutland@....com>,
Ian Campbell <ijc+devicetree@...lion.org.uk>,
Andrew Duggan <aduggan@...aptics.com>,
Christopher Heiny <cheiny@...aptics.com>
Cc: linux-input@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH v2 3/3] input: rmi4: Remove set_page() call before core is initialized
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 <bjorn.andersson@...aro.org>
---
drivers/input/rmi4/rmi_i2c.c | 11 ++---------
drivers/input/rmi4/rmi_spi.c | 11 ++---------
2 files changed, 4 insertions(+), 18 deletions(-)
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) {
--
2.5.0
Powered by blists - more mailing lists