Lines Matching +full:imx53 +full:- +full:iim
1 // SPDX-License-Identifier: GPL-2.0-only
3 * i.MX IIM driver
7 * Based on the barebox iim driver,
15 #include <linux/nvmem-provider.h>
35 struct iim_priv *iim = context; in imx_iim_read() local
39 ret = clk_prepare_enable(iim->clk); in imx_iim_read()
47 *buf8++ = readl(iim->base + IIM_BANK_BASE(bank) + reg * 4); in imx_iim_read()
50 clk_disable_unprepare(iim->clk); in imx_iim_read()
73 .compatible = "fsl,imx25-iim",
76 .compatible = "fsl,imx27-iim",
79 .compatible = "fsl,imx31-iim",
82 .compatible = "fsl,imx35-iim",
85 .compatible = "fsl,imx51-iim",
88 .compatible = "fsl,imx53-iim",
98 struct device *dev = &pdev->dev; in imx_iim_probe()
99 struct iim_priv *iim; in imx_iim_probe() local
104 iim = devm_kzalloc(dev, sizeof(*iim), GFP_KERNEL); in imx_iim_probe()
105 if (!iim) in imx_iim_probe()
106 return -ENOMEM; in imx_iim_probe()
108 iim->base = devm_platform_ioremap_resource(pdev, 0); in imx_iim_probe()
109 if (IS_ERR(iim->base)) in imx_iim_probe()
110 return PTR_ERR(iim->base); in imx_iim_probe()
112 drvdata = of_device_get_match_data(&pdev->dev); in imx_iim_probe()
114 iim->clk = devm_clk_get(dev, NULL); in imx_iim_probe()
115 if (IS_ERR(iim->clk)) in imx_iim_probe()
116 return PTR_ERR(iim->clk); in imx_iim_probe()
118 cfg.name = "imx-iim", in imx_iim_probe()
124 cfg.size = drvdata->nregs; in imx_iim_probe()
125 cfg.priv = iim; in imx_iim_probe()
135 .name = "imx-iim",
142 MODULE_DESCRIPTION("i.MX IIM driver");