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