All of lore.kernel.org
 help / color / mirror / Atom feed
* dwc2: Application of DIEPMSK when reading DIEPINT
@ 2022-12-19 16:14 Jonathon Reinhart
  2022-12-20  6:23 ` Minas Harutyunyan
  0 siblings, 1 reply; 2+ messages in thread
From: Jonathon Reinhart @ 2022-12-19 16:14 UTC (permalink / raw)
  To: linux-usb; +Cc: Vardan Mikayelyan, John Keeping, John Youn, Felipe Balbi

Hello,

326015887b6a: usb: dwc2: gadget: Add dwc2_gadget_read_ep_interrupts function

Prior to this commit, the DIEPINT / DOEPINT interrupt status registers
were directly read and written-back to clear. But after this commit,
the register value is masked with DIEPMSK / DOEPMSK prior to clearing
or being returned to act upon.

Can anyone explain the purpose of this change? In what case will the
*INT register have bits set which are not set in *MSK (and will be
subsequently ignored)? Why should those be ignored?

Thank you,
Jonathon Reinhart

^ permalink raw reply	[flat|nested] 2+ messages in thread

* RE: dwc2: Application of DIEPMSK when reading DIEPINT
  2022-12-19 16:14 dwc2: Application of DIEPMSK when reading DIEPINT Jonathon Reinhart
@ 2022-12-20  6:23 ` Minas Harutyunyan
  0 siblings, 0 replies; 2+ messages in thread
From: Minas Harutyunyan @ 2022-12-20  6:23 UTC (permalink / raw)
  To: Jonathon Reinhart, linux-usb; +Cc: John Keeping, John Youn, Felipe Balbi

Hi Jonathon,

Just one example. TXFIFOEMPTY interrupt can be asserted in both modes:
Slave and DMA, but this interrupt handling required for Slave mode only
and should be ignored for DMA modes.
This is why this interrupt masked for DMA and unmasked for Slave mode.

Thanks,
Minas


On 12/19/2022 8:15 PM, Jonathon Reinhart <jrreinhart@google.com> wrote:
>From: Jonathon Reinhart <jrreinhart@google.com>
>Sent: Monday, December 19, 2022 8:15 PM
>To: linux-usb@vger.kernel.org
>Cc: Vardan Mikayelyan <mvardan@synopsys.com>; John Keeping
><john@metanate.com>; John Youn <johnyoun@synopsys.com>; Felipe Balbi
><felipe.balbi@linux.intel.com>
>Subject: dwc2: Application of DIEPMSK when reading DIEPINT
>
>Hello,
>
>326015887b6a: usb: dwc2: gadget: Add dwc2_gadget_read_ep_interrupts function
>
>Prior to this commit, the DIEPINT / DOEPINT interrupt status registers were
>directly read and written-back to clear. But after this commit, the register
>value is masked with DIEPMSK / DOEPMSK prior to clearing or being returned
>to act upon.
>
>Can anyone explain the purpose of this change? In what case will the *INT
>register have bits set which are not set in *MSK (and will be subsequently
>ignored)? Why should those be ignored?
>
>Thank you,
>Jonathon Reinhart

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-12-20  6:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-19 16:14 dwc2: Application of DIEPMSK when reading DIEPINT Jonathon Reinhart
2022-12-20  6:23 ` Minas Harutyunyan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.