Re: [PATCH 1/2] soc: samsung: exynos-pmu: instantiate clkout driver as MFD

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 10/1/20 18:56, Krzysztof Kozlowski wrote:
> The Exynos clock output (clkout) driver uses same register address space
> (Power Management Unit address space) as Exynos PMU driver and same set
> of compatibles.  It was modeled as clock provider instantiated with
> CLK_OF_DECLARE_DRIVE().
> 
> This however brings ordering problems and lack of probe deferral,
> therefore clkout driver should be converted to a regular module and
> instantiated as a child of PMU driver to be able to use existing
> compatibles and address space.

It might have been cleaner to have the CLKOUT device as a PMU subnode in DT, 
then device instantiation would be already covered by devm_of_platform_populate().
But it gets a bit complicated to make such a change in a backward compatible way.

I have tested both patches on Trats2, where CLKOUT provides master clock for
the audio codec.

Reviewed-by: Sylwester Nawrocki <s.nawrocki@xxxxxxxxxxx>
Tested-by: Sylwester Nawrocki <s.nawrocki@xxxxxxxxxxx>
 

> @@ -128,6 +134,11 @@ static int exynos_pmu_probe(struct platform_device *pdev)
>   
>   	platform_set_drvdata(pdev, pmu_context);
>   
> +	ret = devm_mfd_add_devices(dev, PLATFORM_DEVID_NONE, exynos_pmu_devs,
> +				   ARRAY_SIZE(exynos_pmu_devs), NULL, 0, NULL);
> +	if (ret)
> +		return ret;
> +
>   	if (devm_of_platform_populate(dev))
>   		dev_err(dev, "Error populating children, reboot and poweroff might not work properly\n");





[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux for Synopsys ARC Processors]    
  • [Linux on Unisoc (RDA Micro) SoCs]     [Linux Actions SoC]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  •   Powered by Linux