• Paul Fertser's avatar
    mfd: revise locking for pcf50633 ADC · bd8ef102
    Paul Fertser authored
    Current implementation is prone to races, this patch attempts to remove all
    but one (in pcf50633_adc_sync_read).
    
    The idea is that we need to guard the queue access only on inserting and
    removing items. If we insert and there're no more items in the queue it
    means that the last irq already happened and we need to trigger ADC
    manually. If not, then the next conversion will be triggered by the irq
    handler upon completion of the previous.
    Signed-off-by: default avatarPaul Fertser <fercerpav@gmail.com>
    Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
    bd8ef102
pcf50633-adc.c 6.4 KB