Lines Matching refs:cable

313 	struct extcon_cable *cable;  in is_extcon_property_capability()  local
321 cable = &edev->cables[index]; in is_extcon_property_capability()
325 ret = test_bit(prop - EXTCON_PROP_USB_MIN, cable->usb_bits); in is_extcon_property_capability()
328 ret = test_bit(prop - EXTCON_PROP_CHG_MIN, cable->chg_bits); in is_extcon_property_capability()
331 ret = test_bit(prop - EXTCON_PROP_JACK_MIN, cable->jack_bits); in is_extcon_property_capability()
334 ret = test_bit(prop - EXTCON_PROP_DISP_MIN, cable->disp_bits); in is_extcon_property_capability()
346 struct extcon_cable *cable = &edev->cables[index]; in init_property() local
349 memset(cable->usb_propval, 0, sizeof(cable->usb_propval)); in init_property()
351 memset(cable->chg_propval, 0, sizeof(cable->chg_propval)); in init_property()
353 memset(cable->jack_propval, 0, sizeof(cable->jack_propval)); in init_property()
355 memset(cable->disp_propval, 0, sizeof(cable->disp_propval)); in init_property()
389 struct extcon_cable *cable = container_of(attr, struct extcon_cable, in cable_name_show() local
391 int i = cable->cable_index; in cable_name_show()
394 extcon_info[cable->edev->supported_cable[i]].name); in cable_name_show()
400 struct extcon_cable *cable = container_of(attr, struct extcon_cable, in cable_state_show() local
403 int i = cable->cable_index; in cable_state_show()
406 extcon_get_state(cable->edev, cable->edev->supported_cable[i])); in cable_state_show()
618 struct extcon_cable *cable; in extcon_get_property() local
654 cable = &edev->cables[index]; in extcon_get_property()
659 *prop_val = cable->usb_propval[prop - EXTCON_PROP_USB_MIN]; in extcon_get_property()
662 *prop_val = cable->chg_propval[prop - EXTCON_PROP_CHG_MIN]; in extcon_get_property()
665 *prop_val = cable->jack_propval[prop - EXTCON_PROP_JACK_MIN]; in extcon_get_property()
668 *prop_val = cable->disp_propval[prop - EXTCON_PROP_DISP_MIN]; in extcon_get_property()
697 struct extcon_cable *cable; in extcon_set_property() local
721 cable = &edev->cables[index]; in extcon_set_property()
726 cable->usb_propval[prop - EXTCON_PROP_USB_MIN] = prop_val; in extcon_set_property()
729 cable->chg_propval[prop - EXTCON_PROP_CHG_MIN] = prop_val; in extcon_set_property()
732 cable->jack_propval[prop - EXTCON_PROP_JACK_MIN] = prop_val; in extcon_set_property()
735 cable->disp_propval[prop - EXTCON_PROP_DISP_MIN] = prop_val; in extcon_set_property()
821 struct extcon_cable *cable; in extcon_set_property_capability() local
840 cable = &edev->cables[index]; in extcon_set_property_capability()
844 __set_bit(prop - EXTCON_PROP_USB_MIN, cable->usb_bits); in extcon_set_property_capability()
847 __set_bit(prop - EXTCON_PROP_CHG_MIN, cable->chg_bits); in extcon_set_property_capability()
850 __set_bit(prop - EXTCON_PROP_JACK_MIN, cable->jack_bits); in extcon_set_property_capability()
853 __set_bit(prop - EXTCON_PROP_DISP_MIN, cable->disp_bits); in extcon_set_property_capability()
1123 struct extcon_cable *cable; in extcon_dev_register() local
1133 cable = &edev->cables[index]; in extcon_dev_register()
1138 cable = &edev->cables[index]; in extcon_dev_register()
1139 kfree(cable->attr_g.name); in extcon_dev_register()
1146 cable->edev = edev; in extcon_dev_register()
1147 cable->cable_index = index; in extcon_dev_register()
1148 cable->attrs[0] = &cable->attr_name.attr; in extcon_dev_register()
1149 cable->attrs[1] = &cable->attr_state.attr; in extcon_dev_register()
1150 cable->attrs[2] = NULL; in extcon_dev_register()
1151 cable->attr_g.name = str; in extcon_dev_register()
1152 cable->attr_g.attrs = cable->attrs; in extcon_dev_register()
1154 sysfs_attr_init(&cable->attr_name.attr); in extcon_dev_register()
1155 cable->attr_name.attr.name = "name"; in extcon_dev_register()
1156 cable->attr_name.attr.mode = 0444; in extcon_dev_register()
1157 cable->attr_name.show = cable_name_show; in extcon_dev_register()
1159 sysfs_attr_init(&cable->attr_state.attr); in extcon_dev_register()
1160 cable->attr_state.attr.name = "state"; in extcon_dev_register()
1161 cable->attr_state.attr.mode = 0444; in extcon_dev_register()
1162 cable->attr_state.show = cable_state_show; in extcon_dev_register()