Lines Matching +full:reg +full:- +full:spacing
1 // SPDX-License-Identifier: GPL-2.0+
24 if (p->iftype == IPMI_PLAT_IF_SI) { in ipmi_platform_add()
25 if (p->type == SI_BT) in ipmi_platform_add()
27 else if (p->type != SI_TYPE_INVALID) in ipmi_platform_add()
30 if (p->regsize == 0) in ipmi_platform_add()
31 p->regsize = DEFAULT_REGSIZE; in ipmi_platform_add()
32 if (p->regspacing == 0) in ipmi_platform_add()
33 p->regspacing = p->regsize; in ipmi_platform_add()
35 pr[pidx++] = PROPERTY_ENTRY_U8("ipmi-type", p->type); in ipmi_platform_add()
36 } else if (p->iftype == IPMI_PLAT_IF_SSIF) { in ipmi_platform_add()
37 pr[pidx++] = PROPERTY_ENTRY_U16("i2c-addr", p->addr); in ipmi_platform_add()
40 if (p->slave_addr) in ipmi_platform_add()
41 pr[pidx++] = PROPERTY_ENTRY_U8("slave-addr", p->slave_addr); in ipmi_platform_add()
42 pr[pidx++] = PROPERTY_ENTRY_U8("addr-source", p->addr_source); in ipmi_platform_add()
43 if (p->regshift) in ipmi_platform_add()
44 pr[pidx++] = PROPERTY_ENTRY_U8("reg-shift", p->regshift); in ipmi_platform_add()
45 pr[pidx++] = PROPERTY_ENTRY_U8("reg-size", p->regsize); in ipmi_platform_add()
60 * Register spacing is derived from the resources in in ipmi_platform_add()
64 if (p->space == IPMI_IO_ADDR_SPACE) in ipmi_platform_add()
69 r[0].start = p->addr; in ipmi_platform_add()
70 r[0].end = r[0].start + p->regsize - 1; in ipmi_platform_add()
75 r[1].start = r[0].start + p->regspacing; in ipmi_platform_add()
76 r[1].end = r[1].start + p->regsize - 1; in ipmi_platform_add()
83 r[2].start = r[1].start + p->regspacing; in ipmi_platform_add()
84 r[2].end = r[2].start + p->regsize - 1; in ipmi_platform_add()
90 if (p->irq) { in ipmi_platform_add()
91 r[num_r].start = p->irq; in ipmi_platform_add()
92 r[num_r].end = p->irq; in ipmi_platform_add()
100 dev_err(&pdev->dev, in ipmi_platform_add()
101 "Unable to add hard-code resources: %d\n", rv); in ipmi_platform_add()
105 rv = device_create_managed_software_node(&pdev->dev, pr, NULL); in ipmi_platform_add()
107 dev_err(&pdev->dev, in ipmi_platform_add()
108 "Unable to add hard-code properties: %d\n", rv); in ipmi_platform_add()
114 dev_err(&pdev->dev, in ipmi_platform_add()
115 "Unable to add hard-code device: %d\n", rv); in ipmi_platform_add()