es58x_parse_hw_rev(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… es58x_parse_hw_rev πŸ’…

okay so bestie, we're in the Kernel API Manual today and this page is all about es58x_parse_hw_rev β€” literally the function that pulls the hardware revision number out of a string. it's giving "detective energy" and honestly? iconic.

✨ NAME ✨

es58x_parse_hw_rev β€” Extract hardware revision number πŸŽ€

✨ SYNOPSIS ✨

int es58x_parse_hw_rev (struct es58x_device *es58x_dev , const char
*prod_info );

✨ ARGUMENTS ✨

  • es58x_dev β€” your ES58X device bestie 🫢 like, the actual struct we're working with.
  • prod_info β€” the USB custom string that the device hands back to us. it's the raw tea β˜• straight from the hardware.

✨ DESCRIPTION ✨

so here's the vibe: prod_info has the hardware revision tucked inside it, prefixed by a magic string, and then conquenated together with other numbers. yes, that's the manpage's word, we're keeping it 😭

depending on the device, the hardware revision format is either "HW_VER:axxx/xxx" or "HR:axxx/xxx" β€” where 'a' represents a letter and 'x' a digit. no cap, that's the whole pattern πŸ”₯

what the function does is parse prod_info and store the hardware revision number in es58x_dev.hardware_revision. that's it, that's the assignment. main character behaviour tbh πŸ‘‘

✨ RETURN ✨

  • zero on success β€” slay πŸ’–
  • -EBADMSG if prod_info could not be parsed β€” like, the string didn't vibe check and we had to bail 😭

✨ SEE ALSO ✨


🌸 and that's the whole page, bestie! this lil gem lives in ./drivers/net/can/usb/etas_es58x and the manual is dated October 2026 β€” go forth and parse those revisions πŸ’œβœ¨πŸ¦‹

πŸ“¦ where this page comes from