On Thu, 2 Sep 2010 at 10:40:35 Mark Brown wrote: > On Wed, Sep 01, 2010 at 03:17:27PM -0400, Eric Millbrandt wrote: > >> The problem there is the return value of poll_sample currently is not >> being checked, so wm97xx_read_aux_adc() is returning invalid data. >> That could be fixed to either keep polling until RC_VALID or a timeout >> is hit is returned or return an error to the calling function and >> letting it decide what to do. I don't like the second option because >> it creates a pathologic failure: > > I think (without having thought through it all so I may have missed > something) that the best thing for the pathalogical case is to have a > limited number of goes at restoring things and then just stop the > digitiser - that will leave things restored while still providing a > guaranteed exit case which should be recoverable (since > everything will be halted). Does that seem sensible to you? > It does. So I will modify wm97xx_read_aux_adc() to do the following: -Call poll_sample() -If the return value is not RC_VALID call poll_sample() again -If after 5 tries (I'm not sure how many samples can be queued) we have not succeeded, stop the digitizer and return -1. -Otherwise return auxadc. If this sounds reasonable I will create a patch for review. -DISCLAIMER: an automatically appended disclaimer may follow. By posting- -to a public e-mail mailing list I hereby grant permission to distribute- -and copy this message.- This e-mail and the information, including any attachments, it contains are intended to be a confidential communication only to the person or entity to whom it is addressed and may contain information that is privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the sender and destroy the original message. Thank you. Please consider the environment before printing this email. -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html