On Mon, Jan 29, 2024 at 05:03:48AM +0000, Ding, Shenghao wrote: > > It might be better to request the firmware in the I2C probe rather than in the > > ASoC level probe, that way there's more time for the firmware to be loaded > > before we actually need it. That does mean you can't register the controls > > immediately though so it may be more trouble than it's worth. > I once put request_firmware_nowait in i2c_probe, but it sometimes returned > error in some platforms. So my customer suggest that it would be moved into > the codec_probe. It seemed filesystem is not completely ready in some > platform during calling the i2c_probe. That indicates that this is still racy - shuffling things around has papered over a timing issue on their particular system but it's still possible to have the card come up before the filesystems are fully ready (especially if all the drivers are built in). If the DSP firmware is essential to the device's operation the driver should defer registration with the core until the firmware has loaded. wm8958 should have an example of this IIRC. > > Similarly for the reset, if we reset as early as possible that seems better. > As to reset, it is also from my customers' suggestion. they found the issue that > i2c access error in i2c_probe in some platform. So they put it into codec_probe. That suggests the reset might be missing some delays or something and again there might be some issues.
Attachment:
signature.asc
Description: PGP signature
- References:
- [PATCH v2 1/4] ASoc: PCM6240: Create PCM6240 Family driver code
- From: Shenghao Ding
- Re: [PATCH v2 1/4] ASoc: PCM6240: Create PCM6240 Family driver code
- From: Mark Brown
- RE: [EXTERNAL] Re: [PATCH v2 1/4] ASoc: PCM6240: Create PCM6240 Family driver code
- From: Ding, Shenghao
- [PATCH v2 1/4] ASoc: PCM6240: Create PCM6240 Family driver code
- Prev by Date: Re: [PATCH v2 03/13] of: property: add of_graph_get_next_endpoint_raw()
- Next by Date: Re: [PATCH v3] ASoC: Intel: mtl-match: Add cs42l43_l0 cs35l56_l23 for MTL
- Previous by thread: RE: [EXTERNAL] Re: [PATCH v2 1/4] ASoc: PCM6240: Create PCM6240 Family driver code
- Next by thread: Re: [PATCH v2 1/4] ASoc: PCM6240: Create PCM6240 Family driver code
- Index(es):