linux/drivers/misc/habanalabs
Oded Gabbay d91389bc83 habanalabs: add sysfs and hwmon support
This patch add the sysfs and hwmon entries that are exposed by the driver.

Goya has several sensors, from various categories such as temperature,
voltage, current, etc. The driver exposes those sensors in the standard
hwmon mechanism.

In addition, the driver exposes a couple of interfaces in sysfs, both for
configuration and for providing status of the device or driver.

The configuration attributes is for Power Management:
- Automatic or manual
- Frequency value when moving to high frequency mode
- Maximum power the device is allowed to consume

The rest of the attributes are read-only and provide the following
information:
- Versions of the various firmwares running on the device
- Contents of the device's EEPROM
- The device type (currently only Goya is supported)
- PCI address of the device (to allow user-space to connect between
  /dev/hlX to PCI address)
- Status of the device (operational, malfunction, in_reset)
- How many processes are open on the device's file

Reviewed-by: Mike Rapoport <rppt@linux.ibm.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-18 09:46:45 +01:00
..
goya habanalabs: add sysfs and hwmon support 2019-02-18 09:46:45 +01:00
include habanalabs: add event queue and interrupts 2019-02-18 09:46:45 +01:00
Kconfig
Makefile habanalabs: add sysfs and hwmon support 2019-02-18 09:46:45 +01:00
asid.c habanalabs: add context and ASID modules 2019-02-18 09:46:44 +01:00
command_buffer.c habanalabs: add command buffer module 2019-02-18 09:46:44 +01:00
context.c habanalabs: add context and ASID modules 2019-02-18 09:46:44 +01:00
device.c habanalabs: add sysfs and hwmon support 2019-02-18 09:46:45 +01:00
habanalabs.h habanalabs: add sysfs and hwmon support 2019-02-18 09:46:45 +01:00
habanalabs_drv.c habanalabs: add sysfs and hwmon support 2019-02-18 09:46:45 +01:00
habanalabs_ioctl.c habanalabs: add command buffer module 2019-02-18 09:46:44 +01:00
hw_queue.c habanalabs: add h/w queues module 2019-02-18 09:46:45 +01:00
hwmon.c habanalabs: add sysfs and hwmon support 2019-02-18 09:46:45 +01:00
irq.c habanalabs: add event queue and interrupts 2019-02-18 09:46:45 +01:00
sysfs.c habanalabs: add sysfs and hwmon support 2019-02-18 09:46:45 +01:00