[PATCH 3/3] ASoC: rsnd: add null CLOCKIN support

Mark Brown broonie at kernel.org
Thu May 27 11:48:58 CEST 2021


On Thu, May 27, 2021 at 09:30:38AM +0200, Geert Uytterhoeven wrote:

> It adds a dummy object, which needs to be cleaned up.  Basically you
> are trading a simple NULL pointer check for a zero clock rate check
> deeper inside the driver, with the additional burden of needing to
> take care of the dummy clock's life cycle.

> Note that most clk_*() calls happily operate on a NULL pointer, and
> just return success.  This includes clk_get_rate(), which returns
> a zero rate.

> Mark might have a different view, though, due to his experience with
> dummy regulators?

Not particularly TBH.  The regulator API doesn't accept NULL
pointers due to constant issues with people just ignoring errors
especially around trying to decide that devices don't need power,
it'd just make all that worse.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20210527/b5e0e041/attachment.sig>


More information about the Alsa-devel mailing list