lkml.org 
[lkml]   [2019]   [Jan]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH V2 3/4] i2c: tegra: Add DMA Support
Date

> > + if (i2c_dev->has_dma) {
> > + ret = tegra_i2c_init_dma_param(i2c_dev, true);
> > + if (ret == -EPROBE_DEFER)
> > + goto disable_div_clk;
> > + ret = tegra_i2c_init_dma_param(i2c_dev, false);
> > + if (ret == -EPROBE_DEFER)
> > + goto disable_div_clk;
>
> So tegra_i2c_init_dma_param() could fail, printing a error message, and probe will succeed? If allocation fails during the driver's probe, then just fail the probe. Please give the rationale.

If APB DMA probe doesn’t happen prior to tegra i2c, DMA is not available by the time tegra_init_dma_param tries to request slave channel and in those cases dma_request_slave_channel_reason will return EPROBE_DEFER for tegra I2C probe to retry

In case if DMA is available but DMA buffer allocation fails, then tegra_i2c_init_dma_param returns ENOMEM and probe also fails returning same ENOMEM

Thanks
Sowjanya

\
 
 \ /
  Last update: 2019-01-25 21:32    [W:0.098 / U:0.980 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site