Lines Matching +full:1 +full:- +full:cell

18 #include <linux/nvmem-consumer.h>
29 struct device *dev = &pdev->dev; in rockchip_cpuinfo_probe()
30 struct nvmem_cell *cell; in rockchip_cpuinfo_probe() local
35 cell = nvmem_cell_get(dev, "cpu-code"); in rockchip_cpuinfo_probe()
36 if (!IS_ERR(cell)) { in rockchip_cpuinfo_probe()
37 efuse_buf = nvmem_cell_read(cell, &len); in rockchip_cpuinfo_probe()
38 nvmem_cell_put(cell); in rockchip_cpuinfo_probe()
43 rockchip_set_cpu((efuse_buf[0] << 8 | efuse_buf[1])); in rockchip_cpuinfo_probe()
47 cell = nvmem_cell_get(dev, "cpu-version"); in rockchip_cpuinfo_probe()
48 if (!IS_ERR(cell)) { in rockchip_cpuinfo_probe()
49 efuse_buf = nvmem_cell_read(cell, &len); in rockchip_cpuinfo_probe()
50 nvmem_cell_put(cell); in rockchip_cpuinfo_probe()
54 if ((len == 1) && (efuse_buf[0] > rockchip_get_cpu_version())) in rockchip_cpuinfo_probe()
59 cell = nvmem_cell_get(dev, "id"); in rockchip_cpuinfo_probe()
60 if (IS_ERR(cell)) { in rockchip_cpuinfo_probe()
61 dev_err(dev, "failed to get id cell: %ld\n", PTR_ERR(cell)); in rockchip_cpuinfo_probe()
62 if (PTR_ERR(cell) == -EPROBE_DEFER) in rockchip_cpuinfo_probe()
63 return PTR_ERR(cell); in rockchip_cpuinfo_probe()
64 return PTR_ERR(cell); in rockchip_cpuinfo_probe()
66 efuse_buf = nvmem_cell_read(cell, &len); in rockchip_cpuinfo_probe()
67 nvmem_cell_put(cell); in rockchip_cpuinfo_probe()
74 return -EINVAL; in rockchip_cpuinfo_probe()
78 buf[i] = efuse_buf[1 + (i << 1)]; in rockchip_cpuinfo_probe()
79 buf[i + 8] = efuse_buf[i << 1]; in rockchip_cpuinfo_probe()
106 .name = "rockchip-cpuinfo",
230 rockchip_set_cpu_version(1); in rk356x_set_cpu_version()