]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r350838, r350840-r350841, r350849, r350879
authorIan Lepore <ian@FreeBSD.org>
Thu, 5 Sep 2019 16:46:16 +0000 (16:46 +0000)
committerIan Lepore <ian@FreeBSD.org>
Thu, 5 Sep 2019 16:46:16 +0000 (16:46 +0000)
commit27a8dc3cbb3694026ce056e2dba5e545721a9f1a
treec88d89e0524b897b9c138f113b3887f3f3431136
parente27633af9e257806e940c44fb4af7f72b9626d49
MFC r350838, r350840-r350841, r350849, r350879

r350838:
Switch the am335x_pmic driver to using iicdev_readfrom/writeto.

PR: 239697
Submitted by: Chuhong Yuan

r350840:
Garbage collect the no-longer-necessary MAX_IIC_DATA_SIZE (there is not a
buffer allocated at that fixed size anymore).

r350841:
When responding to an interrupt in the am335x_pmic driver, use a taskqueue
thread to do the work that involves i2c IO, which sleeps while the IO is
in progress.

r350849:
Remove use of intr_config_hook from the am335x_pmic and tda19988 drivers.
Long ago this was needed, but now low-level i2c controller drivers cleverly
defer attachment of the bus until interrupts are enabled (if they require
interrupts to function), so that every i2c slave device doesn't have to.

r350879:
Revert r350841.  I didn't realize that on this chip, reading the interrupt
status register clears pending interrupts.  By moving that code out of the
interrupt handler into a taskqueue task, I effectively created an interrupt
storm by returning from the handler with the interrupt source still active.

We'll have to find a different solution for this driver's need to sleep
in an ithread context.
sys/arm/ti/am335x/am335x_pmic.c
sys/arm/ti/am335x/tda19988.c