Lines Matching full:item
64 static inline struct gadget_info *to_gadget_info(struct config_item *item) in to_gadget_info() argument
66 return container_of(to_config_group(item), struct gadget_info, group); in to_gadget_info()
78 static inline struct config_usb_cfg *to_config_usb_cfg(struct config_item *item) in to_config_usb_cfg() argument
80 return container_of(to_config_group(item), struct config_usb_cfg, in to_config_usb_cfg()
140 static ssize_t gadget_dev_desc_##__name##_show(struct config_item *item, \
144 to_gadget_info(item)->cdev.desc.__name); \
148 static ssize_t gadget_dev_desc_##__name##_show(struct config_item *item, \
152 le16_to_cpup(&to_gadget_info(item)->cdev.desc.__name)); \
157 static ssize_t gadget_dev_desc_##_name##_store(struct config_item *item, \
165 to_gadget_info(item)->cdev.desc._name = val; \
170 static ssize_t gadget_dev_desc_##_name##_store(struct config_item *item, \
178 to_gadget_info(item)->cdev.desc._name = cpu_to_le16p(&val); \
208 static ssize_t gadget_dev_desc_bcdDevice_store(struct config_item *item, in gadget_dev_desc_bcdDevice_store() argument
221 to_gadget_info(item)->cdev.desc.bcdDevice = cpu_to_le16(bcdDevice); in gadget_dev_desc_bcdDevice_store()
225 static ssize_t gadget_dev_desc_bcdUSB_store(struct config_item *item, in gadget_dev_desc_bcdUSB_store() argument
238 to_gadget_info(item)->cdev.desc.bcdUSB = cpu_to_le16(bcdUSB); in gadget_dev_desc_bcdUSB_store()
242 static ssize_t gadget_dev_desc_UDC_show(struct config_item *item, char *page) in gadget_dev_desc_UDC_show() argument
244 struct gadget_info *gi = to_gadget_info(item); in gadget_dev_desc_UDC_show()
271 static ssize_t gadget_dev_desc_UDC_store(struct config_item *item, in gadget_dev_desc_UDC_store() argument
274 struct gadget_info *gi = to_gadget_info(item); in gadget_dev_desc_UDC_store()
314 static ssize_t gadget_dev_desc_max_speed_show(struct config_item *item, in gadget_dev_desc_max_speed_show() argument
317 enum usb_device_speed speed = to_gadget_info(item)->composite.max_speed; in gadget_dev_desc_max_speed_show()
322 static ssize_t gadget_dev_desc_max_speed_store(struct config_item *item, in gadget_dev_desc_max_speed_store() argument
325 struct gadget_info *gi = to_gadget_info(item); in gadget_dev_desc_max_speed_store()
380 static inline struct gadget_language *to_gadget_language(struct config_item *item) in to_gadget_language() argument
382 return container_of(to_config_group(item), struct gadget_language, in to_gadget_language()
387 struct config_item *item) in to_gadget_config_name() argument
389 return container_of(to_config_group(item), struct gadget_config_name, in to_gadget_config_name()
394 struct config_item *item) in to_usb_function_instance() argument
396 return container_of(to_config_group(item), in to_usb_function_instance()
400 static void gadget_info_attr_release(struct config_item *item) in gadget_info_attr_release() argument
402 struct gadget_info *gi = to_gadget_info(item); in gadget_info_attr_release()
416 static void gadget_config_attr_release(struct config_item *item) in gadget_config_attr_release() argument
418 struct config_usb_cfg *cfg = to_config_usb_cfg(item); in gadget_config_attr_release()
524 static ssize_t gadget_config_desc_MaxPower_show(struct config_item *item, in gadget_config_desc_MaxPower_show() argument
527 struct config_usb_cfg *cfg = to_config_usb_cfg(item); in gadget_config_desc_MaxPower_show()
532 static ssize_t gadget_config_desc_MaxPower_store(struct config_item *item, in gadget_config_desc_MaxPower_store() argument
535 struct config_usb_cfg *cfg = to_config_usb_cfg(item); in gadget_config_desc_MaxPower_store()
547 static ssize_t gadget_config_desc_bmAttributes_show(struct config_item *item, in gadget_config_desc_bmAttributes_show() argument
550 struct config_usb_cfg *cfg = to_config_usb_cfg(item); in gadget_config_desc_bmAttributes_show()
555 static ssize_t gadget_config_desc_bmAttributes_store(struct config_item *item, in gadget_config_desc_bmAttributes_store() argument
558 struct config_usb_cfg *cfg = to_config_usb_cfg(item); in gadget_config_desc_bmAttributes_store()
653 struct config_item *item) in function_drop() argument
655 struct usb_function_instance *fi = to_usb_function_instance(item); in function_drop()
663 config_item_put(item); in function_drop()
683 static void gadget_config_name_attr_release(struct config_item *item) in gadget_config_name_attr_release() argument
685 struct gadget_config_name *cn = to_gadget_config_name(item); in gadget_config_name_attr_release()
764 struct config_item *item) in config_desc_drop() argument
766 config_item_put(item); in config_desc_drop()
790 static void gadget_language_attr_release(struct config_item *item) in gadget_language_attr_release() argument
792 struct gadget_language *gs = to_gadget_language(item); in gadget_language_attr_release()
806 static ssize_t gadget_string_id_show(struct config_item *item, char *page) in gadget_string_id_show() argument
808 struct gadget_string *string = to_gadget_string(item); in gadget_string_id_show()
816 static ssize_t gadget_string_s_show(struct config_item *item, char *page) in gadget_string_s_show() argument
818 struct gadget_string *string = to_gadget_string(item); in gadget_string_s_show()
825 static ssize_t gadget_string_s_store(struct config_item *item, const char *page, in gadget_string_s_store() argument
828 struct gadget_string *string = to_gadget_string(item); in gadget_string_s_store()
844 static void gadget_string_release(struct config_item *item) in gadget_string_release() argument
846 struct gadget_string *string = to_gadget_string(item); in gadget_string_release()
877 config_item_init_type_name(&string->item, name, &gadget_string_type); in gadget_language_string_make()
879 return &string->item; in gadget_language_string_make()
883 struct config_item *item) in gadget_language_string_drop() argument
890 string = to_gadget_string(item); in gadget_language_string_drop()
954 struct config_item *item) in gadget_language_drop() argument
956 config_item_put(item); in gadget_language_drop()
970 struct config_item *item) in webusb_item_to_gadget_info() argument
972 return container_of(to_config_group(item), in webusb_item_to_gadget_info()
976 static ssize_t webusb_use_show(struct config_item *item, char *page) in webusb_use_show() argument
979 webusb_item_to_gadget_info(item)->use_webusb); in webusb_use_show()
982 static ssize_t webusb_use_store(struct config_item *item, const char *page, in webusb_use_store() argument
985 struct gadget_info *gi = webusb_item_to_gadget_info(item); in webusb_use_store()
1000 static ssize_t webusb_bcdVersion_show(struct config_item *item, char *page) in webusb_bcdVersion_show() argument
1003 webusb_item_to_gadget_info(item)->bcd_webusb_version); in webusb_bcdVersion_show()
1006 static ssize_t webusb_bcdVersion_store(struct config_item *item, in webusb_bcdVersion_store() argument
1009 struct gadget_info *gi = webusb_item_to_gadget_info(item); in webusb_bcdVersion_store()
1028 static ssize_t webusb_bVendorCode_show(struct config_item *item, char *page) in webusb_bVendorCode_show() argument
1031 webusb_item_to_gadget_info(item)->b_webusb_vendor_code); in webusb_bVendorCode_show()
1034 static ssize_t webusb_bVendorCode_store(struct config_item *item, in webusb_bVendorCode_store() argument
1037 struct gadget_info *gi = webusb_item_to_gadget_info(item); in webusb_bVendorCode_store()
1052 static ssize_t webusb_landingPage_show(struct config_item *item, char *page) in webusb_landingPage_show() argument
1054 return sysfs_emit(page, "%s\n", webusb_item_to_gadget_info(item)->landing_page); in webusb_landingPage_show()
1057 static ssize_t webusb_landingPage_store(struct config_item *item, const char *page, in webusb_landingPage_store() argument
1060 struct gadget_info *gi = webusb_item_to_gadget_info(item); in webusb_landingPage_store()
1115 struct config_item *item) in os_desc_item_to_gadget_info() argument
1117 return container_of(to_config_group(item), in os_desc_item_to_gadget_info()
1121 static ssize_t os_desc_use_show(struct config_item *item, char *page) in os_desc_use_show() argument
1124 os_desc_item_to_gadget_info(item)->use_os_desc); in os_desc_use_show()
1127 static ssize_t os_desc_use_store(struct config_item *item, const char *page, in os_desc_use_store() argument
1130 struct gadget_info *gi = os_desc_item_to_gadget_info(item); in os_desc_use_store()
1145 static ssize_t os_desc_b_vendor_code_show(struct config_item *item, char *page) in os_desc_b_vendor_code_show() argument
1148 os_desc_item_to_gadget_info(item)->b_vendor_code); in os_desc_b_vendor_code_show()
1151 static ssize_t os_desc_b_vendor_code_store(struct config_item *item, in os_desc_b_vendor_code_store() argument
1154 struct gadget_info *gi = os_desc_item_to_gadget_info(item); in os_desc_b_vendor_code_store()
1169 static ssize_t os_desc_qw_sign_show(struct config_item *item, char *page) in os_desc_qw_sign_show() argument
1171 struct gadget_info *gi = os_desc_item_to_gadget_info(item); in os_desc_qw_sign_show()
1181 static ssize_t os_desc_qw_sign_store(struct config_item *item, const char *page, in os_desc_qw_sign_store() argument
1184 struct gadget_info *gi = os_desc_item_to_gadget_info(item); in os_desc_qw_sign_store()
1273 *to_usb_os_desc_ext_prop(struct config_item *item) in to_usb_os_desc_ext_prop() argument
1275 return container_of(item, struct usb_os_desc_ext_prop, item); in to_usb_os_desc_ext_prop()
1278 static ssize_t ext_prop_type_show(struct config_item *item, char *page) in ext_prop_type_show() argument
1280 return sprintf(page, "%d\n", to_usb_os_desc_ext_prop(item)->type); in ext_prop_type_show()
1283 static ssize_t ext_prop_type_store(struct config_item *item, in ext_prop_type_store() argument
1286 struct usb_os_desc_ext_prop *ext_prop = to_usb_os_desc_ext_prop(item); in ext_prop_type_store()
1287 struct usb_os_desc *desc = to_usb_os_desc(ext_prop->item.ci_parent); in ext_prop_type_store()
1322 static ssize_t ext_prop_data_show(struct config_item *item, char *page) in ext_prop_data_show() argument
1324 struct usb_os_desc_ext_prop *ext_prop = to_usb_os_desc_ext_prop(item); in ext_prop_data_show()
1336 static ssize_t ext_prop_data_store(struct config_item *item, in ext_prop_data_store() argument
1339 struct usb_os_desc_ext_prop *ext_prop = to_usb_os_desc_ext_prop(item); in ext_prop_data_store()
1340 struct usb_os_desc *desc = to_usb_os_desc(ext_prop->item.ci_parent); in ext_prop_data_store()
1379 static void usb_os_desc_ext_prop_release(struct config_item *item) in usb_os_desc_ext_prop_release() argument
1381 struct usb_os_desc_ext_prop *ext_prop = to_usb_os_desc_ext_prop(item); in usb_os_desc_ext_prop_release()
1415 config_item_init_type_name(&ext_prop->item, name, ext_prop_type); in ext_prop_make()
1432 return &ext_prop->item; in ext_prop_make()
1435 static void ext_prop_drop(struct config_group *group, struct config_item *item) in ext_prop_drop() argument
1437 struct usb_os_desc_ext_prop *ext_prop = to_usb_os_desc_ext_prop(item); in ext_prop_drop()
1448 config_item_put(item); in ext_prop_drop()
1456 static ssize_t interf_grp_compatible_id_show(struct config_item *item, in interf_grp_compatible_id_show() argument
1459 memcpy(page, to_usb_os_desc(item)->ext_compat_id, 8); in interf_grp_compatible_id_show()
1463 static ssize_t interf_grp_compatible_id_store(struct config_item *item, in interf_grp_compatible_id_store() argument
1466 struct usb_os_desc *desc = to_usb_os_desc(item); in interf_grp_compatible_id_store()
1482 static ssize_t interf_grp_sub_compatible_id_show(struct config_item *item, in interf_grp_sub_compatible_id_show() argument
1485 memcpy(page, to_usb_os_desc(item)->ext_compat_id + 8, 8); in interf_grp_sub_compatible_id_show()
1489 static ssize_t interf_grp_sub_compatible_id_store(struct config_item *item, in interf_grp_sub_compatible_id_store() argument
1492 struct usb_os_desc *desc = to_usb_os_desc(item); in interf_grp_sub_compatible_id_store()
2049 static void gadgets_drop(struct config_group *group, struct config_item *item) in gadgets_drop() argument
2051 config_item_put(item); in gadgets_drop()
2074 void unregister_gadget_item(struct config_item *item) in unregister_gadget_item() argument
2076 struct gadget_info *gi = to_gadget_info(item); in unregister_gadget_item()