Lines Matching refs:item

56 static inline struct gadget_info *to_gadget_info(struct config_item *item)  in to_gadget_info()  argument
58 return container_of(to_config_group(item), struct gadget_info, group); in to_gadget_info()
70 static inline struct config_usb_cfg *to_config_usb_cfg(struct config_item *item) in to_config_usb_cfg() argument
72 return container_of(to_config_group(item), struct config_usb_cfg, in to_config_usb_cfg()
131 static ssize_t gadget_dev_desc_##__name##_show(struct config_item *item, \
135 to_gadget_info(item)->cdev.desc.__name); \
139 static ssize_t gadget_dev_desc_##__name##_show(struct config_item *item, \
143 le16_to_cpup(&to_gadget_info(item)->cdev.desc.__name)); \
148 static ssize_t gadget_dev_desc_##_name##_store(struct config_item *item, \
156 to_gadget_info(item)->cdev.desc._name = val; \
161 static ssize_t gadget_dev_desc_##_name##_store(struct config_item *item, \
169 to_gadget_info(item)->cdev.desc._name = cpu_to_le16p(&val); \
199 static ssize_t gadget_dev_desc_bcdDevice_store(struct config_item *item, in gadget_dev_desc_bcdDevice_store() argument
212 to_gadget_info(item)->cdev.desc.bcdDevice = cpu_to_le16(bcdDevice); in gadget_dev_desc_bcdDevice_store()
216 static ssize_t gadget_dev_desc_bcdUSB_store(struct config_item *item, in gadget_dev_desc_bcdUSB_store() argument
229 to_gadget_info(item)->cdev.desc.bcdUSB = cpu_to_le16(bcdUSB); in gadget_dev_desc_bcdUSB_store()
233 static ssize_t gadget_dev_desc_UDC_show(struct config_item *item, char *page) in gadget_dev_desc_UDC_show() argument
235 struct gadget_info *gi = to_gadget_info(item); in gadget_dev_desc_UDC_show()
262 static ssize_t gadget_dev_desc_UDC_store(struct config_item *item, in gadget_dev_desc_UDC_store() argument
265 struct gadget_info *gi = to_gadget_info(item); in gadget_dev_desc_UDC_store()
305 static ssize_t gadget_dev_desc_max_speed_show(struct config_item *item, in gadget_dev_desc_max_speed_show() argument
308 enum usb_device_speed speed = to_gadget_info(item)->composite.max_speed; in gadget_dev_desc_max_speed_show()
313 static ssize_t gadget_dev_desc_max_speed_store(struct config_item *item, in gadget_dev_desc_max_speed_store() argument
316 struct gadget_info *gi = to_gadget_info(item); in gadget_dev_desc_max_speed_store()
371 static inline struct gadget_strings *to_gadget_strings(struct config_item *item) in to_gadget_strings() argument
373 return container_of(to_config_group(item), struct gadget_strings, in to_gadget_strings()
378 struct config_item *item) in to_gadget_config_name() argument
380 return container_of(to_config_group(item), struct gadget_config_name, in to_gadget_config_name()
385 struct config_item *item) in to_usb_function_instance() argument
387 return container_of(to_config_group(item), in to_usb_function_instance()
391 static void gadget_info_attr_release(struct config_item *item) in gadget_info_attr_release() argument
393 struct gadget_info *gi = to_gadget_info(item); in gadget_info_attr_release()
406 static void gadget_config_attr_release(struct config_item *item) in gadget_config_attr_release() argument
408 struct config_usb_cfg *cfg = to_config_usb_cfg(item); in gadget_config_attr_release()
508 static ssize_t gadget_config_desc_MaxPower_show(struct config_item *item, in gadget_config_desc_MaxPower_show() argument
511 struct config_usb_cfg *cfg = to_config_usb_cfg(item); in gadget_config_desc_MaxPower_show()
516 static ssize_t gadget_config_desc_MaxPower_store(struct config_item *item, in gadget_config_desc_MaxPower_store() argument
519 struct config_usb_cfg *cfg = to_config_usb_cfg(item); in gadget_config_desc_MaxPower_store()
531 static ssize_t gadget_config_desc_bmAttributes_show(struct config_item *item, in gadget_config_desc_bmAttributes_show() argument
534 struct config_usb_cfg *cfg = to_config_usb_cfg(item); in gadget_config_desc_bmAttributes_show()
539 static ssize_t gadget_config_desc_bmAttributes_store(struct config_item *item, in gadget_config_desc_bmAttributes_store() argument
542 struct config_usb_cfg *cfg = to_config_usb_cfg(item); in gadget_config_desc_bmAttributes_store()
636 struct config_item *item) in function_drop() argument
638 struct usb_function_instance *fi = to_usb_function_instance(item); in function_drop()
646 config_item_put(item); in function_drop()
666 static void gadget_config_name_attr_release(struct config_item *item) in gadget_config_name_attr_release() argument
668 struct gadget_config_name *cn = to_gadget_config_name(item); in gadget_config_name_attr_release()
745 struct config_item *item) in config_desc_drop() argument
747 config_item_put(item); in config_desc_drop()
771 static void gadget_strings_attr_release(struct config_item *item) in gadget_strings_attr_release() argument
773 struct gadget_strings *gs = to_gadget_strings(item); in gadget_strings_attr_release()
786 static inline struct os_desc *to_os_desc(struct config_item *item) in to_os_desc() argument
788 return container_of(to_config_group(item), struct os_desc, group); in to_os_desc()
792 struct config_item *item) in os_desc_item_to_gadget_info() argument
794 return to_gadget_info(to_os_desc(item)->group.cg_item.ci_parent); in os_desc_item_to_gadget_info()
797 static ssize_t os_desc_use_show(struct config_item *item, char *page) in os_desc_use_show() argument
800 os_desc_item_to_gadget_info(item)->use_os_desc); in os_desc_use_show()
803 static ssize_t os_desc_use_store(struct config_item *item, const char *page, in os_desc_use_store() argument
806 struct gadget_info *gi = os_desc_item_to_gadget_info(item); in os_desc_use_store()
821 static ssize_t os_desc_b_vendor_code_show(struct config_item *item, char *page) in os_desc_b_vendor_code_show() argument
824 os_desc_item_to_gadget_info(item)->b_vendor_code); in os_desc_b_vendor_code_show()
827 static ssize_t os_desc_b_vendor_code_store(struct config_item *item, in os_desc_b_vendor_code_store() argument
830 struct gadget_info *gi = os_desc_item_to_gadget_info(item); in os_desc_b_vendor_code_store()
845 static ssize_t os_desc_qw_sign_show(struct config_item *item, char *page) in os_desc_qw_sign_show() argument
847 struct gadget_info *gi = os_desc_item_to_gadget_info(item); in os_desc_qw_sign_show()
857 static ssize_t os_desc_qw_sign_store(struct config_item *item, const char *page, in os_desc_qw_sign_store() argument
860 struct gadget_info *gi = os_desc_item_to_gadget_info(item); in os_desc_qw_sign_store()
889 static void os_desc_attr_release(struct config_item *item) in os_desc_attr_release() argument
891 struct os_desc *os_desc = to_os_desc(item); in os_desc_attr_release()
958 *to_usb_os_desc_ext_prop(struct config_item *item) in to_usb_os_desc_ext_prop() argument
960 return container_of(item, struct usb_os_desc_ext_prop, item); in to_usb_os_desc_ext_prop()
963 static ssize_t ext_prop_type_show(struct config_item *item, char *page) in ext_prop_type_show() argument
965 return sprintf(page, "%d\n", to_usb_os_desc_ext_prop(item)->type); in ext_prop_type_show()
968 static ssize_t ext_prop_type_store(struct config_item *item, in ext_prop_type_store() argument
971 struct usb_os_desc_ext_prop *ext_prop = to_usb_os_desc_ext_prop(item); in ext_prop_type_store()
972 struct usb_os_desc *desc = to_usb_os_desc(ext_prop->item.ci_parent); in ext_prop_type_store()
1009 static ssize_t ext_prop_data_show(struct config_item *item, char *page) in ext_prop_data_show() argument
1011 struct usb_os_desc_ext_prop *ext_prop = to_usb_os_desc_ext_prop(item); in ext_prop_data_show()
1023 static ssize_t ext_prop_data_store(struct config_item *item, in ext_prop_data_store() argument
1026 struct usb_os_desc_ext_prop *ext_prop = to_usb_os_desc_ext_prop(item); in ext_prop_data_store()
1027 struct usb_os_desc *desc = to_usb_os_desc(ext_prop->item.ci_parent); in ext_prop_data_store()
1066 static void usb_os_desc_ext_prop_release(struct config_item *item) in usb_os_desc_ext_prop_release() argument
1068 struct usb_os_desc_ext_prop *ext_prop = to_usb_os_desc_ext_prop(item); in usb_os_desc_ext_prop_release()
1102 config_item_init_type_name(&ext_prop->item, name, ext_prop_type); in ext_prop_make()
1119 return &ext_prop->item; in ext_prop_make()
1122 static void ext_prop_drop(struct config_group *group, struct config_item *item) in ext_prop_drop() argument
1124 struct usb_os_desc_ext_prop *ext_prop = to_usb_os_desc_ext_prop(item); in ext_prop_drop()
1135 config_item_put(item); in ext_prop_drop()
1143 static ssize_t interf_grp_compatible_id_show(struct config_item *item, in interf_grp_compatible_id_show() argument
1146 memcpy(page, to_usb_os_desc(item)->ext_compat_id, 8); in interf_grp_compatible_id_show()
1150 static ssize_t interf_grp_compatible_id_store(struct config_item *item, in interf_grp_compatible_id_store() argument
1153 struct usb_os_desc *desc = to_usb_os_desc(item); in interf_grp_compatible_id_store()
1169 static ssize_t interf_grp_sub_compatible_id_show(struct config_item *item, in interf_grp_sub_compatible_id_show() argument
1172 memcpy(page, to_usb_os_desc(item)->ext_compat_id + 8, 8); in interf_grp_sub_compatible_id_show()
1176 static ssize_t interf_grp_sub_compatible_id_store(struct config_item *item, in interf_grp_sub_compatible_id_store() argument
1179 struct usb_os_desc *desc = to_usb_os_desc(item); in interf_grp_sub_compatible_id_store()
1652 static void gadgets_drop(struct config_group *group, struct config_item *item) in gadgets_drop() argument
1654 config_item_put(item); in gadgets_drop()
1677 void unregister_gadget_item(struct config_item *item) in unregister_gadget_item() argument
1679 struct gadget_info *gi = to_gadget_info(item); in unregister_gadget_item()