Lines Matching refs:custom

260 	struct ltc2983_custom_sensor *custom;
267 struct ltc2983_custom_sensor *custom;
276 struct ltc2983_custom_sensor *custom;
301 struct ltc2983_custom_sensor *custom;
362 struct ltc2983_custom_sensor *custom,
366 u8 mult = custom->is_steinhart ? LTC2983_CUSTOM_STEINHART_ENTRY_SZ :
370 * custom->size holds the raw size of the table. However, when
375 const u8 len = custom->is_steinhart ? 0 :
376 (custom->size / LTC2983_CUSTOM_SENSOR_ENTRY_SZ) - 1;
381 if (custom->offset < 0) {
384 * when this test was done (successfully) for this custom
388 if (st->custom_table_size + custom->size >
392 "Not space left(%d) for new custom sensor(%zu)",
394 custom->size);
398 custom->offset = st->custom_table_size /
400 st->custom_table_size += custom->size;
403 reg = (custom->offset * mult) + LTC2983_CUST_SENS_TBL_START_REG;
406 *chan_val |= LTC2983_CUSTOM_ADDR(custom->offset);
407 dev_dbg(dev, "Assign custom sensor, reg:0x%04X, off:%d, sz:%zu",
408 reg, custom->offset,
409 custom->size);
410 /* write custom sensor table */
411 return regmap_bulk_write(st->regmap, reg, custom->table, custom->size);
422 * For custom steinhart, the full u32 is taken. For all the others
454 dev_err(dev, "No space left(%d) for new custom sensor(%zu)",
548 if (thermo->custom) {
551 ret = __ltc2983_chan_custom_sensor_assign(st, thermo->custom,
570 if (rtd->custom) {
573 ret = __ltc2983_chan_custom_sensor_assign(st, rtd->custom,
592 if (thermistor->custom) {
596 thermistor->custom,
648 ret = __ltc2983_chan_custom_sensor_assign(st, temp->custom, &chan_val);
722 /* check custom sensor */
724 const char *propname = "adi,custom-thermocouple";
726 thermo->custom = __ltc2983_custom_sensor_new(st, child,
729 if (IS_ERR(thermo->custom)) {
730 ret = PTR_ERR(thermo->custom);
855 /* check custom sensor */
857 rtd->custom = __ltc2983_custom_sensor_new(st, child,
858 "adi,custom-rtd",
860 if (IS_ERR(rtd->custom)) {
861 ret = PTR_ERR(rtd->custom);
966 /* check custom sensor */
973 propname = "adi,custom-steinhart";
975 propname = "adi,custom-thermistor";
978 thermistor->custom = __ltc2983_custom_sensor_new(st, child,
982 if (IS_ERR(thermistor->custom)) {
983 ret = PTR_ERR(thermistor->custom);
994 /* Auto range is not allowed for custom sensors */
1008 "Auto Range not allowed for custom sensors\n");
1212 temp->custom = __ltc2983_custom_sensor_new(st, child, "adi,custom-temp",
1214 if (IS_ERR(temp->custom))
1215 return ERR_CAST(temp->custom);