Re: [PATCH v1 2/2] hwrng: npcm: Add NPCM8XX support

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

 



On 22/09/2022 16:22, Tomer Maimon wrote:
>  static int npcm_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait)
> @@ -102,6 +103,11 @@ static int npcm_rng_probe(struct platform_device *pdev)
>  	pm_runtime_use_autosuspend(&pdev->dev);
>  	pm_runtime_enable(&pdev->dev);
>  
> +	if (of_device_is_compatible(pdev->dev.of_node, "nuvoton,npcm750-rng"))
> +		priv->clkp = NPCM_RNG_CLK_SET_25MHZ;
> +	if (of_device_is_compatible(pdev->dev.of_node, "nuvoton,npcm845-rng"))
> +		priv->clkp = NPCM_RNG_CLK_SET_62_5MHZ;

No, don't sprinkle compatibles here and there. Driver data is for this.



Best regards,
Krzysztof




[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]
  Powered by Linux