git: ig4 - Use interrupt to wait for receive data
    Matthew Dillon 
    dillon at crater.dragonflybsd.org
       
    Fri Feb  7 19:21:22 PST 2014
    
    
  
commit aee4132d71137e263b14434d451f90b08c591028
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Fri Feb 7 19:13:53 2014 -0800
    ig4 - Use interrupt to wait for receive data
    
    * The transmit FIFO is typically big enough to hold the full command
      so we do not usually hit the DELAY(25) in the poll loop.  However,
      this is not the case when receiving data.
    
    * Generate an interrupt on stop-bit detection and when a character is
      received.  Set the receive FIFO threshold to 1.  Our polling loop works
      the same way but this allows us to use lksleep() instead of DELAY(25)
      when waiting for receive data.
    
    * Reduces cpu overhead very significantly.  The cyapa (trackpad) driver
      polling at 100hz previously ate 10% of the cpu and now only uses 2%
      or less when fully active.
Summary of changes:
 sys/bus/smbus/ichiic/ig4_iic.c | 34 +++++++++++++++++++++++++++-------
 sys/bus/smbus/ichiic/ig4_reg.h |  2 +-
 2 files changed, 28 insertions(+), 8 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/aee4132d71137e263b14434d451f90b08c591028
-- 
DragonFly BSD source repository
    
    
More information about the Commits
mailing list