lkml.org 
[lkml]   [2021]   [Jun]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH v10] i2c: virtio: add a virtio i2c frontend driver
    From
    Date

    On 2021/6/30 15:32, Wolfram Sang wrote:
    >>>> + snprintf(vi->adap.name, sizeof(vi->adap.name), "Virtio I2C Adapter");
    >>> Is there something to add so you can distinguish multiple instances?
    >>> Most people want that.
    >>
    >> I find the I2C core will set a device name "i2c-%d" for this purpose, right?
    >>
    >> I think this name can be used to distinguish the adapter types while
    >> "i2c-%d" can be used to
    >>
    >> distinguish instances. Does it make sense ?
    > That alone does not help. See the 'i2cdetect -l' output of my Renesas
    > board here:
    >
    > i2c-4 i2c e66d8000.i2c I2C adapter
    > i2c-2 i2c e6510000.i2c I2C adapter
    > i2c-7 i2c e60b0000.i2c I2C adapter
    >
    > Notice that the third column carries the base address, so you know which
    > i2c-%d is which physical bus. I don't know if it makes sense in your
    > "virtual" case, but so far it would always print "Virtio I2C Adapter".
    > Maybe it makes sense to add some parent device name, too?
    >
    > And if this is not reasonable, just skip it. As I said, it can be
    > helpful at times, but it is definately not a show stopper.


    OK. I will add the virtio_device index for this purpose.
    which indicates the unique position on the virtio bus.

    Thanks Wolfram, I will fix it and send the v11.


    \
     
     \ /
      Last update: 2021-06-30 09:52    [W:7.382 / U:0.000 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site