• M
    spi: expose spi_master and spi_device statistics via sysfs · eca2ebc7
    Martin Sperl 提交于
    per spi-master statistics accessible as:
      /sys/class/spi_master/spi*/statistics/*
    
    per spi-device statistics accessible via:
      /sys/class/spi_master/spi*/spi*.*/statistics/*
    
    The following statistics are exposed as separate "files" inside
    these directories:
    * messages              number of spi_messages
    * transfers             number of spi_transfers
    * bytes                 number of bytes transferred
    * bytes_rx              number of bytes transmitted
    * bytes_tx              number of bytes received
    * errors                number of errors encounterd
    * timedout              number of messages that have timed out
    * spi_async             number of spi_messages submitted using spi_async
    * spi_sync              number of spi_messages submitted using spi_sync
    * spi_sync_immediate    number of spi_messages submitted using spi_sync,
                            that are handled immediately without a context switch
                            to the spi_pump worker-thread
    Signed-off-by: NMartin Sperl <kernel@martin.sperl.org>
    Signed-off-by: NMark Brown <broonie@kernel.org>
    eca2ebc7
spi.c 68.2 KB