Lines Matching refs:custom

259 	struct ltc2983_custom_sensor *custom;
266 struct ltc2983_custom_sensor *custom;
275 struct ltc2983_custom_sensor *custom;
300 struct ltc2983_custom_sensor *custom;
361 struct ltc2983_custom_sensor *custom,
365 u8 mult = custom->is_steinhart ? LTC2983_CUSTOM_STEINHART_ENTRY_SZ :
369 * custom->size holds the raw size of the table. However, when
374 const u8 len = custom->is_steinhart ? 0 :
375 (custom->size / LTC2983_CUSTOM_SENSOR_ENTRY_SZ) - 1;
380 if (custom->offset < 0) {
383 * when this test was done (successfully) for this custom
387 if (st->custom_table_size + custom->size >
391 "Not space left(%d) for new custom sensor(%zu)",
393 custom->size);
397 custom->offset = st->custom_table_size /
399 st->custom_table_size += custom->size;
402 reg = (custom->offset * mult) + LTC2983_CUST_SENS_TBL_START_REG;
405 *chan_val |= LTC2983_CUSTOM_ADDR(custom->offset);
406 dev_dbg(dev, "Assign custom sensor, reg:0x%04X, off:%d, sz:%zu",
407 reg, custom->offset,
408 custom->size);
409 /* write custom sensor table */
410 return regmap_bulk_write(st->regmap, reg, custom->table, custom->size);
421 * For custom steinhart, the full u32 is taken. For all the others
453 dev_err(dev, "No space left(%d) for new custom sensor(%zu)",
547 if (thermo->custom) {
550 ret = __ltc2983_chan_custom_sensor_assign(st, thermo->custom,
569 if (rtd->custom) {
572 ret = __ltc2983_chan_custom_sensor_assign(st, rtd->custom,
591 if (thermistor->custom) {
595 thermistor->custom,
647 ret = __ltc2983_chan_custom_sensor_assign(st, temp->custom, &chan_val);
721 /* check custom sensor */
723 const char *propname = "adi,custom-thermocouple";
725 thermo->custom = __ltc2983_custom_sensor_new(st, child,
728 if (IS_ERR(thermo->custom)) {
729 ret = PTR_ERR(thermo->custom);
854 /* check custom sensor */
856 rtd->custom = __ltc2983_custom_sensor_new(st, child,
857 "adi,custom-rtd",
859 if (IS_ERR(rtd->custom)) {
860 ret = PTR_ERR(rtd->custom);
965 /* check custom sensor */
972 propname = "adi,custom-steinhart";
974 propname = "adi,custom-thermistor";
977 thermistor->custom = __ltc2983_custom_sensor_new(st, child,
981 if (IS_ERR(thermistor->custom)) {
982 ret = PTR_ERR(thermistor->custom);
993 /* Auto range is not allowed for custom sensors */
1007 "Auto Range not allowed for custom sensors\n");
1211 temp->custom = __ltc2983_custom_sensor_new(st, child, "adi,custom-temp",
1213 if (IS_ERR(temp->custom))
1214 return ERR_CAST(temp->custom);