Lines Matching defs:new_custom
418 struct ltc2983_custom_sensor *new_custom;
438 new_custom = devm_kzalloc(dev, sizeof(*new_custom), GFP_KERNEL);
439 if (!new_custom)
442 new_custom->size = n_entries * n_size;
444 if (is_steinhart && new_custom->size != LTC2983_CUSTOM_STEINHART_SIZE) {
445 dev_err(dev, "Steinhart sensors size(%zu) must be %u\n", new_custom->size,
450 if (st->custom_table_size + new_custom->size >
454 st->custom_table_size, new_custom->size);
460 new_custom->table = devm_kcalloc(dev, n_entries, sizeof(u32), GFP_KERNEL);
462 new_custom->table = devm_kcalloc(dev, n_entries, sizeof(u64), GFP_KERNEL);
463 if (!new_custom->table)
474 ret = fwnode_property_read_u32_array(fn, propname, new_custom->table, n_entries);
478 cpu_to_be32_array(new_custom->table, new_custom->table, n_entries);
480 ret = fwnode_property_read_u64_array(fn, propname, new_custom->table, n_entries);
485 u64 temp = ((u64 *)new_custom->table)[index];
494 put_unaligned_be24(temp, new_custom->table + index * 3);
498 new_custom->is_steinhart = is_steinhart;
511 new_custom->offset = st->custom_table_size /
513 st->custom_table_size += new_custom->size;
516 new_custom->offset = -1;
519 return new_custom;