Lines Matching refs:ops

178 	if (tz->emul_temperature || !tz->ops->get_trend ||  in get_tz_trend()
179 tz->ops->get_trend(tz, trip, &trend)) { in get_tz_trend()
265 if (!pos->tzp && !pos->ops->bind) in bind_cdev()
268 if (pos->ops->bind) { in bind_cdev()
269 ret = pos->ops->bind(pos, cdev); in bind_cdev()
299 if (!tzp && !tz->ops->bind) in bind_tz()
305 if (tz->ops->bind) { in bind_tz()
307 ret = tz->ops->bind(tz, pos); in bind_tz()
371 tz->ops->get_trip_temp(tz, trip, &trip_temp); in handle_critical_trips()
379 if (tz->ops->notify) in handle_critical_trips()
380 tz->ops->notify(tz, trip, trip_type); in handle_critical_trips()
398 tz->ops->get_trip_type(tz, trip, &type); in handle_thermal_trip()
430 if (!tz || IS_ERR(tz) || !tz->ops->get_temp) in thermal_zone_get_temp()
435 ret = tz->ops->get_temp(tz, temp); in thermal_zone_get_temp()
441 ret = tz->ops->get_trip_type(tz, count, &type); in thermal_zone_get_temp()
443 ret = tz->ops->get_trip_temp(tz, count, &crit_temp); in thermal_zone_get_temp()
506 if (!tz->ops->get_temp) in thermal_zone_device_update()
559 if (!tz->ops->get_mode) in mode_show()
562 result = tz->ops->get_mode(tz, &mode); in mode_show()
577 if (!tz->ops->set_mode) in mode_store()
581 result = tz->ops->set_mode(tz, THERMAL_DEVICE_ENABLED); in mode_store()
583 result = tz->ops->set_mode(tz, THERMAL_DEVICE_DISABLED); in mode_store()
601 if (!tz->ops->get_trip_type) in trip_point_type_show()
607 result = tz->ops->get_trip_type(tz, trip, &type); in trip_point_type_show()
633 if (!tz->ops->set_trip_temp) in trip_point_temp_store()
642 ret = tz->ops->set_trip_temp(tz, trip, temperature); in trip_point_temp_store()
655 if (!tz->ops->get_trip_temp) in trip_point_temp_show()
661 ret = tz->ops->get_trip_temp(tz, trip, &temperature); in trip_point_temp_show()
677 if (!tz->ops->set_trip_hyst) in trip_point_hyst_store()
691 ret = tz->ops->set_trip_hyst(tz, trip, temperature); in trip_point_hyst_store()
704 if (!tz->ops->get_trip_hyst) in trip_point_hyst_show()
710 ret = tz->ops->get_trip_hyst(tz, trip, &temperature); in trip_point_hyst_show()
821 if (!tz->ops->set_emul_temp) { in emul_temp_store()
826 ret = tz->ops->set_emul_temp(tz, temperature); in emul_temp_store()
864 ret = cdev->ops->get_max_state(cdev, &state); in thermal_cooling_device_max_state_show()
878 ret = cdev->ops->get_cur_state(cdev, &state); in thermal_cooling_device_cur_state_show()
899 result = cdev->ops->set_cur_state(cdev, state); in thermal_cooling_device_cur_state_store()
992 ret = cdev->ops->get_max_state(cdev, &max_state); in thermal_zone_bind_cooling_device()
1147 const struct thermal_cooling_device_ops *ops) in __thermal_cooling_device_register() argument
1156 if (!ops || !ops->get_max_state || !ops->get_cur_state || in __thermal_cooling_device_register()
1157 !ops->set_cur_state) in __thermal_cooling_device_register()
1174 cdev->ops = ops; in __thermal_cooling_device_register()
1219 const struct thermal_cooling_device_ops *ops) in thermal_cooling_device_register() argument
1221 return __thermal_cooling_device_register(NULL, type, devdata, ops); in thermal_cooling_device_register()
1243 const struct thermal_cooling_device_ops *ops) in thermal_of_cooling_device_register() argument
1245 return __thermal_cooling_device_register(np, type, devdata, ops); in thermal_of_cooling_device_register()
1279 if (tz->ops->unbind) { in thermal_cooling_device_unregister()
1280 tz->ops->unbind(tz, cdev); in thermal_cooling_device_unregister()
1329 cdev->ops->set_cur_state(cdev, target); in thermal_cdev_update()
1379 if (tz->ops->get_trip_hyst) { in create_trip_attrs()
1422 if (!tz->ops->get_trip_hyst) in create_trip_attrs()
1432 if (tz->ops->set_trip_hyst) { in create_trip_attrs()
1453 if (tz->ops->get_trip_hyst) in remove_trip_attrs()
1488 struct thermal_zone_device_ops *ops, in thermal_zone_device_register() argument
1505 if (!ops) in thermal_zone_device_register()
1508 if (trips > 0 && (!ops->get_trip_type || !ops->get_trip_temp)) in thermal_zone_device_register()
1525 tz->ops = ops; in thermal_zone_device_register()
1554 if (ops->get_mode) { in thermal_zone_device_register()
1565 if (tz->ops->get_trip_type(tz, count, &trip_type)) in thermal_zone_device_register()
1569 if (tz->ops->get_trip_temp(tz, count, &trip_temp)) in thermal_zone_device_register()
1617 if (!tz->ops->get_temp) in thermal_zone_device_register()
1663 if (tz->ops->unbind) { in thermal_zone_device_unregister()
1664 tz->ops->unbind(tz, cdev); in thermal_zone_device_unregister()
1686 if (tz->ops->get_mode) in thermal_zone_device_unregister()