Lines Matching refs:custom
232 struct ltc2983_custom_sensor *custom; member
239 struct ltc2983_custom_sensor *custom; member
248 struct ltc2983_custom_sensor *custom; member
328 struct ltc2983_custom_sensor *custom, in __ltc2983_chan_custom_sensor_assign() argument
332 u8 mult = custom->is_steinhart ? LTC2983_CUSTOM_STEINHART_ENTRY_SZ : in __ltc2983_chan_custom_sensor_assign()
341 const u8 len = custom->is_steinhart ? 0 : in __ltc2983_chan_custom_sensor_assign()
342 (custom->size / LTC2983_CUSTOM_SENSOR_ENTRY_SZ) - 1; in __ltc2983_chan_custom_sensor_assign()
347 if (custom->offset < 0) { in __ltc2983_chan_custom_sensor_assign()
354 if (st->custom_table_size + custom->size > in __ltc2983_chan_custom_sensor_assign()
360 custom->size); in __ltc2983_chan_custom_sensor_assign()
364 custom->offset = st->custom_table_size / in __ltc2983_chan_custom_sensor_assign()
366 st->custom_table_size += custom->size; in __ltc2983_chan_custom_sensor_assign()
369 reg = (custom->offset * mult) + LTC2983_CUST_SENS_TBL_START_REG; in __ltc2983_chan_custom_sensor_assign()
372 *chan_val |= LTC2983_CUSTOM_ADDR(custom->offset); in __ltc2983_chan_custom_sensor_assign()
374 reg, custom->offset, in __ltc2983_chan_custom_sensor_assign()
375 custom->size); in __ltc2983_chan_custom_sensor_assign()
377 return regmap_bulk_write(st->regmap, reg, custom->table, custom->size); in __ltc2983_chan_custom_sensor_assign()
509 if (thermo->custom) { in ltc2983_thermocouple_assign_chan()
512 ret = __ltc2983_chan_custom_sensor_assign(st, thermo->custom, in ltc2983_thermocouple_assign_chan()
531 if (rtd->custom) { in ltc2983_rtd_assign_chan()
534 ret = __ltc2983_chan_custom_sensor_assign(st, rtd->custom, in ltc2983_rtd_assign_chan()
553 if (thermistor->custom) { in ltc2983_thermistor_assign_chan()
557 thermistor->custom, in ltc2983_thermistor_assign_chan()
675 thermo->custom = __ltc2983_custom_sensor_new(st, child, in ltc2983_thermocouple_new()
678 if (IS_ERR(thermo->custom)) { in ltc2983_thermocouple_new()
680 return ERR_CAST(thermo->custom); in ltc2983_thermocouple_new()
802 rtd->custom = __ltc2983_custom_sensor_new(st, child, in ltc2983_rtd_new()
805 if (IS_ERR(rtd->custom)) { in ltc2983_rtd_new()
807 return ERR_CAST(rtd->custom); in ltc2983_rtd_new()
924 thermistor->custom = __ltc2983_custom_sensor_new(st, child, in ltc2983_thermistor_new()
928 if (IS_ERR(thermistor->custom)) { in ltc2983_thermistor_new()
930 return ERR_CAST(thermistor->custom); in ltc2983_thermistor_new()