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: Matthew Wilcox: "Re: The new PCI fixup code ate my IDE controller"
    To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>, sensors@Stimpy.netroedge.com
    Date:	Wed, 22 Sep 2004 19:32:31 +0100
    
    

    On Wed, 2004-09-22 at 14:38, Jean Delvare wrote:

    > 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?

    I've been rereading the code, and it could be even simpler. How about
    this:

    1) The card driver defines an i2c_adapter structure, but never calls
    i2c_add_adapter(). The only extra thing it needs to do is to initialise
    the semaphores in the structure.
    2) The frontend calls i2c_transfer() directly.
    3) The i2c core never gets involved, and there is never any i2c_client
    structure.

    This gives us the required reuse of the I2C algo-bit code, without any
    of the list walking or device probing being required.

    - 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: Matthew Wilcox: "Re: The new PCI fixup code ate my IDE controller"

    Relevant Pages