Lines Matching refs:cdi
96 static int probe_cdev(struct cdev_info *cdi, char *path) in probe_cdev() argument
98 sysfs_get_string(path, "type", cdi->type); in probe_cdev()
99 sysfs_get_ulong(path, "max_state", &cdi->max_state); in probe_cdev()
100 sysfs_get_ulong(path, "cur_state", &cdi->cur_state); in probe_cdev()
104 cdi->type, cdi->max_state, cdi->cur_state, cdi->instance); in probe_cdev()
366 sysfs_get_string(cdev_name, "type", ptdata.cdi[k].type); in scan_cdevs()
367 ptdata.cdi[k].instance = i; in scan_cdevs()
368 if (strstr(ptdata.cdi[k].type, ctrl_cdev)) { in scan_cdevs()
369 ptdata.cdi[k].flag |= CDEV_FLAG_IN_CONTROL; in scan_cdevs()
450 ptdata.cdi = calloc(ptdata.max_cdev_instance + 1, in probe_thermal_sysfs()
452 if (!ptdata.cdi) { in probe_thermal_sysfs()
515 ptdata.cdi[i].instance); in update_thermal_data()
516 probe_cdev(&ptdata.cdi[i], cdev_name); in update_thermal_data()
517 val = ptdata.cdi[i].cur_state; in update_thermal_data()
542 if (ptdata.cdi[i].flag & CDEV_FLAG_IN_CONTROL) { in set_ctrl_state()
543 if (ptdata.cdi[i].max_state < 10) { in set_ctrl_state()
548 cdev_state = state * ptdata.cdi[i].max_state/100; in set_ctrl_state()
551 ptdata.cdi[i].instance, state, cdev_state); in set_ctrl_state()
553 CDEV, ptdata.cdi[i].instance); in set_ctrl_state()
571 if (ptdata.cdi[i].flag & CDEV_FLAG_IN_CONTROL) { in get_ctrl_state()
572 ctrl_cdev_id = ptdata.cdi[i].instance; in get_ctrl_state()
574 ptdata.cdi[i].instance); in get_ctrl_state()
590 free(ptdata.cdi); in free_thermal_data()