Lines Matching full:cable

194  * @cable_index:	the index of this cable in the edev
195 * @attr_g: the attribute group for the cable
250 /* Find the the index of extcon cable in edev->supported_cable */ in find_cable_index_by_id()
303 struct extcon_cable *cable; in is_extcon_property_capability() local
311 cable = &edev->cables[index]; in is_extcon_property_capability()
315 ret = test_bit(prop - EXTCON_PROP_USB_MIN, cable->usb_bits); in is_extcon_property_capability()
318 ret = test_bit(prop - EXTCON_PROP_CHG_MIN, cable->chg_bits); in is_extcon_property_capability()
321 ret = test_bit(prop - EXTCON_PROP_JACK_MIN, cable->jack_bits); in is_extcon_property_capability()
324 ret = test_bit(prop - EXTCON_PROP_DISP_MIN, cable->disp_bits); in is_extcon_property_capability()
336 struct extcon_cable *cable = &edev->cables[index]; in init_property() local
339 memset(cable->usb_propval, 0, sizeof(cable->usb_propval)); in init_property()
341 memset(cable->chg_propval, 0, sizeof(cable->chg_propval)); in init_property()
343 memset(cable->jack_propval, 0, sizeof(cable->jack_propval)); in init_property()
345 memset(cable->disp_propval, 0, sizeof(cable->disp_propval)); in init_property()
379 struct extcon_cable *cable = container_of(attr, struct extcon_cable, in cable_name_show() local
381 int i = cable->cable_index; in cable_name_show()
384 extcon_info[cable->edev->supported_cable[i]].name); in cable_name_show()
390 struct extcon_cable *cable = container_of(attr, struct extcon_cable, in cable_state_show() local
393 int i = cable->cable_index; in cable_state_show()
396 extcon_get_state(cable->edev, cable->edev->supported_cable[i])); in cable_state_show()
619 struct extcon_cable *cable; in extcon_get_property() local
632 /* Find the cable index of external connector by using id */ in extcon_get_property()
655 cable = &edev->cables[index]; in extcon_get_property()
660 *prop_val = cable->usb_propval[prop - EXTCON_PROP_USB_MIN]; in extcon_get_property()
663 *prop_val = cable->chg_propval[prop - EXTCON_PROP_CHG_MIN]; in extcon_get_property()
666 *prop_val = cable->jack_propval[prop - EXTCON_PROP_JACK_MIN]; in extcon_get_property()
669 *prop_val = cable->disp_propval[prop - EXTCON_PROP_DISP_MIN]; in extcon_get_property()
698 struct extcon_cable *cable; in extcon_set_property() local
709 /* Find the cable index of external connector by using id */ in extcon_set_property()
722 cable = &edev->cables[index]; in extcon_set_property()
727 cable->usb_propval[prop - EXTCON_PROP_USB_MIN] = prop_val; in extcon_set_property()
730 cable->chg_propval[prop - EXTCON_PROP_CHG_MIN] = prop_val; in extcon_set_property()
733 cable->jack_propval[prop - EXTCON_PROP_JACK_MIN] = prop_val; in extcon_set_property()
736 cable->disp_propval[prop - EXTCON_PROP_DISP_MIN] = prop_val; in extcon_set_property()
794 /* Find the cable index of external connector by using id */ in extcon_get_property_capability()
819 struct extcon_cable *cable; in extcon_set_property_capability() local
829 /* Find the cable index of external connector by using id. */ in extcon_set_property_capability()
838 cable = &edev->cables[index]; in extcon_set_property_capability()
842 __set_bit(prop - EXTCON_PROP_USB_MIN, cable->usb_bits); in extcon_set_property_capability()
845 __set_bit(prop - EXTCON_PROP_CHG_MIN, cable->chg_bits); in extcon_set_property_capability()
848 __set_bit(prop - EXTCON_PROP_JACK_MIN, cable->jack_bits); in extcon_set_property_capability()
851 __set_bit(prop - EXTCON_PROP_DISP_MIN, cable->disp_bits); in extcon_set_property_capability()
1119 struct extcon_cable *cable; in extcon_dev_register() local
1129 cable = &edev->cables[index]; in extcon_dev_register()
1131 str = kasprintf(GFP_KERNEL, "cable.%d", index); in extcon_dev_register()
1134 cable = &edev->cables[index]; in extcon_dev_register()
1135 kfree(cable->attr_g.name); in extcon_dev_register()
1142 cable->edev = edev; in extcon_dev_register()
1143 cable->cable_index = index; in extcon_dev_register()
1144 cable->attrs[0] = &cable->attr_name.attr; in extcon_dev_register()
1145 cable->attrs[1] = &cable->attr_state.attr; in extcon_dev_register()
1146 cable->attrs[2] = NULL; in extcon_dev_register()
1147 cable->attr_g.name = str; in extcon_dev_register()
1148 cable->attr_g.attrs = cable->attrs; in extcon_dev_register()
1150 sysfs_attr_init(&cable->attr_name.attr); in extcon_dev_register()
1151 cable->attr_name.attr.name = "name"; in extcon_dev_register()
1152 cable->attr_name.attr.mode = 0444; in extcon_dev_register()
1153 cable->attr_name.show = cable_name_show; in extcon_dev_register()
1155 sysfs_attr_init(&cable->attr_state.attr); in extcon_dev_register()
1156 cable->attr_state.attr.name = "state"; in extcon_dev_register()
1157 cable->attr_state.attr.mode = 0444; in extcon_dev_register()
1158 cable->attr_state.show = cable_state_show; in extcon_dev_register()