Lines Matching refs:suspend_stats

312 struct suspend_stats {  struct
327 static struct suspend_stats suspend_stats; argument
334 strscpy(suspend_stats.failed_devs[suspend_stats.last_failed_dev], in dpm_save_failed_dev()
335 name, sizeof(suspend_stats.failed_devs[0])); in dpm_save_failed_dev()
336 suspend_stats.last_failed_dev++; in dpm_save_failed_dev()
337 suspend_stats.last_failed_dev %= REC_FAILED_NUM; in dpm_save_failed_dev()
344 suspend_stats.step_failures[step-1]++; in dpm_save_failed_step()
345 suspend_stats.failed_steps[suspend_stats.last_failed_step] = step; in dpm_save_failed_step()
346 suspend_stats.last_failed_step++; in dpm_save_failed_step()
347 suspend_stats.last_failed_step %= REC_FAILED_NUM; in dpm_save_failed_step()
353 suspend_stats.success++; in dpm_save_errno()
357 suspend_stats.fail++; in dpm_save_errno()
359 suspend_stats.errno[suspend_stats.last_failed_errno] = err; in dpm_save_errno()
360 suspend_stats.last_failed_errno++; in dpm_save_errno()
361 suspend_stats.last_failed_errno %= REC_FAILED_NUM; in dpm_save_errno()
366 suspend_stats.last_hw_sleep = t; in pm_report_hw_sleep_time()
367 suspend_stats.total_hw_sleep += t; in pm_report_hw_sleep_time()
373 suspend_stats.max_hw_sleep = t; in pm_report_max_hw_sleep()
393 return sysfs_emit(buf, format_str, suspend_stats._name);\
408 suspend_stats.step_failures[step-1]); \
427 index = suspend_stats.last_failed_dev + REC_FAILED_NUM - 1; in last_failed_dev_show()
429 last_failed_dev = suspend_stats.failed_devs[index]; in last_failed_dev_show()
441 index = suspend_stats.last_failed_errno + REC_FAILED_NUM - 1; in last_failed_errno_show()
443 last_failed_errno = suspend_stats.errno[index]; in last_failed_errno_show()
455 index = suspend_stats.last_failed_step + REC_FAILED_NUM - 1; in last_failed_step_show()
457 step = suspend_stats.failed_steps[index]; in last_failed_step_show()
509 last_dev = suspend_stats.last_failed_dev + REC_FAILED_NUM - 1; in suspend_stats_show()
511 last_errno = suspend_stats.last_failed_errno + REC_FAILED_NUM - 1; in suspend_stats_show()
513 last_step = suspend_stats.last_failed_step + REC_FAILED_NUM - 1; in suspend_stats_show()
517 suspend_stats.success, suspend_stats.fail); in suspend_stats_show()
521 suspend_stats.step_failures[step-1]); in suspend_stats_show()
524 suspend_stats.failed_devs[last_dev]); in suspend_stats_show()
528 seq_printf(s, "\t\t\t%-s\n", suspend_stats.failed_devs[index]); in suspend_stats_show()
531 suspend_stats.errno[last_errno]); in suspend_stats_show()
535 seq_printf(s, "\t\t\t%-d\n", suspend_stats.errno[index]); in suspend_stats_show()
538 suspend_step_names[suspend_stats.failed_steps[last_step]]); in suspend_stats_show()
543 suspend_step_names[suspend_stats.failed_steps[index]]); in suspend_stats_show()
548 DEFINE_SHOW_ATTRIBUTE(suspend_stats);