Skip to content
  • Guenter Roeck's avatar
    hwmon: Add notification support · 1597b374
    Guenter Roeck authored
    
    
    For hwmon drivers using the hwmon_device_register_with_info() API, it
    is desirable to have a generic notification mechanism available. This
    mechanism can be used to notify userspace as well as the thermal
    subsystem if the driver experiences any events, such as warning or
    critical alarms.
    
    Implement hwmon_notify_event() to provide this mechanism. The function
    generates a sysfs event and a udev event. If the device is registered
    with the thermal subsystem and the event is associated with a temperature
    sensor, also notify the thermal subsystem that a thermal event occurred.
    
    Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
    Signed-off-by: default avatarSerge Semin <Sergey.Semin@baikalelectronics.ru>
    Cc: Maxim Kaurkin <Maxim.Kaurkin@baikalelectronics.ru>
    Cc: Alexey Malahov <Alexey.Malahov@baikalelectronics.ru>
    Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
    Cc: Arnd Bergmann <arnd@arndb.de>
    Cc: Rob Herring <robh+dt@kernel.org>
    Cc: linux-mips@vger.kernel.org
    Cc: devicetree@vger.kernel.org
    Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
    1597b374