dma: Fix error_callback enable/disable confusion

Previously the logic was inverted for error_callback_en where 0 was
enablement and 1 was disable. This was likely done so that the default,
sensibly so, was to enable the error callback if possible. A variety of
in tree users had confused the enable/disable value.

Change the name of the flag to error_callback_dis where the default
remains 0 (do not disable the callback!) and correct in tree uses of the
flag where it seemed incorrect.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
This commit is contained in:
Tom Burdick 2024-04-09 14:06:25 -05:00 committed by Anas Nashif
commit 4180d70439
20 changed files with 32 additions and 34 deletions

View file

@ -125,7 +125,7 @@ static int dma_sam0_config(const struct device *dev, uint32_t channel,
/* Enable the interrupts */
DMA_REGS->CHINTENSET.reg = DMAC_CHINTENSET_TCMPL;
if (!config->error_callback_en) {
if (!config->error_callback_dis) {
DMA_REGS->CHINTENSET.reg = DMAC_CHINTENSET_TERR;
} else {
DMA_REGS->CHINTENCLR.reg = DMAC_CHINTENSET_TERR;
@ -179,7 +179,7 @@ static int dma_sam0_config(const struct device *dev, uint32_t channel,
/* Enable the interrupts */
chcfg->CHINTENSET.reg = DMAC_CHINTENSET_TCMPL;
if (!config->error_callback_en) {
if (!config->error_callback_dis) {
chcfg->CHINTENSET.reg = DMAC_CHINTENSET_TERR;
} else {
chcfg->CHINTENCLR.reg = DMAC_CHINTENSET_TERR;