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()
137 static ssize_t gadget_dev_desc_##__name##_show(struct config_item *item, \
141 to_gadget_info(item)->cdev.desc.__name); \
145 static ssize_t gadget_dev_desc_##__name##_show(struct config_item *item, \
149 le16_to_cpup(&to_gadget_info(item)->cdev.desc.__name)); \
154 static ssize_t gadget_dev_desc_##_name##_store(struct config_item *item, \
162 to_gadget_info(item)->cdev.desc._name = val; \
167 static ssize_t gadget_dev_desc_##_name##_store(struct config_item *item, \
175 to_gadget_info(item)->cdev.desc._name = cpu_to_le16p(&val); \
205 static ssize_t gadget_dev_desc_bcdDevice_store(struct config_item *item, in gadget_dev_desc_bcdDevice_store() argument
218 to_gadget_info(item)->cdev.desc.bcdDevice = cpu_to_le16(bcdDevice); in gadget_dev_desc_bcdDevice_store()
222 static ssize_t gadget_dev_desc_bcdUSB_store(struct config_item *item, in gadget_dev_desc_bcdUSB_store() argument
235 to_gadget_info(item)->cdev.desc.bcdUSB = cpu_to_le16(bcdUSB); in gadget_dev_desc_bcdUSB_store()
239 static ssize_t gadget_dev_desc_UDC_show(struct config_item *item, char *page) in gadget_dev_desc_UDC_show() argument
241 struct gadget_info *gi = to_gadget_info(item); in gadget_dev_desc_UDC_show()
268 static ssize_t gadget_dev_desc_UDC_store(struct config_item *item, in gadget_dev_desc_UDC_store() argument
271 struct gadget_info *gi = to_gadget_info(item); in gadget_dev_desc_UDC_store()
311 static ssize_t gadget_dev_desc_max_speed_show(struct config_item *item, in gadget_dev_desc_max_speed_show() argument
314 enum usb_device_speed speed = to_gadget_info(item)->composite.max_speed; in gadget_dev_desc_max_speed_show()
319 static ssize_t gadget_dev_desc_max_speed_store(struct config_item *item, in gadget_dev_desc_max_speed_store() argument
322 struct gadget_info *gi = to_gadget_info(item); in gadget_dev_desc_max_speed_store()
377 static inline struct gadget_language *to_gadget_language(struct config_item *item) in to_gadget_language() argument
379 return container_of(to_config_group(item), struct gadget_language, in to_gadget_language()
384 struct config_item *item) in to_gadget_config_name() argument
386 return container_of(to_config_group(item), struct gadget_config_name, in to_gadget_config_name()
391 struct config_item *item) in to_usb_function_instance() argument
393 return container_of(to_config_group(item), in to_usb_function_instance()
397 static void gadget_info_attr_release(struct config_item *item) in gadget_info_attr_release() argument
399 struct gadget_info *gi = to_gadget_info(item); in gadget_info_attr_release()
413 static void gadget_config_attr_release(struct config_item *item) in gadget_config_attr_release() argument
415 struct config_usb_cfg *cfg = to_config_usb_cfg(item); in gadget_config_attr_release()
521 static ssize_t gadget_config_desc_MaxPower_show(struct config_item *item, in gadget_config_desc_MaxPower_show() argument
524 struct config_usb_cfg *cfg = to_config_usb_cfg(item); in gadget_config_desc_MaxPower_show()
529 static ssize_t gadget_config_desc_MaxPower_store(struct config_item *item, in gadget_config_desc_MaxPower_store() argument
532 struct config_usb_cfg *cfg = to_config_usb_cfg(item); in gadget_config_desc_MaxPower_store()
544 static ssize_t gadget_config_desc_bmAttributes_show(struct config_item *item, in gadget_config_desc_bmAttributes_show() argument
547 struct config_usb_cfg *cfg = to_config_usb_cfg(item); in gadget_config_desc_bmAttributes_show()
552 static ssize_t gadget_config_desc_bmAttributes_store(struct config_item *item, in gadget_config_desc_bmAttributes_store() argument
555 struct config_usb_cfg *cfg = to_config_usb_cfg(item); in gadget_config_desc_bmAttributes_store()
650 struct config_item *item) in function_drop() argument
652 struct usb_function_instance *fi = to_usb_function_instance(item); in function_drop()
660 config_item_put(item); in function_drop()
680 static void gadget_config_name_attr_release(struct config_item *item) in gadget_config_name_attr_release() argument
682 struct gadget_config_name *cn = to_gadget_config_name(item); in gadget_config_name_attr_release()
761 struct config_item *item) in config_desc_drop() argument
763 config_item_put(item); in config_desc_drop()
787 static void gadget_language_attr_release(struct config_item *item) in gadget_language_attr_release() argument
789 struct gadget_language *gs = to_gadget_language(item); in gadget_language_attr_release()
803 static ssize_t gadget_string_id_show(struct config_item *item, char *page) in gadget_string_id_show() argument
805 struct gadget_string *string = to_gadget_string(item); in gadget_string_id_show()
813 static ssize_t gadget_string_s_show(struct config_item *item, char *page) in gadget_string_s_show() argument
815 struct gadget_string *string = to_gadget_string(item); in gadget_string_s_show()
822 static ssize_t gadget_string_s_store(struct config_item *item, const char *page, in gadget_string_s_store() argument
825 struct gadget_string *string = to_gadget_string(item); in gadget_string_s_store()
841 static void gadget_string_release(struct config_item *item) in gadget_string_release() argument
843 struct gadget_string *string = to_gadget_string(item); in gadget_string_release()
874 config_item_init_type_name(&string->item, name, &gadget_string_type); in gadget_language_string_make()
876 return &string->item; in gadget_language_string_make()
880 struct config_item *item) in gadget_language_string_drop() argument
887 string = to_gadget_string(item); in gadget_language_string_drop()
951 struct config_item *item) in gadget_language_drop() argument
953 config_item_put(item); in gadget_language_drop()
967 struct config_item *item) in webusb_item_to_gadget_info() argument
969 return container_of(to_config_group(item), in webusb_item_to_gadget_info()
973 static ssize_t webusb_use_show(struct config_item *item, char *page) in webusb_use_show() argument
976 webusb_item_to_gadget_info(item)->use_webusb); in webusb_use_show()
979 static ssize_t webusb_use_store(struct config_item *item, const char *page, in webusb_use_store() argument
982 struct gadget_info *gi = webusb_item_to_gadget_info(item); in webusb_use_store()
997 static ssize_t webusb_bcdVersion_show(struct config_item *item, char *page) in webusb_bcdVersion_show() argument
1000 webusb_item_to_gadget_info(item)->bcd_webusb_version); in webusb_bcdVersion_show()
1003 static ssize_t webusb_bcdVersion_store(struct config_item *item, in webusb_bcdVersion_store() argument
1006 struct gadget_info *gi = webusb_item_to_gadget_info(item); in webusb_bcdVersion_store()
1025 static ssize_t webusb_bVendorCode_show(struct config_item *item, char *page) in webusb_bVendorCode_show() argument
1028 webusb_item_to_gadget_info(item)->b_webusb_vendor_code); in webusb_bVendorCode_show()
1031 static ssize_t webusb_bVendorCode_store(struct config_item *item, in webusb_bVendorCode_store() argument
1034 struct gadget_info *gi = webusb_item_to_gadget_info(item); in webusb_bVendorCode_store()
1049 static ssize_t webusb_landingPage_show(struct config_item *item, char *page) in webusb_landingPage_show() argument
1051 return sysfs_emit(page, "%s\n", webusb_item_to_gadget_info(item)->landing_page); in webusb_landingPage_show()
1054 static ssize_t webusb_landingPage_store(struct config_item *item, const char *page, in webusb_landingPage_store() argument
1057 struct gadget_info *gi = webusb_item_to_gadget_info(item); in webusb_landingPage_store()
1112 struct config_item *item) in os_desc_item_to_gadget_info() argument
1114 return container_of(to_config_group(item), in os_desc_item_to_gadget_info()
1118 static ssize_t os_desc_use_show(struct config_item *item, char *page) in os_desc_use_show() argument
1121 os_desc_item_to_gadget_info(item)->use_os_desc); in os_desc_use_show()
1124 static ssize_t os_desc_use_store(struct config_item *item, const char *page, in os_desc_use_store() argument
1127 struct gadget_info *gi = os_desc_item_to_gadget_info(item); in os_desc_use_store()
1142 static ssize_t os_desc_b_vendor_code_show(struct config_item *item, char *page) in os_desc_b_vendor_code_show() argument
1145 os_desc_item_to_gadget_info(item)->b_vendor_code); in os_desc_b_vendor_code_show()
1148 static ssize_t os_desc_b_vendor_code_store(struct config_item *item, in os_desc_b_vendor_code_store() argument
1151 struct gadget_info *gi = os_desc_item_to_gadget_info(item); in os_desc_b_vendor_code_store()
1166 static ssize_t os_desc_qw_sign_show(struct config_item *item, char *page) in os_desc_qw_sign_show() argument
1168 struct gadget_info *gi = os_desc_item_to_gadget_info(item); in os_desc_qw_sign_show()
1178 static ssize_t os_desc_qw_sign_store(struct config_item *item, const char *page, in os_desc_qw_sign_store() argument
1181 struct gadget_info *gi = os_desc_item_to_gadget_info(item); in os_desc_qw_sign_store()
1270 *to_usb_os_desc_ext_prop(struct config_item *item) in to_usb_os_desc_ext_prop() argument
1272 return container_of(item, struct usb_os_desc_ext_prop, item); in to_usb_os_desc_ext_prop()
1275 static ssize_t ext_prop_type_show(struct config_item *item, char *page) in ext_prop_type_show() argument
1277 return sprintf(page, "%d\n", to_usb_os_desc_ext_prop(item)->type); in ext_prop_type_show()
1280 static ssize_t ext_prop_type_store(struct config_item *item, in ext_prop_type_store() argument
1283 struct usb_os_desc_ext_prop *ext_prop = to_usb_os_desc_ext_prop(item); in ext_prop_type_store()
1284 struct usb_os_desc *desc = to_usb_os_desc(ext_prop->item.ci_parent); in ext_prop_type_store()
1319 static ssize_t ext_prop_data_show(struct config_item *item, char *page) in ext_prop_data_show() argument
1321 struct usb_os_desc_ext_prop *ext_prop = to_usb_os_desc_ext_prop(item); in ext_prop_data_show()
1333 static ssize_t ext_prop_data_store(struct config_item *item, in ext_prop_data_store() argument
1336 struct usb_os_desc_ext_prop *ext_prop = to_usb_os_desc_ext_prop(item); in ext_prop_data_store()
1337 struct usb_os_desc *desc = to_usb_os_desc(ext_prop->item.ci_parent); in ext_prop_data_store()
1376 static void usb_os_desc_ext_prop_release(struct config_item *item) in usb_os_desc_ext_prop_release() argument
1378 struct usb_os_desc_ext_prop *ext_prop = to_usb_os_desc_ext_prop(item); in usb_os_desc_ext_prop_release()
1412 config_item_init_type_name(&ext_prop->item, name, ext_prop_type); in ext_prop_make()
1429 return &ext_prop->item; in ext_prop_make()
1432 static void ext_prop_drop(struct config_group *group, struct config_item *item) in ext_prop_drop() argument
1434 struct usb_os_desc_ext_prop *ext_prop = to_usb_os_desc_ext_prop(item); in ext_prop_drop()
1445 config_item_put(item); in ext_prop_drop()
1453 static ssize_t interf_grp_compatible_id_show(struct config_item *item, in interf_grp_compatible_id_show() argument
1456 memcpy(page, to_usb_os_desc(item)->ext_compat_id, 8); in interf_grp_compatible_id_show()
1460 static ssize_t interf_grp_compatible_id_store(struct config_item *item, in interf_grp_compatible_id_store() argument
1463 struct usb_os_desc *desc = to_usb_os_desc(item); in interf_grp_compatible_id_store()
1479 static ssize_t interf_grp_sub_compatible_id_show(struct config_item *item, in interf_grp_sub_compatible_id_show() argument
1482 memcpy(page, to_usb_os_desc(item)->ext_compat_id + 8, 8); in interf_grp_sub_compatible_id_show()
1486 static ssize_t interf_grp_sub_compatible_id_store(struct config_item *item, in interf_grp_sub_compatible_id_store() argument
1489 struct usb_os_desc *desc = to_usb_os_desc(item); in interf_grp_sub_compatible_id_store()
2046 static void gadgets_drop(struct config_group *group, struct config_item *item) in gadgets_drop() argument
2048 config_item_put(item); in gadgets_drop()
2071 void unregister_gadget_item(struct config_item *item) in unregister_gadget_item() argument
2073 struct gadget_info *gi = to_gadget_info(item); in unregister_gadget_item()