Re: [PATCH 2/4 v7] ASoC: dwc: Do not use devm_clk_get() if using platform data

Mark Brown
2016-05-23T16:58:01Z

[-- Attachment #1: Type: text/plain, Size: 640 bytes --]

On Mon, May 23, 2016 at 11:02:23AM +0100, Jose Abreu wrote:

> When using platform data the devm_clk_get() function is
> called causing a probe failure if the clock is not
> declared. As we can pass the clock handler by platform
> data call only devm_clk_get() when platform data is not
> used.

No, this is broken - if the device needs a clock the device needs a
clock and clock names should be static rather than passed in via
platform data (indeed NULL is a perfectly valid clock name). The system
integation should map in a clock as needed, if it's just a fixed crystal
or something then just register a fixed clock and connect it up.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]