Lines Matching refs:ocotp_dev
114 static int vf610_ocotp_calculate_timing(struct vf610_ocotp *ocotp_dev) in vf610_ocotp_calculate_timing() argument
120 clk_rate = clk_get_rate(ocotp_dev->clk); in vf610_ocotp_calculate_timing()
216 struct vf610_ocotp *ocotp_dev; in vf610_ocotp_probe() local
218 ocotp_dev = devm_kzalloc(dev, sizeof(struct vf610_ocotp), GFP_KERNEL); in vf610_ocotp_probe()
219 if (!ocotp_dev) in vf610_ocotp_probe()
222 ocotp_dev->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); in vf610_ocotp_probe()
223 if (IS_ERR(ocotp_dev->base)) in vf610_ocotp_probe()
224 return PTR_ERR(ocotp_dev->base); in vf610_ocotp_probe()
226 ocotp_dev->clk = devm_clk_get(dev, NULL); in vf610_ocotp_probe()
227 if (IS_ERR(ocotp_dev->clk)) { in vf610_ocotp_probe()
229 PTR_ERR(ocotp_dev->clk)); in vf610_ocotp_probe()
230 return PTR_ERR(ocotp_dev->clk); in vf610_ocotp_probe()
232 ocotp_dev->dev = dev; in vf610_ocotp_probe()
233 ocotp_dev->timing = vf610_ocotp_calculate_timing(ocotp_dev); in vf610_ocotp_probe()
236 ocotp_config.priv = ocotp_dev; in vf610_ocotp_probe()
239 ocotp_dev->nvmem = devm_nvmem_register(dev, &ocotp_config); in vf610_ocotp_probe()
241 return PTR_ERR_OR_ZERO(ocotp_dev->nvmem); in vf610_ocotp_probe()