Lines Matching refs:module_tz

408 mlxsw_thermal_module_tz_init(struct mlxsw_thermal_module *module_tz)  in mlxsw_thermal_module_tz_init()  argument
413 if (module_tz->slot_index) in mlxsw_thermal_module_tz_init()
415 module_tz->slot_index, module_tz->module + 1); in mlxsw_thermal_module_tz_init()
418 module_tz->module + 1); in mlxsw_thermal_module_tz_init()
419 module_tz->tzdev = thermal_zone_device_register_with_trips(tz_name, in mlxsw_thermal_module_tz_init()
420 module_tz->trips, in mlxsw_thermal_module_tz_init()
423 module_tz, in mlxsw_thermal_module_tz_init()
427 module_tz->parent->polling_delay); in mlxsw_thermal_module_tz_init()
428 if (IS_ERR(module_tz->tzdev)) { in mlxsw_thermal_module_tz_init()
429 err = PTR_ERR(module_tz->tzdev); in mlxsw_thermal_module_tz_init()
433 err = thermal_zone_device_enable(module_tz->tzdev); in mlxsw_thermal_module_tz_init()
435 thermal_zone_device_unregister(module_tz->tzdev); in mlxsw_thermal_module_tz_init()
450 struct mlxsw_thermal_module *module_tz; in mlxsw_thermal_module_init() local
452 module_tz = &area->tz_module_arr[module]; in mlxsw_thermal_module_init()
454 if (module_tz->parent) in mlxsw_thermal_module_init()
456 module_tz->module = module; in mlxsw_thermal_module_init()
457 module_tz->slot_index = area->slot_index; in mlxsw_thermal_module_init()
458 module_tz->parent = thermal; in mlxsw_thermal_module_init()
461 memcpy(module_tz->trips, default_thermal_module_trips, in mlxsw_thermal_module_init()
463 memcpy(module_tz->cooling_states, default_cooling_states, in mlxsw_thermal_module_init()
467 static void mlxsw_thermal_module_fini(struct mlxsw_thermal_module *module_tz) in mlxsw_thermal_module_fini() argument
469 if (module_tz && module_tz->tzdev) { in mlxsw_thermal_module_fini()
470 mlxsw_thermal_module_tz_fini(module_tz->tzdev); in mlxsw_thermal_module_fini()
471 module_tz->tzdev = NULL; in mlxsw_thermal_module_fini()
472 module_tz->parent = NULL; in mlxsw_thermal_module_fini()
481 struct mlxsw_thermal_module *module_tz; in mlxsw_thermal_modules_init() local
507 module_tz = &area->tz_module_arr[i]; in mlxsw_thermal_modules_init()
508 if (!module_tz->parent) in mlxsw_thermal_modules_init()
510 err = mlxsw_thermal_module_tz_init(module_tz); in mlxsw_thermal_modules_init()