STRUCT EXTCON_CABLE(9)
β¨ NAME β¨
okay so bestie, welcome to the struct extcon_cable(9) page from the Kernel API Manual π and no cap, this one is literally struct extcon_cable β βAn internal data for an external connector.β Itβs giving internal backstage-pass energy for an external connector, and we respect it π
π¦ SYNOPSIS π¦
hereβs the whole struct, copy-pasted into our group chat with love and zero typos tolerated:
struct extcon_cable {
struct extcon_dev *edev;
int cable_index;
struct attribute_group attr_g;
struct device_attribute attr_name;
struct device_attribute attr_state;
struct attribute *attrs[3];
union extcon_property_value usb_propval[EXTCON_PROP_USB_CNT];
union extcon_property_value chg_propval[EXTCON_PROP_CHG_CNT];
union extcon_property_value jack_propval[EXTCON_PROP_JACK_CNT];
union extcon_property_value disp_propval[EXTCON_PROP_DISP_CNT];
unsigned long usb_bits[BITS_TO_LONGS( EXTCON_PROP_USB_CNT)];
unsigned long chg_bits[BITS_TO_LONGS( EXTCON_PROP_CHG_CNT)];
unsigned long jack_bits[BITS_TO_LONGS( EXTCON_PROP_JACK_CNT)];
unsigned long disp_bits[BITS_TO_LONGS( EXTCON_PROP_DISP_CNT)];
};
π«Ά Members π«Ά
edevβ the extcon device. thatβs the whole vibe anchor, fr fr πΈcable_indexβ the index of this cable in the edev. like its little seat number in the extcon device πΊattr_gβ the attribute group for the cable. iconic sysfs grouping behavior β¨attr_nameβ the"name"sysfs entry. yes bestie, that exact name πattr_stateβ the"state"sysfs entry. and that exact state πattrsβ the array pointing toattr_nameandattr_stateforattr_g. itβs the friend group linking them together π«Άusb_propvalβ the array of USB connector properties. USB but make it property-array πchg_propvalβ the array of charger connector properties. charger lore πjack_propvalβ the array of jack connector properties. jack behavior, noted π§disp_propvalβ the array of display connector properties. display properties serving looks πusb_bitsβ the bit array of the USB connector property capabilities. capability bits, but USB-coded βchg_bitsβ the bit array of the charger connector property capabilities. charger capability bits, slay π₯jack_bitsβ the bit array of the jack connector property capabilities. jack capability bits, periodt π¦disp_bitsβ the bit array of the display connector property capabilities. display capability bits, no cap π
π SEE ALSO π
go check out the kernel file ./drivers/extcon/extcon.c and these absolute besties:
extcon_sync(9)extcon_get_state(9)extcon_set_state(9)extcon_set_state_sync(9)extcon_get_property(9)extcon_set_property(9)extcon_set_property_sync(9)extcon_get_property_capability(9)extcon_set_property_capability(9)extcon_get_extcon_dev(9)extcon_register_notifier(9)extcon_unregister_notifier(9)extcon_register_notifier_all(9)extcon_unregister_notifier_all(9)extcon_alloc_cables(9)extcon_alloc_muex(9)extcon_alloc_groups(9)extcon_dev_register(9)extcon_dev_unregister(9)extcon_get_edev_name(9)
byeee bestie, this lil page came from ./drivers/extcon, dated October 2026, and itβs literally the struct extcon_cable(9) manual page β mwah, stay iconic ππ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms