1. 12 Oct, 2018 1 commit
    • Nicolin Chen's avatar
      hwmon: (core) Add trace events to _attr_show/store functions · 61b8ab2c
      Nicolin Chen authored
      Trace events are useful for people who collect data from the
      Ftrace outputs. There're people who analyse the relationship
      of cpufreq, thermal and hwmon (power/voltage/current) using
      the convenient and timestamped Ftrace outputs, while unlike
      cpufreq and thermal subsystems the hwmon does not have trace
      events supported yet.
      
      So this patch adds initial trace events for the hwmon core.
      To call hwmon_attr_base() for aligned attr index numbers, it
      also moves the function upward.
      
      Ftrace outputs:
       ...: hwmon_attr_show_string: index=2, attr_name=in2_label, val=VDD_5V
       ...: hwmon_attr_show: index=2, attr_name=in2_input, val=5112
       ...: hwmon_attr_show: index=2, attr_name=curr2_input, val=440
      
      Note that the _attr_show and _attr_store functions are tied
      to the _with_info API. So a hwmon driver requiring the trace
      events feature should use _with_info API to register a hwmon
      device.
      Signed-off-by: default avatarNicolin Chen <nicoleotsuka@gmail.com>
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      61b8ab2c
  2. 11 Oct, 2018 39 commits