Lines Matching full: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()
126 static ssize_t gadget_dev_desc_##__name##_show(struct config_item *item, \
130 to_gadget_info(item)->cdev.desc.__name); \
134 static ssize_t gadget_dev_desc_##__name##_show(struct config_item *item, \
138 le16_to_cpup(&to_gadget_info(item)->cdev.desc.__name)); \
143 static ssize_t gadget_dev_desc_##_name##_store(struct config_item *item, \
151 to_gadget_info(item)->cdev.desc._name = val; \
156 static ssize_t gadget_dev_desc_##_name##_store(struct config_item *item, \
164 to_gadget_info(item)->cdev.desc._name = cpu_to_le16p(&val); \
194 static ssize_t gadget_dev_desc_bcdDevice_store(struct config_item *item, in gadget_dev_desc_bcdDevice_store() argument
207 to_gadget_info(item)->cdev.desc.bcdDevice = cpu_to_le16(bcdDevice); in gadget_dev_desc_bcdDevice_store()
211 static ssize_t gadget_dev_desc_bcdUSB_store(struct config_item *item, in gadget_dev_desc_bcdUSB_store() argument
224 to_gadget_info(item)->cdev.desc.bcdUSB = cpu_to_le16(bcdUSB); in gadget_dev_desc_bcdUSB_store()
228 static ssize_t gadget_dev_desc_UDC_show(struct config_item *item, char *page) in gadget_dev_desc_UDC_show() argument
230 struct gadget_info *gi = to_gadget_info(item); in gadget_dev_desc_UDC_show()
257 static ssize_t gadget_dev_desc_UDC_store(struct config_item *item, in gadget_dev_desc_UDC_store() argument
260 struct gadget_info *gi = to_gadget_info(item); in gadget_dev_desc_UDC_store()
300 static ssize_t gadget_dev_desc_max_speed_show(struct config_item *item, in gadget_dev_desc_max_speed_show() argument
303 enum usb_device_speed speed = to_gadget_info(item)->composite.max_speed; in gadget_dev_desc_max_speed_show()
308 static ssize_t gadget_dev_desc_max_speed_store(struct config_item *item, in gadget_dev_desc_max_speed_store() argument
311 struct gadget_info *gi = to_gadget_info(item); in gadget_dev_desc_max_speed_store()
366 static inline struct gadget_strings *to_gadget_strings(struct config_item *item) in to_gadget_strings() argument
368 return container_of(to_config_group(item), struct gadget_strings, in to_gadget_strings()
373 struct config_item *item) in to_gadget_config_name() argument
375 return container_of(to_config_group(item), struct gadget_config_name, in to_gadget_config_name()
380 struct config_item *item) in to_usb_function_instance() argument
382 return container_of(to_config_group(item), in to_usb_function_instance()
386 static void gadget_info_attr_release(struct config_item *item) in gadget_info_attr_release() argument
388 struct gadget_info *gi = to_gadget_info(item); in gadget_info_attr_release()
401 static void gadget_config_attr_release(struct config_item *item) in gadget_config_attr_release() argument
403 struct config_usb_cfg *cfg = to_config_usb_cfg(item); in gadget_config_attr_release()
505 static ssize_t gadget_config_desc_MaxPower_show(struct config_item *item, in gadget_config_desc_MaxPower_show() argument
508 return sprintf(page, "%u\n", to_config_usb_cfg(item)->c.MaxPower); in gadget_config_desc_MaxPower_show()
511 static ssize_t gadget_config_desc_MaxPower_store(struct config_item *item, in gadget_config_desc_MaxPower_store() argument
521 to_config_usb_cfg(item)->c.MaxPower = val; in gadget_config_desc_MaxPower_store()
525 static ssize_t gadget_config_desc_bmAttributes_show(struct config_item *item, in gadget_config_desc_bmAttributes_show() argument
529 to_config_usb_cfg(item)->c.bmAttributes); in gadget_config_desc_bmAttributes_show()
532 static ssize_t gadget_config_desc_bmAttributes_store(struct config_item *item, in gadget_config_desc_bmAttributes_store() argument
545 to_config_usb_cfg(item)->c.bmAttributes = val; in gadget_config_desc_bmAttributes_store()
628 struct config_item *item) in function_drop() argument
630 struct usb_function_instance *fi = to_usb_function_instance(item); in function_drop()
638 config_item_put(item); in function_drop()
658 static void gadget_config_name_attr_release(struct config_item *item) in gadget_config_name_attr_release() argument
660 struct gadget_config_name *cn = to_gadget_config_name(item); in gadget_config_name_attr_release()
737 struct config_item *item) in config_desc_drop() argument
739 config_item_put(item); in config_desc_drop()
763 static void gadget_strings_attr_release(struct config_item *item) in gadget_strings_attr_release() argument
765 struct gadget_strings *gs = to_gadget_strings(item); in gadget_strings_attr_release()
778 static inline struct os_desc *to_os_desc(struct config_item *item) in to_os_desc() argument
780 return container_of(to_config_group(item), struct os_desc, group); in to_os_desc()
784 struct config_item *item) in os_desc_item_to_gadget_info() argument
786 return to_gadget_info(to_os_desc(item)->group.cg_item.ci_parent); in os_desc_item_to_gadget_info()
789 static ssize_t os_desc_use_show(struct config_item *item, char *page) in os_desc_use_show() argument
792 os_desc_item_to_gadget_info(item)->use_os_desc); in os_desc_use_show()
795 static ssize_t os_desc_use_store(struct config_item *item, const char *page, in os_desc_use_store() argument
798 struct gadget_info *gi = os_desc_item_to_gadget_info(item); in os_desc_use_store()
813 static ssize_t os_desc_b_vendor_code_show(struct config_item *item, char *page) in os_desc_b_vendor_code_show() argument
816 os_desc_item_to_gadget_info(item)->b_vendor_code); in os_desc_b_vendor_code_show()
819 static ssize_t os_desc_b_vendor_code_store(struct config_item *item, in os_desc_b_vendor_code_store() argument
822 struct gadget_info *gi = os_desc_item_to_gadget_info(item); in os_desc_b_vendor_code_store()
837 static ssize_t os_desc_qw_sign_show(struct config_item *item, char *page) in os_desc_qw_sign_show() argument
839 struct gadget_info *gi = os_desc_item_to_gadget_info(item); in os_desc_qw_sign_show()
849 static ssize_t os_desc_qw_sign_store(struct config_item *item, const char *page, in os_desc_qw_sign_store() argument
852 struct gadget_info *gi = os_desc_item_to_gadget_info(item); in os_desc_qw_sign_store()
881 static void os_desc_attr_release(struct config_item *item) in os_desc_attr_release() argument
883 struct os_desc *os_desc = to_os_desc(item); in os_desc_attr_release()
950 *to_usb_os_desc_ext_prop(struct config_item *item) in to_usb_os_desc_ext_prop() argument
952 return container_of(item, struct usb_os_desc_ext_prop, item); in to_usb_os_desc_ext_prop()
955 static ssize_t ext_prop_type_show(struct config_item *item, char *page) in ext_prop_type_show() argument
957 return sprintf(page, "%d\n", to_usb_os_desc_ext_prop(item)->type); in ext_prop_type_show()
960 static ssize_t ext_prop_type_store(struct config_item *item, in ext_prop_type_store() argument
963 struct usb_os_desc_ext_prop *ext_prop = to_usb_os_desc_ext_prop(item); in ext_prop_type_store()
964 struct usb_os_desc *desc = to_usb_os_desc(ext_prop->item.ci_parent); in ext_prop_type_store()
1001 static ssize_t ext_prop_data_show(struct config_item *item, char *page) in ext_prop_data_show() argument
1003 struct usb_os_desc_ext_prop *ext_prop = to_usb_os_desc_ext_prop(item); in ext_prop_data_show()
1015 static ssize_t ext_prop_data_store(struct config_item *item, in ext_prop_data_store() argument
1018 struct usb_os_desc_ext_prop *ext_prop = to_usb_os_desc_ext_prop(item); in ext_prop_data_store()
1019 struct usb_os_desc *desc = to_usb_os_desc(ext_prop->item.ci_parent); in ext_prop_data_store()
1058 static void usb_os_desc_ext_prop_release(struct config_item *item) in usb_os_desc_ext_prop_release() argument
1060 struct usb_os_desc_ext_prop *ext_prop = to_usb_os_desc_ext_prop(item); in usb_os_desc_ext_prop_release()
1094 config_item_init_type_name(&ext_prop->item, name, ext_prop_type); in ext_prop_make()
1111 return &ext_prop->item; in ext_prop_make()
1114 static void ext_prop_drop(struct config_group *group, struct config_item *item) in ext_prop_drop() argument
1116 struct usb_os_desc_ext_prop *ext_prop = to_usb_os_desc_ext_prop(item); in ext_prop_drop()
1127 config_item_put(item); in ext_prop_drop()
1135 static ssize_t interf_grp_compatible_id_show(struct config_item *item, in interf_grp_compatible_id_show() argument
1138 memcpy(page, to_usb_os_desc(item)->ext_compat_id, 8); in interf_grp_compatible_id_show()
1142 static ssize_t interf_grp_compatible_id_store(struct config_item *item, in interf_grp_compatible_id_store() argument
1145 struct usb_os_desc *desc = to_usb_os_desc(item); in interf_grp_compatible_id_store()
1161 static ssize_t interf_grp_sub_compatible_id_show(struct config_item *item, in interf_grp_sub_compatible_id_show() argument
1164 memcpy(page, to_usb_os_desc(item)->ext_compat_id + 8, 8); in interf_grp_sub_compatible_id_show()
1168 static ssize_t interf_grp_sub_compatible_id_store(struct config_item *item, in interf_grp_sub_compatible_id_store() argument
1171 struct usb_os_desc *desc = to_usb_os_desc(item); in interf_grp_sub_compatible_id_store()
1644 static void gadgets_drop(struct config_group *group, struct config_item *item) in gadgets_drop() argument
1646 config_item_put(item); in gadgets_drop()
1669 void unregister_gadget_item(struct config_item *item) in unregister_gadget_item() argument
1671 struct gadget_info *gi = to_gadget_info(item); in unregister_gadget_item()