Re: [PATCH][2.6] Add command function to struct i2c_adapter

From: Adrian Cox (adrian_at_humboldt.co.uk)
Date: 09/22/04

  • Next message: Mario R. Carro: "Re: FUSE fusexmp proxy example solves umount problem!"
    To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>, sensors@Stimpy.netroedge.com
    Date:	Wed, 22 Sep 2004 14:13:19 +0100
    
    

    On Wed, 2004-09-22 at 14:38, Jean Delvare wrote:
    > On Wed, 22 Sep 2004 12:54:08 +0100, Adrian Cox wrote

    > > What I want is a way for a card driver to create a private I2C
    > > adapter, and private instances of I2C clients, for purposes of code
    > > reuse. The card driver would be responsible for attaching those
    > > clients to the bus and cleaning up the objects on removal. The bus
    > > wouldn't be visible in sysfs, or accessible from user-mode.
    >
    > Aha, this is an interesting point (which was missing from your previous
    > explanation). The base of your proposal would be to have several small i2c
    > "trees" (where a tree is a list of adapters and a list of clients) instead of
    > a larger, unique one. This would indeed solve a number of problems, and I
    > admit that it is somehow equivalent to Michael's classes in that it
    > efficiently prevents the hardware monitoring clients from probing the video
    > stuff. The rest is just details internal to each "tree". As I understand it,
    > each video device would be a tree on itself, while the whole hardware
    > monitoring stuff would constitute one (bigger) tree. Correct?

    Yes. It took me an extra cup of coffee to explain the idea.

    An important detail is that frontends would no longer contain
    module_init() and module_exit() functions. Instead, the card driver
    would call a function in the frontend module to attach the frontend
    client to the tree and simultaneously set the correct parameters for
    that specific card. This provides type safety, and a guarantee that the
    client parameters match the correct card when mixing cards from
    different manufacturers.

    > > Some USB webcams have internal I2C busses to connect the sensor to
    > > the USB chip. The drivers for these ignore the I2C core completely, and
    > > invent their own system for reading and writing the sensor registers.
    > > Maybe that's actually the best way of dealing with this.
    >
    > With your proposal, these drivers could use the common code again while still
    > being completely separated from the other i2c busses, right?

    Possibly, though they tend to have very limited I2C controllers which
    makes it more awkward.

    - Adrian Cox
    Humboldt Solutions Ltd.

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Mario R. Carro: "Re: FUSE fusexmp proxy example solves umount problem!"

    Relevant Pages

    • How to Install tar.gz package
      ... So I got the linux video display card driver downloads tar.gz for my ... Problem with Video Card Drivers ... computer you should not have to specify the bus ID. ...
      (Debian-User)
    • Re: P5/Celeron comments?
      ... type of video capture card require. ... That restriction is caused by the mix of PCI Express and PCI ... which means a PCI bus card may get the "short straw". ... and you only get time slices from each camera. ...
      (alt.comp.periphs.mainboard.asus)
    • My First Posted Trip Report... Day 6 of 8
      ... This is the first time I've actually POSTED a trip report on radp although I've made up several and put them on my web site lame though it may be. ... Didn't bother to go back to BWV since the bus that goes there also comes here. ... When we got to the Dolphin, some little girl tried to reach up to the hand grips for standing passengers and missed it by a good four inches. ... Now, earlier in the day, I had gotten a new room card because I've had so many problems with vendors not being able to swipe the card and get the info off the magnetic stripe. ...
      (rec.arts.disney.parks)
    • Why SGPoreans so fierce and violent?
      ... She claws driver till he BLEEDS ... concession card ... But inside his bus cabin, the 33-year-old driver was helpless against ... concession card. ...
      (soc.culture.singapore)
    • Re: Why SGPoreans so fierce and violent?
      ... She claws driver till he BLEEDS ... concession card ... But inside his bus cabin, the 33-year-old driver was helpless against ... concession card. ...
      (soc.culture.singapore)

    Loading