Lines Matching full:profile
3 /* Platform profile sysfs interface */
47 * _commmon_choices_show - Show the available profile choices
48 * @choices: The available profile choices
69 * _store_class_profile - Set the profile for a class device
71 * @data: The profile to set
89 * _notify_class_profile - Notify the class device of a profile change
100 sysfs_notify(&handler->dev.kobj, NULL, "profile"); in _notify_class_profile()
107 * get_class_profile - Show the current profile for a class device
109 * @profile: The profile to return
114 enum platform_profile_option *profile) in get_class_profile() argument
124 pr_err("Failed to get profile for handler %s\n", handler->name); in get_class_profile()
130 *profile = val; in get_class_profile()
136 * name_show - Show the name of the profile handler
152 * choices_show - Show the available profile choices
170 * profile_show - Show the current profile for a class device
181 enum platform_profile_option profile = PLATFORM_PROFILE_LAST; in profile_show() local
185 err = get_class_profile(dev, &profile); in profile_show()
190 return sysfs_emit(buf, "%s\n", profile_names[profile]); in profile_show()
194 * profile_store - Set the profile for a class device
222 static DEVICE_ATTR_RW(profile);
230 ATTRIBUTE_GROUPS(profile);
240 .name = "platform-profile",
246 * _aggregate_choices - Aggregate the available profile choices
291 * platform_profile_choices_show - Show the available profile choices for legacy sysfs interface
322 /* no profile handler registered any more */ in platform_profile_choices_show()
332 * @data: The profile to return
338 enum platform_profile_option *profile = data; in _aggregate_profiles() local
346 if (*profile != PLATFORM_PROFILE_LAST && *profile != val) in _aggregate_profiles()
347 *profile = PLATFORM_PROFILE_CUSTOM; in _aggregate_profiles()
349 *profile = val; in _aggregate_profiles()
357 * @data: The profile to return
363 enum platform_profile_option *profile = data; in _store_and_notify() local
366 err = _store_class_profile(dev, profile); in _store_and_notify()
373 * platform_profile_show - Show the current profile for legacy sysfs interface
384 enum platform_profile_option profile = PLATFORM_PROFILE_LAST; in platform_profile_show() local
389 &profile, _aggregate_profiles); in platform_profile_show()
394 /* no profile handler registered any more */ in platform_profile_show()
395 if (profile == PLATFORM_PROFILE_LAST) in platform_profile_show()
398 return sysfs_emit(buf, "%s\n", profile_names[profile]); in platform_profile_show()
402 * platform_profile_store - Set the profile for legacy sysfs interface
421 /* Scan for a matching profile */ in platform_profile_store()
502 enum platform_profile_option profile = PLATFORM_PROFILE_LAST; in platform_profile_cycle() local
508 &profile, _aggregate_profiles); in platform_profile_cycle()
512 if (profile == PLATFORM_PROFILE_CUSTOM || in platform_profile_cycle()
513 profile == PLATFORM_PROFILE_LAST) in platform_profile_cycle()
526 profile + 1); in platform_profile_cycle()
542 * platform_profile_register - Creates and registers a platform profile class device
546 * @ops: Platform profile's mandatory operations
600 dev_set_name(&pprof->dev, "platform-profile-%d", pprof->minor); in platform_profile_register()
628 * platform_profile_remove - Unregisters a platform profile class device
663 * @ops: Platform profile's mandatory operations
715 MODULE_DESCRIPTION("ACPI platform profile sysfs interface");