Messages in this thread | | | Date | Thu, 22 Sep 2022 17:08:34 +0200 | Subject | Re: [PATCH v1 2/2] hwrng: npcm: Add NPCM8XX support | From | Krzysztof Kozlowski <> |
| |
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
| |