#compdef framework_tool

local -a options

options=(
  '--flash-gpu-descriptor[]'
  '-v[Increase logging verbosity]'
  '-q[Decrease logging verbosity]'
  '--versions[Show current firmware versions]'
  '--version[Show tool version information (Add -vv for more details)]'
  '--features[Show features supported by the firmware]'
  '--esrt[Display the UEFI ESRT table]'
  '--device[Specify device type]:device:(bios ec pd0 pd1 rtm01 rtm23 ac-left ac-right)'
  '--compare-version[Specify version to compare]:compare_version'
  '--power[Show current power status of battery and AC (Add -vv for more details)]'
  '--thermal[Print thermal information (Temperatures and Fan speed)]'
  '--sensors[Print sensor information (ALS, G-Sensor)]'
  '--pdports[Show information about USB-C PD ports]'
  '--info[Show info from SMBIOS (Only on UEFI)]'
  '--pd-info[Show details about the PD controllers]'
  '--dp-hdmi-info[Show details about connected DP or HDMI Expansion Cards]'
  '--dp-hdmi-update[Update the DisplayPort or HDMI Expansion Card]:update_bin'
  '--audio-card-info[Show details about connected Audio Expansion Cards (Needs root privileges)]'
  '--privacy[Show privacy switch statuses (camera and microphone)]'
  '--pd-bin[Parse versions from PD firmware binary file]:pd_bin'
  '--ec-bin[Parse versions from EC firmware binary file]:ec_bin'
  '--capsule[Parse UEFI Capsule information from binary file]:capsule'
  '--dump[Dump extracted UX capsule bitmap image to a file]:dump'
  '--ho2-capsule[Parse UEFI Capsule information from binary file]:ho2_capsule'
  '--dump-ec-flash[Dump EC flash contents]:dump_ec_flash'
  '--flash-ec[Flash EC with new firmware from file]:flash_ec'
  '--flash-ro-ec[Flash EC with new RO firmware from file]:flash_ro_ec'
  '--flash-rw-ec[Flash EC with new RW firmware from file]:flash_rw_ec'
  '--intrusion[Show status of intrusion switch]'
  '--inputdeck[Show status of the input deck]'
  '--inputdeck-mode[Set input deck power mode]:inputdeck_mode:(auto off on)'
  '--charge-limit[Get or set max charge limit]:charge_limit'
  '--get-gpio[Get GPIO value by name]:get_gpio'
  '--fp-led-level-gpio[Get or set fingerprint LED brightness level]:fp_led_level:(high medium low ultra-low auto)'
  '--fp-brightness[Get or set fingerprint LED brightness]:fp_brightness'
  '--kblight[Set keyboard backlight percentage or get, if no value provided]:kblight'
  '--rgbkbd[Set the color of <key> to <RGB>.]'
  '--tablet-mode[Set tablet mode override]:tablet_mode:(auto tablet laptop)'
  '--touchscreen-enable[Enable/disable touchscreen]:touchscreen_enable:(true false)'
  '--console[Get EC console, choose whether recent or to follow the output]:console:(recent follow)'
  '--reboot-ec[Control EC RO/RW jump]:reboot_ec:(reboot jump-ro jump-rw cancel-jump disable-jump)'
  '--hash[Hash a file of arbitrary data]:hash'
  '--driver[Select which driver is used]:driver:(portio cros-ec windows)'
  '--pd-addrs[Specify I2C addresses of the PD chips (Advanced)]:pd_addrs'
  '--pd-ports[Specify I2C ports of the PD chips (Advanced)]:pd_ports'
  '-t[Run self-test to check if interaction with EC is possible]'
  '-h[Print help]'
)

_arguments -s -S $options
