• Home
  • Raw
  • Download

Lines Matching full:cable

204  * @cable_index:	the index of this cable in the edev
205 * @attr_g: the attribute group for the cable
268 /* Find the the index of extcon cable in edev->supported_cable */ in find_cable_index_by_id()
321 struct extcon_cable *cable; in is_extcon_property_capability() local
329 cable = &edev->cables[index]; in is_extcon_property_capability()
333 ret = test_bit(prop - EXTCON_PROP_USB_MIN, cable->usb_bits); in is_extcon_property_capability()
336 ret = test_bit(prop - EXTCON_PROP_CHG_MIN, cable->chg_bits); in is_extcon_property_capability()
339 ret = test_bit(prop - EXTCON_PROP_JACK_MIN, cable->jack_bits); in is_extcon_property_capability()
342 ret = test_bit(prop - EXTCON_PROP_DISP_MIN, cable->disp_bits); in is_extcon_property_capability()
354 struct extcon_cable *cable = &edev->cables[index]; in init_property() local
357 memset(cable->usb_propval, 0, sizeof(cable->usb_propval)); in init_property()
359 memset(cable->chg_propval, 0, sizeof(cable->chg_propval)); in init_property()
361 memset(cable->jack_propval, 0, sizeof(cable->jack_propval)); in init_property()
363 memset(cable->disp_propval, 0, sizeof(cable->disp_propval)); in init_property()
397 struct extcon_cable *cable = container_of(attr, struct extcon_cable, in cable_name_show() local
399 int i = cable->cable_index; in cable_name_show()
402 extcon_info[cable->edev->supported_cable[i]].name); in cable_name_show()
408 struct extcon_cable *cable = container_of(attr, struct extcon_cable, in cable_state_show() local
411 int i = cable->cable_index; in cable_state_show()
414 extcon_get_state(cable->edev, cable->edev->supported_cable[i])); in cable_state_show()
637 struct extcon_cable *cable; in extcon_get_property() local
650 /* Find the cable index of external connector by using id */ in extcon_get_property()
673 cable = &edev->cables[index]; in extcon_get_property()
678 *prop_val = cable->usb_propval[prop - EXTCON_PROP_USB_MIN]; in extcon_get_property()
681 *prop_val = cable->chg_propval[prop - EXTCON_PROP_CHG_MIN]; in extcon_get_property()
684 *prop_val = cable->jack_propval[prop - EXTCON_PROP_JACK_MIN]; in extcon_get_property()
687 *prop_val = cable->disp_propval[prop - EXTCON_PROP_DISP_MIN]; in extcon_get_property()
716 struct extcon_cable *cable; in extcon_set_property() local
727 /* Find the cable index of external connector by using id */ in extcon_set_property()
740 cable = &edev->cables[index]; in extcon_set_property()
745 cable->usb_propval[prop - EXTCON_PROP_USB_MIN] = prop_val; in extcon_set_property()
748 cable->chg_propval[prop - EXTCON_PROP_CHG_MIN] = prop_val; in extcon_set_property()
751 cable->jack_propval[prop - EXTCON_PROP_JACK_MIN] = prop_val; in extcon_set_property()
754 cable->disp_propval[prop - EXTCON_PROP_DISP_MIN] = prop_val; in extcon_set_property()
812 /* Find the cable index of external connector by using id */ in extcon_get_property_capability()
837 struct extcon_cable *cable; in extcon_set_property_capability() local
847 /* Find the cable index of external connector by using id. */ in extcon_set_property_capability()
856 cable = &edev->cables[index]; in extcon_set_property_capability()
860 __set_bit(prop - EXTCON_PROP_USB_MIN, cable->usb_bits); in extcon_set_property_capability()
863 __set_bit(prop - EXTCON_PROP_CHG_MIN, cable->chg_bits); in extcon_set_property_capability()
866 __set_bit(prop - EXTCON_PROP_JACK_MIN, cable->jack_bits); in extcon_set_property_capability()
869 __set_bit(prop - EXTCON_PROP_DISP_MIN, cable->disp_bits); in extcon_set_property_capability()
1137 struct extcon_cable *cable; in extcon_dev_register() local
1147 cable = &edev->cables[index]; in extcon_dev_register()
1149 str = kasprintf(GFP_KERNEL, "cable.%d", index); in extcon_dev_register()
1152 cable = &edev->cables[index]; in extcon_dev_register()
1153 kfree(cable->attr_g.name); in extcon_dev_register()
1160 cable->edev = edev; in extcon_dev_register()
1161 cable->cable_index = index; in extcon_dev_register()
1162 cable->attrs[0] = &cable->attr_name.attr; in extcon_dev_register()
1163 cable->attrs[1] = &cable->attr_state.attr; in extcon_dev_register()
1164 cable->attrs[2] = NULL; in extcon_dev_register()
1165 cable->attr_g.name = str; in extcon_dev_register()
1166 cable->attr_g.attrs = cable->attrs; in extcon_dev_register()
1168 sysfs_attr_init(&cable->attr_name.attr); in extcon_dev_register()
1169 cable->attr_name.attr.name = "name"; in extcon_dev_register()
1170 cable->attr_name.attr.mode = 0444; in extcon_dev_register()
1171 cable->attr_name.show = cable_name_show; in extcon_dev_register()
1173 sysfs_attr_init(&cable->attr_state.attr); in extcon_dev_register()
1174 cable->attr_state.attr.name = "state"; in extcon_dev_register()
1175 cable->attr_state.attr.mode = 0444; in extcon_dev_register()
1176 cable->attr_state.show = cable_state_show; in extcon_dev_register()