Changes between Version 60 and Version 61 of faq


Ignore:
Timestamp:
07/25/2025 05:48:15 PM (7 weeks ago)
Author:
Ryan Erbstoesser
Comment:

add note about hwmon

Legend:

Unmodified
Added
Removed
Modified
  • faq

    v60 v61  
    360360
    361361The schematic files and layout files are considered Gateworks intellectual property. Gateworks however is happy to answer any technical questions related to the schematic, and at times may even release small snippets for better clarity. 
     362
     363== How do I handle changing Linux names for hwmon deveices (hwmon0, hwmon1, etc)
     364
     365It's not a good idea to have the /sys/class/hwmon/hwmon1' path hard coded as devices can move around depending on kernels, kernel config, and sometimes just boot to boot. Instead you should find the device with a name of gsc_hwmon and use that.
     366
     367An example is below:
     368{{{
     369
     370DEV=$(for i in $(ls /sys/class/hwmon); do [ "gsc_hwmon" = $(cat /sys/class/hwmon/$i/name) ] && echo $i; done)
     371
     372cat /sys/class/hwmon/$DEV/pwm1_auto_point1_temp
     373}}}