[i2c] [PATCH][RESEND] i2c-i801: Add basic interrupt support
pinkel at gmail.com
Sat Aug 16 18:22:36 CEST 2008
> I've finally renamed this to I801_INTR_EN for consistency.
> There's some redundancy between I801_HST_STS_MASK_NORM and
> STATUS_FLAGS... It would be great to clean this up a bit, otherwise it
> will become confusing. My impression is that your
> I801_HST_STS_MASK_NORM and my STATUS_FLAGS are essentially the same. It
> should be OK to handle SMBHSTSTS_BYTE_DONE in the interrupt handler.
> That bit is set between the bytes of block transactions when the block
> buffer isn't used. Your code doesn't enable interrupts for these
> transactions at the moment, so you will never see that bit for now, but
> it might happen later as we add support.
> So I think I would change the code as follows:
> /* Mask for events we normally handle */
> #define STATUS_FLAGS (SMBHSTSTS_BYTE_DONE | SMBHSTSTS_FAILED | \
> SMBHSTSTS_BUS_ERR | SMBHSTSTS_DEV_ERR | \
> /* Mask for all events */
> #define STATUS_FLAGS_ALL (STATUS_FLAGS | SMBHSTSTS_SMBALERT_STS)
> If that's OK with you, I'll do that change myself.
Sure, less code and better readability for basically the same
> You obviously meant "use_irq", not "force".
Ugh, yes. Glad you're paying more attention than I seem to ;p
> All the rest looks fine to me now. I'll do some more testing now.
Great and thanks. Am really curious about the stability of this code :)
More information about the i2c