Lines Matching refs:th_handle

2126 static struct snc_thermal_ctrl *th_handle;  variable
2145 if ((mode && !(th_handle->profiles & mode)) || mode >= THM_PROFILE_MAX) in sony_nc_thermal_mode_set()
2151 th_handle->mode = mode; in sony_nc_thermal_mode_set()
2173 if (!cnt || (th_handle->profiles & cnt)) in sony_nc_thermal_profiles_show()
2223 th_handle = kzalloc(sizeof(struct snc_thermal_ctrl), GFP_KERNEL); in sony_nc_thermal_setup()
2224 if (!th_handle) in sony_nc_thermal_setup()
2227 ret = sony_call_snc_handle(0x0122, 0x0000, &th_handle->profiles); in sony_nc_thermal_setup()
2238 th_handle->mode = ret; in sony_nc_thermal_setup()
2240 sysfs_attr_init(&th_handle->profiles_attr.attr); in sony_nc_thermal_setup()
2241 th_handle->profiles_attr.attr.name = "thermal_profiles"; in sony_nc_thermal_setup()
2242 th_handle->profiles_attr.attr.mode = S_IRUGO; in sony_nc_thermal_setup()
2243 th_handle->profiles_attr.show = sony_nc_thermal_profiles_show; in sony_nc_thermal_setup()
2245 sysfs_attr_init(&th_handle->mode_attr.attr); in sony_nc_thermal_setup()
2246 th_handle->mode_attr.attr.name = "thermal_control"; in sony_nc_thermal_setup()
2247 th_handle->mode_attr.attr.mode = S_IRUGO | S_IWUSR; in sony_nc_thermal_setup()
2248 th_handle->mode_attr.show = sony_nc_thermal_mode_show; in sony_nc_thermal_setup()
2249 th_handle->mode_attr.store = sony_nc_thermal_mode_store; in sony_nc_thermal_setup()
2251 ret = device_create_file(&pd->dev, &th_handle->profiles_attr); in sony_nc_thermal_setup()
2255 ret = device_create_file(&pd->dev, &th_handle->mode_attr); in sony_nc_thermal_setup()
2262 device_remove_file(&pd->dev, &th_handle->profiles_attr); in sony_nc_thermal_setup()
2264 kfree(th_handle); in sony_nc_thermal_setup()
2265 th_handle = NULL; in sony_nc_thermal_setup()
2271 if (th_handle) { in sony_nc_thermal_cleanup()
2272 device_remove_file(&pd->dev, &th_handle->profiles_attr); in sony_nc_thermal_cleanup()
2273 device_remove_file(&pd->dev, &th_handle->mode_attr); in sony_nc_thermal_cleanup()
2274 kfree(th_handle); in sony_nc_thermal_cleanup()
2275 th_handle = NULL; in sony_nc_thermal_cleanup()
2284 if (status != th_handle->mode) in sony_nc_thermal_resume()
2285 sony_nc_thermal_mode_set(th_handle->mode); in sony_nc_thermal_resume()