@@ -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) {
@@ -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) {
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@linaro.org> --- drivers/input/rmi4/rmi_i2c.c | 11 ++--------- drivers/input/rmi4/rmi_spi.c | 11 ++--------- 2 files changed, 4 insertions(+), 18 deletions(-)