Lines Matching refs:rail
76 iccsense->rail = kmalloc_array(cnt, sizeof(struct pwr_rail_t), in nvbios_iccsense_parse()
78 if (!iccsense->rail) in nvbios_iccsense_parse()
83 struct pwr_rail_t *rail = &iccsense->rail[i]; in nvbios_iccsense_parse() local
92 rail->mode = 1; in nvbios_iccsense_parse()
94 rail->mode = 0; in nvbios_iccsense_parse()
95 rail->extdev_id = nvbios_rd08(bios, entry + 0x2); in nvbios_iccsense_parse()
99 rail->mode = nvbios_rd08(bios, entry); in nvbios_iccsense_parse()
100 rail->extdev_id = nvbios_rd08(bios, entry + 0x1); in nvbios_iccsense_parse()
105 if (nvbios_extdev_parse(bios, rail->extdev_id, &extdev)) in nvbios_iccsense_parse()
111 rail->resistor_count = 1; in nvbios_iccsense_parse()
114 rail->resistor_count = 3; in nvbios_iccsense_parse()
117 rail->resistor_count = 0; in nvbios_iccsense_parse()
121 for (r = 0; r < rail->resistor_count; ++r) { in nvbios_iccsense_parse()
122 rail->resistors[r].mohm = nvbios_rd08(bios, entry + res_start + r * 2); in nvbios_iccsense_parse()
123 rail->resistors[r].enabled = !(nvbios_rd08(bios, entry + res_start + r * 2 + 1) & 0x40); in nvbios_iccsense_parse()
125 rail->config = nvbios_rd16(bios, entry + res_start + rail->resistor_count * 2); in nvbios_iccsense_parse()