Lines Matching refs:th_handle

2124 static struct snc_thermal_ctrl *th_handle;  variable
2143 if ((mode && !(th_handle->profiles & mode)) || mode >= THM_PROFILE_MAX) in sony_nc_thermal_mode_set()
2149 th_handle->mode = mode; in sony_nc_thermal_mode_set()
2171 if (!cnt || (th_handle->profiles & cnt)) in sony_nc_thermal_profiles_show()
2221 th_handle = kzalloc(sizeof(struct snc_thermal_ctrl), GFP_KERNEL); in sony_nc_thermal_setup()
2222 if (!th_handle) in sony_nc_thermal_setup()
2225 ret = sony_call_snc_handle(0x0122, 0x0000, &th_handle->profiles); in sony_nc_thermal_setup()
2236 th_handle->mode = ret; in sony_nc_thermal_setup()
2238 sysfs_attr_init(&th_handle->profiles_attr.attr); in sony_nc_thermal_setup()
2239 th_handle->profiles_attr.attr.name = "thermal_profiles"; in sony_nc_thermal_setup()
2240 th_handle->profiles_attr.attr.mode = S_IRUGO; in sony_nc_thermal_setup()
2241 th_handle->profiles_attr.show = sony_nc_thermal_profiles_show; in sony_nc_thermal_setup()
2243 sysfs_attr_init(&th_handle->mode_attr.attr); in sony_nc_thermal_setup()
2244 th_handle->mode_attr.attr.name = "thermal_control"; in sony_nc_thermal_setup()
2245 th_handle->mode_attr.attr.mode = S_IRUGO | S_IWUSR; in sony_nc_thermal_setup()
2246 th_handle->mode_attr.show = sony_nc_thermal_mode_show; in sony_nc_thermal_setup()
2247 th_handle->mode_attr.store = sony_nc_thermal_mode_store; in sony_nc_thermal_setup()
2249 ret = device_create_file(&pd->dev, &th_handle->profiles_attr); in sony_nc_thermal_setup()
2253 ret = device_create_file(&pd->dev, &th_handle->mode_attr); in sony_nc_thermal_setup()
2260 device_remove_file(&pd->dev, &th_handle->profiles_attr); in sony_nc_thermal_setup()
2262 kfree(th_handle); in sony_nc_thermal_setup()
2263 th_handle = NULL; in sony_nc_thermal_setup()
2269 if (th_handle) { in sony_nc_thermal_cleanup()
2270 device_remove_file(&pd->dev, &th_handle->profiles_attr); in sony_nc_thermal_cleanup()
2271 device_remove_file(&pd->dev, &th_handle->mode_attr); in sony_nc_thermal_cleanup()
2272 kfree(th_handle); in sony_nc_thermal_cleanup()
2273 th_handle = NULL; in sony_nc_thermal_cleanup()
2282 if (status != th_handle->mode) in sony_nc_thermal_resume()
2283 sony_nc_thermal_mode_set(th_handle->mode); in sony_nc_thermal_resume()