linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Furquan Shaikh <furquan@google.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
	adurbin@google.com
Subject: Re: [PATCH] drivers: input: Use single i2c_transfer transaction when using RM_CMD_BANK_SWITCH
Date: Tue, 18 Aug 2020 17:08:45 -0700	[thread overview]
Message-ID: <20200819000845.GW1665100@dtor-ws> (raw)
In-Reply-To: <20200818234215.2255611-1-furquan@google.com>

Hi Furquan,

On Tue, Aug 18, 2020 at 04:42:15PM -0700, Furquan Shaikh wrote:
> On an AMD chromebook, where the same I2C bus is shared by both Raydium
> touchscreen and a trackpad device, it is observed that interleaving of
> I2C messages when raydium_i2c_read_message() is called leads to the
> Raydium touch IC reporting incorrect information. This is the sequence
> that was observed to result in the above issue:
> 
> * I2C write to Raydium device for RM_CMD_BANK_SWITCH
> * I2C write to trackpad device
> * I2C read from trackpad device
> * I2C write to Raydium device for setting address
> * I2C read from Raydium device >>>> This provides incorrect
>   information
> 
> This change updates raydium_i2c_read_message and
> raydium_i2c_send_message to perform all the I2C transfers in the
> function as part of a single i2c_transfer transaction. This ensures
> that no transactions are initiated to any other device on the same bus
> in between and hence the information obtained from the touchscreen
> device is correct. Verified with the patch across multiple
> reboots (>100) that the information reported by the Raydium
> touchscreen device during probe is correct.

The devices (touchpad and touchscreen) have to have different addresses
and therefore should be able to operate independently of each other. Are
you sure that the problem is not in i2c controller implementation that
mixes up data streams from 2 separate devices?

Thanks.

-- 
Dmitry

  reply	other threads:[~2020-08-19  0:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-18 23:42 [PATCH] drivers: input: Use single i2c_transfer transaction when using RM_CMD_BANK_SWITCH Furquan Shaikh
2020-08-19  0:08 ` Dmitry Torokhov [this message]
2020-08-19 17:51   ` Furquan Shaikh
2020-08-20 22:45 ` Dmitry Torokhov
2020-08-21  2:40   ` [PATCH v2] " Furquan Shaikh
2020-09-09  0:44     ` Dmitry Torokhov
2020-09-14  6:04       ` Furquan Shaikh
2020-09-14  6:34         ` Dmitry Torokhov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200819000845.GW1665100@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=adurbin@google.com \
    --cc=dan.carpenter@oracle.com \
    --cc=furquan@google.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).