• Mauro Carvalho Chehab's avatar
    media: cxd2841er: avoid too many status inquires · d9aeaa6d
    Mauro Carvalho Chehab authored
    I2C ops are expensive, as the I2C bus typical speed is 100kbps.
    
    Also, stats reading take some time, as it requires to retrieve a
    certain number of packets to complete.
    
    While we don't know the minimal for CXD2841er, trying to do it
    too quickly is still a very bad idea.
    
    So, add some sanity logic there, preventing to retrieve stats
    faster than one second.
    
    This shouldn't cause any issues with well behavior apps, as they
    usually take stats on a polling rate slower than 1 second.
    Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
    Signed-off-by: default avatarSean Young <sean@mess.org>
    d9aeaa6d
cxd2841er.c 120 KB