[lkml]   [2009]   [Mar]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectClass device namespaces
    Hi Greg,

    I am a little confused by the directories created when one registers a
    class device. When a class device is registered as the children of a
    real device, a subdirectory by the class name is created, and the class
    device is created there, effectively granting each class a separate
    namespace. Example:


    where 0000:00:1f.3 is the physical device, i2c-adapter the class name
    and i2c-0 the class device.

    OTOH, if I create a class device as the children of another class
    device, the class device is created directly, without a directory
    between the parent and the child. Example:


    where the first i2c-0 is an i2c-adapter class device, and the second
    i2c-0 is an i2c-dev class device. I would have expected:


    The current behavior seems inconsistent to me. Is it done so on purpose,
    or is this accidental? If on purpose, what's the reason?

    I am asking because this is causing trouble in practice. We have both
    i2c-dev and firmware_class which try to create class devices by the
    same name and this of course collides. While I would blame
    firmware_class for coming up with an horrible naming scheme (or
    actually, for not coming up with any naming scheme) it might still be a
    good idea to prevent such collisions at the driver core level.

    Jean Delvare

     \ /
      Last update: 2009-03-29 17:51    [W:0.020 / U:42.084 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site