mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Scot Doyle <lkml14@scotdoyle.com>
To: Benson Leung <bleung@chromium.org>
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>,
	"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
	Olof Johansson <olof@lixom.net>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 1/1] platform/chrome: Probe multiple i2c adapters of the same name
Date: Wed, 11 Jun 2014 23:23:02 +0100 (BST)	[thread overview]
Message-ID: <alpine.DEB.2.02.1406112148480.22470@scotdoyle.com> (raw)
In-Reply-To: <CANLzEkuGWd9s1Ka32BrgGxrCF+gGqVA4=uKuGJMerWaz6NDMpA@mail.gmail.com>


On Wed, 11 Jun 2014, Benson Leung wrote:
> On Wed, Jun 11, 2014 at 10:51 AM, Scot Doyle <lkml14@scotdoyle.com> wrote:
>> The chromeos_laptop module probes the first i2c adapter with a specific name
>> for expected hardware. However, the Acer C720 Chromebook has two i2c
>> adapters with the same name. This patch probes each i2c adapter with a
>> specific name until locating the expected hardware.
>>
>> Thanks to Mika Westerberg for formatting tips and identifying the need for
>> unique bus addresses within each set of identically-named adapters.
>
> Scot,
>
> Is your intention with this patch to replace the one that Mika wrote
> that specifically special cased the designware i2c busses? He already
> solved this problem in this patch.
> https://patchwork.kernel.org/patch/4288591/
>
> I'm not sure about your approach here. It looks like if there's some
> ambiguity in the names of the busses, you try to probe the device on
> every bus with that name.
>
> We know that bus 0 is going to have the touchpad, and we know that bus
> 1 is going to have the touchscreen and light sensor. I'd prefer not to
> send extra probes for all of the combination of devices that don't
> exist.

In the case of the Acer C720, will the touchpad always be the first device 
iterated by the bus_find_device function?

My quite possibly incorrect understanding is that:
- the i2c bus numbers assigned are dynamic
- dynamic bus numbers depend on the order of device registration
- there is no guarantee of the ordering of device registration
- bus_find_device iterates by insertion order (as opposed to ascending pci 
device id or ascending pci hardware address)

      reply	other threads:[~2014-06-11 21:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-03 13:02 [PATCH] platform/chrome: Add support for Acer C720 Mika Westerberg
2014-06-03 19:46 ` Benson Leung
2014-06-04  8:37   ` Mika Westerberg
2014-06-04 20:12     ` Benson Leung
2014-06-06 22:06       ` [PATCH 0/1] platform/chrome: Probe multiple i2c adapters of the same name Scot Doyle
2014-06-06 22:25         ` [PATCH 1/1] " Scot Doyle
2014-06-09 12:47           ` Mika Westerberg
2014-06-10  5:08             ` Scot Doyle
2014-06-10  5:17               ` [PATCH v2 " Scot Doyle
2014-06-11  9:24                 ` Mika Westerberg
2014-06-11 17:51                   ` [PATCH v3 " Scot Doyle
2014-06-11 17:09                     ` Benson Leung
2014-06-11 22:23                       ` Scot Doyle [this message]

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=alpine.DEB.2.02.1406112148480.22470@scotdoyle.com \
    --to=lkml14@scotdoyle.com \
    --cc=bleung@chromium.org \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=olof@lixom.net \
    /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

all inboxes | Powered by JetHome®