mfd regmap irq to handle some cases

January 23rd, 2012 - 04:00 am ET by Ashish Jangam | Report spam
Hi Mark,

DA9052-53 PMIC supports Tick & Periodic Alarm. On expiry of Alarm an event gets generate
and data ( about the alram type - Tick or Periodic) also gets lock in a register. This
data needs to be read from the register before event is cleared . But since in regmap irq
events are cleared first and then left for processing (which is the obvious way to do) but
in this approach data gets loss from the DA9052-53 register and alarm type cannot be
determined.

For a quick fix in regmap irq we may tempt to defer event clarification after processing of
event but there is a problem in this approach for some variants of DA9052 and DA9053 when
event is cleared a spurious interrupt gets generated therefore in earlier release of DA9052/53
MFD module a delay was added. Therefore we need to think on how to handle such cases in regmap irq.

Regards,
Ashish


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
email Follow the discussionReplies 1 replyReplies Make a reply

Replies

#1 Mark Brown
January 23rd, 2012 - 07:00 am ET | Report spam
On Mon, Jan 23, 2012 at 02:17:03PM +0530, Ashish Jangam wrote:

Please fix your mailer to word wrap within 80 columns. I've reflowed
your text for legibility.

For a quick fix in regmap irq we may tempt to defer event
clarification after processing of event but there is a problem in this



That's not going to work in general, it means there's a race between
handling the interrupt and acknowledging the interrupt which leads to
interrupts being dropped if you get a new interrupt before the ack has
been written back.

approach for some variants of DA9052 and DA9053 when event is cleared
a spurious interrupt gets generated therefore in earlier release of
DA9052/53 MFD module a delay was added. Therefore we need to think on
how to handle such cases in regmap irq.



What are the consequences of the spurious interrupt?
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Similar topics