Lines Matching +full:micro +full:- +full:ab

1 // SPDX-License-Identifier: GPL-2.0-or-later
5 * Copyright (c) 2011 Ericsson AB.
60 .R = -2,
64 .b = -1833,
65 .R = -2,
69 .b = -537,
70 .R = -2,
74 .b = -2908,
75 .R = -3,
79 .b = -5646,
80 .R = -4,
84 .b = -14500,
85 .R = -2,
91 .b = -1800,
92 .R = -2,
96 .b = -1800,
97 .R = -2,
101 .b = -5200,
102 .R = -2,
106 .b = -3100,
107 .R = -2,
111 .b = -3300,
112 .R = -2,
116 .b = -1900,
117 .R = -2,
126 .b = -642,
127 .R = -2,
132 .R = -2,
137 .R = -2,
142 .R = -2,
147 .R = -3,
152 .R = -3,
161 .b = -1200,
162 .R = -2,
166 .b = -2400,
167 .R = -2,
171 .b = -1200,
172 .R = -2,
176 .b = -600,
177 .R = -2,
181 .b = -6000,
182 .R = -3,
186 .b = -8000,
187 .R = -3,
196 .b = -140,
197 .R = -2,
202 .R = -2,
206 .b = -504,
207 .R = -2,
212 .R = -2,
216 .b = -4000,
217 .R = -3,
221 .b = -965,
222 .R = -3,
251 switch (data->id) { in lm25066_read_word_data()
317 ret = -ENODATA; in lm25066_read_word_data()
370 ret = -ENODATA; in lm25056_read_byte_data()
394 word = ((s16)word < 0) ? 0 : clamp_val(word, 0, data->rlimit); in lm25066_write_word_data()
398 word = ((s16)word < 0) ? 0 : clamp_val(word, 0, data->rlimit); in lm25066_write_word_data()
404 word = ((s16)word < 0) ? 0 : clamp_val(word, 0, data->rlimit); in lm25066_write_word_data()
412 word = ((s16)word < 0) ? 0 : clamp_val(word, 0, data->rlimit); in lm25066_write_word_data()
419 word = ((s16)word < 0) ? 0 : clamp_val(word, 0, data->rlimit); in lm25066_write_word_data()
432 ret = -ENODATA; in lm25066_write_word_data()
472 if (!i2c_check_functionality(client->adapter, in lm25066_probe()
474 return -ENODEV; in lm25066_probe()
476 data = devm_kzalloc(&client->dev, sizeof(struct lm25066_data), in lm25066_probe()
479 return -ENOMEM; in lm25066_probe()
485 data->id = (enum chips)(unsigned long)i2c_get_match_data(client); in lm25066_probe()
487 info = &data->info; in lm25066_probe()
489 info->pages = 1; in lm25066_probe()
490 info->format[PSC_VOLTAGE_IN] = direct; in lm25066_probe()
491 info->format[PSC_VOLTAGE_OUT] = direct; in lm25066_probe()
492 info->format[PSC_CURRENT_IN] = direct; in lm25066_probe()
493 info->format[PSC_TEMPERATURE] = direct; in lm25066_probe()
494 info->format[PSC_POWER] = direct; in lm25066_probe()
496 info->func[0] = PMBUS_HAVE_VIN | PMBUS_HAVE_VMON in lm25066_probe()
500 if (data->id == lm25056) { in lm25066_probe()
501 info->func[0] |= PMBUS_HAVE_STATUS_VMON; in lm25066_probe()
502 info->read_word_data = lm25056_read_word_data; in lm25066_probe()
503 info->read_byte_data = lm25056_read_byte_data; in lm25066_probe()
504 data->rlimit = 0x0fff; in lm25066_probe()
506 info->func[0] |= PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT; in lm25066_probe()
507 info->read_word_data = lm25066_read_word_data; in lm25066_probe()
508 data->rlimit = 0x0fff; in lm25066_probe()
510 info->write_word_data = lm25066_write_word_data; in lm25066_probe()
512 coeff = &lm25066_coeff[data->id][0]; in lm25066_probe()
513 info->m[PSC_TEMPERATURE] = coeff[PSC_TEMPERATURE].m; in lm25066_probe()
514 info->b[PSC_TEMPERATURE] = coeff[PSC_TEMPERATURE].b; in lm25066_probe()
515 info->R[PSC_TEMPERATURE] = coeff[PSC_TEMPERATURE].R; in lm25066_probe()
516 info->m[PSC_VOLTAGE_IN] = coeff[PSC_VOLTAGE_IN].m; in lm25066_probe()
517 info->b[PSC_VOLTAGE_IN] = coeff[PSC_VOLTAGE_IN].b; in lm25066_probe()
518 info->R[PSC_VOLTAGE_IN] = coeff[PSC_VOLTAGE_IN].R; in lm25066_probe()
519 info->m[PSC_VOLTAGE_OUT] = coeff[PSC_VOLTAGE_OUT].m; in lm25066_probe()
520 info->b[PSC_VOLTAGE_OUT] = coeff[PSC_VOLTAGE_OUT].b; in lm25066_probe()
521 info->R[PSC_VOLTAGE_OUT] = coeff[PSC_VOLTAGE_OUT].R; in lm25066_probe()
522 info->R[PSC_CURRENT_IN] = coeff[PSC_CURRENT_IN].R; in lm25066_probe()
523 info->R[PSC_POWER] = coeff[PSC_POWER].R; in lm25066_probe()
525 info->m[PSC_CURRENT_IN] = coeff[PSC_CURRENT_IN_L].m; in lm25066_probe()
526 info->b[PSC_CURRENT_IN] = coeff[PSC_CURRENT_IN_L].b; in lm25066_probe()
527 info->m[PSC_POWER] = coeff[PSC_POWER_L].m; in lm25066_probe()
528 info->b[PSC_POWER] = coeff[PSC_POWER_L].b; in lm25066_probe()
530 info->m[PSC_CURRENT_IN] = coeff[PSC_CURRENT_IN].m; in lm25066_probe()
531 info->b[PSC_CURRENT_IN] = coeff[PSC_CURRENT_IN].b; in lm25066_probe()
532 info->m[PSC_POWER] = coeff[PSC_POWER].m; in lm25066_probe()
533 info->b[PSC_POWER] = coeff[PSC_POWER].b; in lm25066_probe()
540 if (of_property_read_u32(client->dev.of_node, "shunt-resistor-micro-ohms", &shunt)) in lm25066_probe()
543 info->m[PSC_CURRENT_IN] = info->m[PSC_CURRENT_IN] * shunt / 1000; in lm25066_probe()
544 info->m[PSC_POWER] = info->m[PSC_POWER] * shunt / 1000; in lm25066_probe()
548 if (data->id != lm25056) { in lm25066_probe()
549 info->num_regulators = ARRAY_SIZE(lm25066_reg_desc); in lm25066_probe()
550 info->reg_desc = lm25066_reg_desc; in lm25066_probe()