Lines Matching refs:item

67 static inline struct gadget_info *to_gadget_info(struct config_item *item)  in to_gadget_info()  argument
69 return container_of(to_config_group(item), struct gadget_info, group); in to_gadget_info()
82 static inline struct config_usb_cfg *to_config_usb_cfg(struct config_item *item) in to_config_usb_cfg() argument
84 return container_of(to_config_group(item), struct config_usb_cfg, in to_config_usb_cfg()
132 static ssize_t gadget_dev_desc_##__name##_show(struct config_item *item, \
136 to_gadget_info(item)->cdev.desc.__name); \
140 static ssize_t gadget_dev_desc_##__name##_show(struct config_item *item, \
144 le16_to_cpup(&to_gadget_info(item)->cdev.desc.__name)); \
149 static ssize_t gadget_dev_desc_##_name##_store(struct config_item *item, \
157 to_gadget_info(item)->cdev.desc._name = val; \
162 static ssize_t gadget_dev_desc_##_name##_store(struct config_item *item, \
170 to_gadget_info(item)->cdev.desc._name = cpu_to_le16p(&val); \
200 static ssize_t gadget_dev_desc_bcdDevice_store(struct config_item *item, in gadget_dev_desc_bcdDevice_store() argument
213 to_gadget_info(item)->cdev.desc.bcdDevice = cpu_to_le16(bcdDevice); in gadget_dev_desc_bcdDevice_store()
217 static ssize_t gadget_dev_desc_bcdUSB_store(struct config_item *item, in gadget_dev_desc_bcdUSB_store() argument
230 to_gadget_info(item)->cdev.desc.bcdUSB = cpu_to_le16(bcdUSB); in gadget_dev_desc_bcdUSB_store()
234 static ssize_t gadget_dev_desc_UDC_show(struct config_item *item, char *page) in gadget_dev_desc_UDC_show() argument
236 return sprintf(page, "%s\n", to_gadget_info(item)->udc_name ?: ""); in gadget_dev_desc_UDC_show()
254 static ssize_t gadget_dev_desc_UDC_store(struct config_item *item, in gadget_dev_desc_UDC_store() argument
257 struct gadget_info *gi = to_gadget_info(item); in gadget_dev_desc_UDC_store()
314 static inline struct gadget_strings *to_gadget_strings(struct config_item *item) in to_gadget_strings() argument
316 return container_of(to_config_group(item), struct gadget_strings, in to_gadget_strings()
321 struct config_item *item) in to_gadget_config_name() argument
323 return container_of(to_config_group(item), struct gadget_config_name, in to_gadget_config_name()
328 struct config_item *item) in to_usb_function_instance() argument
330 return container_of(to_config_group(item), in to_usb_function_instance()
334 static void gadget_info_attr_release(struct config_item *item) in gadget_info_attr_release() argument
336 struct gadget_info *gi = to_gadget_info(item); in gadget_info_attr_release()
349 static void gadget_config_attr_release(struct config_item *item) in gadget_config_attr_release() argument
351 struct config_usb_cfg *cfg = to_config_usb_cfg(item); in gadget_config_attr_release()
454 static ssize_t gadget_config_desc_MaxPower_show(struct config_item *item, in gadget_config_desc_MaxPower_show() argument
457 return sprintf(page, "%u\n", to_config_usb_cfg(item)->c.MaxPower); in gadget_config_desc_MaxPower_show()
460 static ssize_t gadget_config_desc_MaxPower_store(struct config_item *item, in gadget_config_desc_MaxPower_store() argument
470 to_config_usb_cfg(item)->c.MaxPower = val; in gadget_config_desc_MaxPower_store()
474 static ssize_t gadget_config_desc_bmAttributes_show(struct config_item *item, in gadget_config_desc_bmAttributes_show() argument
478 to_config_usb_cfg(item)->c.bmAttributes); in gadget_config_desc_bmAttributes_show()
481 static ssize_t gadget_config_desc_bmAttributes_store(struct config_item *item, in gadget_config_desc_bmAttributes_store() argument
494 to_config_usb_cfg(item)->c.bmAttributes = val; in gadget_config_desc_bmAttributes_store()
577 struct config_item *item) in function_drop() argument
579 struct usb_function_instance *fi = to_usb_function_instance(item); in function_drop()
587 config_item_put(item); in function_drop()
607 static void gadget_config_name_attr_release(struct config_item *item) in gadget_config_name_attr_release() argument
609 struct gadget_config_name *cn = to_gadget_config_name(item); in gadget_config_name_attr_release()
687 struct config_item *item) in config_desc_drop() argument
689 config_item_put(item); in config_desc_drop()
713 static void gadget_strings_attr_release(struct config_item *item) in gadget_strings_attr_release() argument
715 struct gadget_strings *gs = to_gadget_strings(item); in gadget_strings_attr_release()
728 static inline struct os_desc *to_os_desc(struct config_item *item) in to_os_desc() argument
730 return container_of(to_config_group(item), struct os_desc, group); in to_os_desc()
734 struct config_item *item) in os_desc_item_to_gadget_info() argument
736 return to_gadget_info(to_os_desc(item)->group.cg_item.ci_parent); in os_desc_item_to_gadget_info()
739 static ssize_t os_desc_use_show(struct config_item *item, char *page) in os_desc_use_show() argument
742 os_desc_item_to_gadget_info(item)->use_os_desc); in os_desc_use_show()
745 static ssize_t os_desc_use_store(struct config_item *item, const char *page, in os_desc_use_store() argument
748 struct gadget_info *gi = os_desc_item_to_gadget_info(item); in os_desc_use_store()
763 static ssize_t os_desc_b_vendor_code_show(struct config_item *item, char *page) in os_desc_b_vendor_code_show() argument
766 os_desc_item_to_gadget_info(item)->b_vendor_code); in os_desc_b_vendor_code_show()
769 static ssize_t os_desc_b_vendor_code_store(struct config_item *item, in os_desc_b_vendor_code_store() argument
772 struct gadget_info *gi = os_desc_item_to_gadget_info(item); in os_desc_b_vendor_code_store()
787 static ssize_t os_desc_qw_sign_show(struct config_item *item, char *page) in os_desc_qw_sign_show() argument
789 struct gadget_info *gi = os_desc_item_to_gadget_info(item); in os_desc_qw_sign_show()
795 static ssize_t os_desc_qw_sign_store(struct config_item *item, const char *page, in os_desc_qw_sign_store() argument
798 struct gadget_info *gi = os_desc_item_to_gadget_info(item); in os_desc_qw_sign_store()
827 static void os_desc_attr_release(struct config_item *item) in os_desc_attr_release() argument
829 struct os_desc *os_desc = to_os_desc(item); in os_desc_attr_release()
897 *to_usb_os_desc_ext_prop(struct config_item *item) in to_usb_os_desc_ext_prop() argument
899 return container_of(item, struct usb_os_desc_ext_prop, item); in to_usb_os_desc_ext_prop()
902 static ssize_t ext_prop_type_show(struct config_item *item, char *page) in ext_prop_type_show() argument
904 return sprintf(page, "%d", to_usb_os_desc_ext_prop(item)->type); in ext_prop_type_show()
907 static ssize_t ext_prop_type_store(struct config_item *item, in ext_prop_type_store() argument
910 struct usb_os_desc_ext_prop *ext_prop = to_usb_os_desc_ext_prop(item); in ext_prop_type_store()
911 struct usb_os_desc *desc = to_usb_os_desc(ext_prop->item.ci_parent); in ext_prop_type_store()
948 static ssize_t ext_prop_data_show(struct config_item *item, char *page) in ext_prop_data_show() argument
950 struct usb_os_desc_ext_prop *ext_prop = to_usb_os_desc_ext_prop(item); in ext_prop_data_show()
962 static ssize_t ext_prop_data_store(struct config_item *item, in ext_prop_data_store() argument
965 struct usb_os_desc_ext_prop *ext_prop = to_usb_os_desc_ext_prop(item); in ext_prop_data_store()
966 struct usb_os_desc *desc = to_usb_os_desc(ext_prop->item.ci_parent); in ext_prop_data_store()
1005 static void usb_os_desc_ext_prop_release(struct config_item *item) in usb_os_desc_ext_prop_release() argument
1007 struct usb_os_desc_ext_prop *ext_prop = to_usb_os_desc_ext_prop(item); in usb_os_desc_ext_prop_release()
1041 config_item_init_type_name(&ext_prop->item, name, ext_prop_type); in ext_prop_make()
1058 return &ext_prop->item; in ext_prop_make()
1061 static void ext_prop_drop(struct config_group *group, struct config_item *item) in ext_prop_drop() argument
1063 struct usb_os_desc_ext_prop *ext_prop = to_usb_os_desc_ext_prop(item); in ext_prop_drop()
1074 config_item_put(item); in ext_prop_drop()
1082 static ssize_t interf_grp_compatible_id_show(struct config_item *item, in interf_grp_compatible_id_show() argument
1085 memcpy(page, to_usb_os_desc(item)->ext_compat_id, 8); in interf_grp_compatible_id_show()
1089 static ssize_t interf_grp_compatible_id_store(struct config_item *item, in interf_grp_compatible_id_store() argument
1092 struct usb_os_desc *desc = to_usb_os_desc(item); in interf_grp_compatible_id_store()
1108 static ssize_t interf_grp_sub_compatible_id_show(struct config_item *item, in interf_grp_sub_compatible_id_show() argument
1111 memcpy(page, to_usb_os_desc(item)->ext_compat_id + 8, 8); in interf_grp_sub_compatible_id_show()
1115 static ssize_t interf_grp_sub_compatible_id_store(struct config_item *item, in interf_grp_sub_compatible_id_store() argument
1118 struct usb_os_desc *desc = to_usb_os_desc(item); in interf_grp_sub_compatible_id_store()
1469 static void gadgets_drop(struct config_group *group, struct config_item *item) in gadgets_drop() argument
1471 config_item_put(item); in gadgets_drop()
1494 void unregister_gadget_item(struct config_item *item) in unregister_gadget_item() argument
1496 struct gadget_info *gi = to_gadget_info(item); in unregister_gadget_item()