linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* platform_data in i2c device drivers
@ 2014-03-19 22:32 Frank Bormann
       [not found] ` <532A1B12.8080400-/E1597aS9LQAvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 13+ messages in thread
From: Frank Bormann @ 2014-03-19 22:32 UTC (permalink / raw)
  To: Rodolfo Giometti, Laurent Pinchart; +Cc: Linux I2C List

Hi Everyone,

I am looking at the i2c_pca954x i2c bus mux driver in linux-stable. My goal is 
to have the slave buses show up in Linux with static bus numbers. Ideally, I 
want to define the first bus number to use in the dtb.

It seems, the driver has already some support for static bus numbers as its 
probe function checks for the existence of a struct pca954x_platform_data 
instance in client->dev.platform_data and pca954x_platform_mode struct it points 
to has a member adap_id that seems to be doing exactly that judging by its 
documentation. However, calls made to pca954x_probe always have to platform_data 
pointer being passed in through client set to null.

In addition to that, the recent addition to the driver of a reset gpio to be 
configured reads directly from the dtb in the probe function.

I am unsure about how to set this up properly. On one hand, platform_data is 
being passed in to the probe function, which seem to indicate, there may be some 
generic place in the i2c core code to set driver-specific configuration, on the 
other hand, the recent reset gpio addition to the driver seems to indicate that 
the driver's probe function is in fact the right place to read additional 
configuration from the dtb.

Any help is greatly appreciated.

Thanks,
Frank

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

end of thread, other threads:[~2014-04-22 21:46 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-19 22:32 platform_data in i2c device drivers Frank Bormann
     [not found] ` <532A1B12.8080400-/E1597aS9LQAvxtiuMwx3w@public.gmane.org>
2014-03-20  0:10   ` Laurent Pinchart
2014-03-20 16:12     ` Frank Bormann
     [not found]       ` <532B1367.8050906-/E1597aS9LQAvxtiuMwx3w@public.gmane.org>
2014-03-20 16:25         ` Ben Dooks
     [not found]           ` <532B1689.3080202-4yDnlxn2s6sWdaTGBSpHTA@public.gmane.org>
2014-03-20 17:16             ` Frank Bormann
     [not found]               ` <532B2273.8040004-/E1597aS9LQAvxtiuMwx3w@public.gmane.org>
2014-03-20 17:51                 ` Laurent Pinchart
2014-03-21 15:55                   ` Frank Bormann
     [not found]                     ` <532C60EC.3060405-/E1597aS9LQAvxtiuMwx3w@public.gmane.org>
2014-03-21 16:01                       ` Laurent Pinchart
     [not found]     ` <534FF708.7040409@yahoo.com>
     [not found]       ` <534FF708.7040409-/E1597aS9LQAvxtiuMwx3w@public.gmane.org>
2014-04-17 15:46         ` [PATCH] i2c-mux-pca954x: allow downstream bus numbers to be specified in the dts Laurent Pinchart
2014-04-17 18:00           ` Laxman Dewangan
     [not found]             ` <535016B5.7060006-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2014-04-22 21:46               ` Frank Bormann
     [not found]           ` <53501564.1090607@yahoo.com>
     [not found]             ` <53501564.1090607-/E1597aS9LQAvxtiuMwx3w@public.gmane.org>
2014-04-17 20:15               ` Laurent Pinchart
     [not found]                 ` <CAE6_GsvJpajY==6MJExo3T7FrVF_LNGcoozq0N5KEBho9y5NWw@mail.gmail.com>
     [not found]                   ` <CAE6_GsvJpajY==6MJExo3T7FrVF_LNGcoozq0N5KEBho9y5NWw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-04-17 20:42                     ` Laurent Pinchart

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).