All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] i2c: Don't assume bus nr 0 if none was specified
@ 2012-03-16 12:19 Karol Lewandowski
       [not found] ` <1331900343-6743-1-git-send-email-k.lewandowsk-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
  0 siblings, 1 reply; 24+ messages in thread
From: Karol Lewandowski @ 2012-03-16 12:19 UTC (permalink / raw)
  To: w.sang
  Cc: ben-linux, khali, linux-i2c, linux-kernel, hskinnemoen,
	dirk.brandewie, bigeasy, m.szyprowski, grant.likely,
	kyungmin.park, Karol Lewandowski

Hi,

i2c controller drivers used to assume bus number 0 when none (-1) was specified.

This worked on non-device tree systems, where one could explicitly specify
bus number via platform data.  On DT-enabled systems bus number is always -1.

Some drivers assume bus number 0 when -1 is specified.  This patchset kills
this logic and switches to dynamic bus allocation (default when -1 is provided[1]).

[ I've found out this when I've tried to instantiate more than one i2c-gpio
  instance on DT-enabled system. I've, hopefully, fixed few other drivers too. ]

[1] Introduced by Grant Likely in 488bf314b ("i2c: Allow i2c_add_numbered_adapter()
    to assign a bus id")

Karol Lewandowski (2):
  i2c-pxa: Drop leftover comment
  i2c: Dynamically assign adapter id if it wasn't explictly specified

 drivers/i2c/busses/i2c-gpio.c         |    7 +------
 drivers/i2c/busses/i2c-octeon.c       |    2 +-
 drivers/i2c/busses/i2c-pca-platform.c |    2 +-
 drivers/i2c/busses/i2c-pxa.c          |    5 -----
 drivers/i2c/busses/i2c-versatile.c    |    9 ++-------
 5 files changed, 5 insertions(+), 20 deletions(-)

-- 
1.7.9

^ permalink raw reply	[flat|nested] 24+ messages in thread
* [PATCH v2 0/2] i2c: Don't assume bus nr 0 if none was specified
@ 2012-03-27  9:10 Karol Lewandowski
  2012-03-27  9:10 ` [PATCH 2/2] i2c: Dynamically assign adapter id if it wasn't explictly specified Karol Lewandowski
  0 siblings, 1 reply; 24+ messages in thread
From: Karol Lewandowski @ 2012-03-27  9:10 UTC (permalink / raw)
  To: w.sang-bIcnvbaLZ9MEGnE8C9+IrQ
  Cc: ben-linux-elnMNo+KYs3YtjvyW6yDsg,
	m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA,
	kyungmin.park-Sze3O3UU22JBDgjK7y7TUQ,
	hskinnemoen-Re5JQEeQqe8AvxtiuMwx3w,
	bigeasy-hfZtesqFncYOwBW4kG4KsQ,
	dirk.brandewie-Re5JQEeQqe8AvxtiuMwx3w,
	linux-lFZ/pmaqli7XmaaqVzeoHQ, Karol Lewandowski

Changes since v1:
 - Dropped reduntant i2c-octeon change

i2c controller drivers used to assume bus number 0 when none (-1) was
specified.

This worked on non-device tree systems, where one could explicitly
specify bus number via platform data.  On DT-enabled systems bus
number is always -1.

This patchset reworks few remaining drivers to use dynamic bus
allocation when no id has been provided.

[ I've found out this when I've tried to instantiate more than one
  i2c-gpio instance on DT-enabled system. I've, hopefully, fixed few
  other drivers too. ]

Karol Lewandowski (2):
  i2c-pxa: Drop leftover comment
  i2c: Dynamically assign adapter id if it wasn't explictly specified

 drivers/i2c/busses/i2c-gpio.c         |    7 +------
 drivers/i2c/busses/i2c-pca-platform.c |    2 +-
 drivers/i2c/busses/i2c-pxa.c          |    5 -----
 drivers/i2c/busses/i2c-versatile.c    |    9 ++-------
 4 files changed, 4 insertions(+), 19 deletions(-)

-- 
1.7.9.1

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2012-03-27  9:10 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-16 12:19 [PATCH 0/2] i2c: Don't assume bus nr 0 if none was specified Karol Lewandowski
     [not found] ` <1331900343-6743-1-git-send-email-k.lewandowsk-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2012-03-16 12:19   ` [PATCH 1/2] i2c-pxa: Drop leftover comment Karol Lewandowski
2012-03-16 12:19     ` Karol Lewandowski
2012-03-16 12:19   ` [PATCH 2/2] i2c: Dynamically assign adapter id if it wasn't explictly specified Karol Lewandowski
2012-03-16 12:19     ` Karol Lewandowski
2012-03-22 15:28     ` Karol Lewandowski
     [not found]       ` <4F6B4532.7090806-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2012-03-22 16:11         ` Russell King - ARM Linux
2012-03-22 16:11           ` Russell King - ARM Linux
2012-03-22 17:03           ` Karol Lewandowski
2012-03-22 16:58         ` David Daney
2012-03-22 16:58           ` David Daney
     [not found]           ` <4F6B5A22.1090204-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
2012-03-22 17:48             ` Karol Lewandowski
2012-03-22 17:48               ` Karol Lewandowski
     [not found]               ` <4F6B65D0.1030506-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2012-03-22 18:07                 ` David Daney
2012-03-22 18:07                   ` David Daney
2012-03-22 21:47         ` Wolfram Sang
2012-03-22 21:47           ` Wolfram Sang
     [not found]           ` <20120322214714.GA24684-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2012-03-26  9:14             ` Karol Lewandowski
2012-03-26  9:14               ` Karol Lewandowski
2012-03-16 12:27   ` [PATCH 0/2] i2c: Don't assume bus nr 0 if none was specified Karol Lewandowski
2012-03-16 12:27     ` Karol Lewandowski
     [not found]     ` <4F6331AF.3010007-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2012-03-17 10:50       ` Grant Likely
2012-03-17 10:50         ` Grant Likely
  -- strict thread matches above, loose matches on Subject: below --
2012-03-27  9:10 [PATCH v2 " Karol Lewandowski
2012-03-27  9:10 ` [PATCH 2/2] i2c: Dynamically assign adapter id if it wasn't explictly specified Karol Lewandowski

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.