Hi Varka,
Thank you for the comments!
On Fri, Jul 25, 2014 at 01:05:05PM +0530, Varka Bhadram wrote:
On 07/25/2014 12:49 PM, Nicolin Chen wrote:I got your point. I will drop all these and move ids behind probe/remove()
(...)
+static const struct platform_device_id fsl_asrc_devtype[] = {where are you using fsl_asrc_devtype,,,?
+ {
+ .name = "imx35-asrc",
+ .driver_data = IMX35_ASRC,
+ }, {
+ .name = "imx53-asrc",
+ .driver_data = IMX53_ASRC,
+ }, {
+ /* sentinel */
+ }
+};
+MODULE_DEVICE_TABLE(platform, fsl_asrc_devtype);
+
+static const struct of_device_id fsl_asrc_ids[] = {Ya here ... but what is the use...?
+ {
+ .compatible = "fsl,imx35-asrc",
+ .data = &fsl_asrc_devtype[IMX35_ASRC],
as you suggested at the first place and then use of_device_is_compatible()
inside the probe() instead.
I'll refine to+ asrc_priv->regmap = devm_regmap_init_mmio_clk(&pdev->dev,devm_regmap_init_mmio_clk(&pdev->dev,
+ "mem", regs, &fsl_asrc_regmap_config);
"mem", regs,
&fsl_asrc_regmap_config);
devm_regmap_init_mmio_clk(&pdev->dev, "mem", regs,
&fsl_asrc_regmap_config);
Sorry I don't see any problem with this devm_request_irq()...+ if (IS_ERR(asrc_priv->regmap)) {same...
+ dev_err(&pdev->dev, "failed to init regmap\n");
+ return PTR_ERR(asrc_priv->regmap);
+ }
+
+ irq = platform_get_irq(pdev, 0);
+ if (irq < 0) {
+ dev_err(&pdev->dev, "no irq for node %s\n", np->full_name);
+ return irq;
+ }
+
+ ret = devm_request_irq(&pdev->dev, irq, fsl_asrc_isr, 0,
+ asrc_priv->name, asrc_priv);