All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bob Feretich <bob.feretich-8wbKi1faPaosQv5ZqcSHkQ@public.gmane.org>
To: Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
Cc: "linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
Subject: Re: Another problem with I2C multiplexer bus naming
Date: Thu, 12 Mar 2015 12:12:45 -0700	[thread overview]
Message-ID: <5501E52D.9060400@rafresearch.com> (raw)
In-Reply-To: <20150312112917.GA4888@katana>

On 3/12/2015 4:29 AM, Wolfram Sang wrote:
> On Thu, Mar 12, 2015 at 10:42:27AM +0100, Wolfram Sang wrote:
>>
>>> [    2.951717] omap_i2c 44e0b000.i2c: failure adding adapter
>>> ...snipped...
>>> [    2.964249] omap_i2c: probe of 44e0b000.i2c failed with error -16
>>> ... snipped ...
>>
>> Thanks! After a first glimpse, this seems to be a bug. The omap driver
>> uses i2c_add_numbered_adapter here in DT context, and thus
>> __i2c_first_dynamic_bus_num is not properly increased because there is
>> no static board_info. Will have a look.
>
> Using non-DT becomes so rare that my knowledge about it gets rusty :(
>
> Yes, one can't mix i2c_add_numbered_adapter and i2c_add_adapter well,
> and this is even documented. However, since you are DT only, this
> doesn't apply.
>
I have not seen any documentation to regarding this topic.
I remember adding an i2c multiplexer to an early beagleboard system years
ago. I think we were lucky that the fixed i2c bus addresses were probed
first, so they were not stolen by the multiplexer's dynamic allocations.
(Dynamic allocation does not steal bus addresses from previously
allocated adapters.)

> I don't know all of your dts files, but I assume there is already an
> alias for busses 0/2 somewhere?
>
Yes, aliases for known buses and adapters are in
/arch/arm/boot/dts/am33xx.dtsi
All of the cpu boards that use this chip include this file.

Although there is no documentation stating the effect that these aliases 
have, it gave me the idea to try to use them to name the multiplexer's 
child buses.

Other device documentation...
http://devicetree.org/Device_Tree_Usage#aliases_Node
describe an alias as a way to avoid "cumbersome" full path node names.
It also states, "The operating system is welcome to use the aliases when 
assigning an identifier to a device."

It would be useful also state that the i2c bus naming mechanism uses 
aliases to name i2c buses.

Thanks,
Bob

  reply	other threads:[~2015-03-12 19:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-12  4:11 Another problem with I2C multiplexer bus naming Bob Feretich
     [not found] ` <1426133507.16219.YahooMailNeo-XYahOdtEMNm2Y7dhQGSVAJOW+3bF1jUfVpNB7YpNyf8@public.gmane.org>
2015-03-12  4:55   ` Another problem with I2C multiplexer bus naming - solved Bob Feretich
     [not found]     ` <1426136151.37151.YahooMailNeo-XYahOdtEMNlRBbKmAC7my5OW+3bF1jUfVpNB7YpNyf8@public.gmane.org>
2015-03-12  9:44       ` Wolfram Sang
2015-03-12 18:49         ` Bob Feretich
     [not found]           ` <5501DFCC.6010408-8wbKi1faPaosQv5ZqcSHkQ@public.gmane.org>
2015-03-14 10:49             ` Wolfram Sang
2015-03-12  9:29   ` Another problem with I2C multiplexer bus naming Danielle Costantino
2015-03-12  9:42   ` Wolfram Sang
2015-03-12 11:29     ` Wolfram Sang
2015-03-12 19:12       ` Bob Feretich [this message]
     [not found]         ` <5501E52D.9060400-8wbKi1faPaosQv5ZqcSHkQ@public.gmane.org>
2015-03-14 11:00           ` Wolfram Sang
2015-05-08  4:57             ` [PATCH 1/1] i2c: documentation of how to set child bus numbers from the device tree Bob Feretich

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=5501E52D.9060400@rafresearch.com \
    --to=bob.feretich-8wbki1fapaosqv5zqcshkq@public.gmane.org \
    --cc=linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.