Lines Matching defs:state
605 unsigned long state;
608 ret = cdev->ops->get_cur_state(cdev, &state);
611 return sprintf(buf, "%ld\n", state);
619 unsigned long state;
622 if (sscanf(buf, "%ld\n", &state) != 1)
625 if ((long)state < 0)
628 /* Requested state should be less than max_state + 1 */
629 if (state > cdev->max_state)
634 result = cdev->ops->set_cur_state(cdev, state);
636 thermal_cooling_device_stats_update(cdev, state);
668 unsigned long state;
679 stats->time_in_state[stats->state] =
680 ktime_add(stats->time_in_state[stats->state], delta);
696 if (stats->state == new_state)
700 stats->trans_table[stats->state * (cdev->max_state + 1) + new_state]++;
701 stats->state = new_state;
751 len += sprintf(buf + len, "state%u\t%llu\n", i,
817 len += snprintf(buf + len, PAGE_SIZE - len, "state%2u ", i);
830 len += snprintf(buf + len, PAGE_SIZE - len, "state%2u:", i);
876 /* Total number of states is highest state + 1 */