# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2025 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only

# Currents
#
# Currents enumeration starts from 1 not 0

  abi <abi/4.0>,

  include <abstractions/sys/hwmon>

  @{sys}/devices/**/hwmon@{int}/curr@{int}_average r,
  @{sys}/devices/**/hwmon@{int}/curr@{int}_crit r,
  @{sys}/devices/**/hwmon@{int}/curr@{int}_enable r,
  @{sys}/devices/**/hwmon@{int}/curr@{int}_highest r,
  @{sys}/devices/**/hwmon@{int}/curr@{int}_input r,
  @{sys}/devices/**/hwmon@{int}/curr@{int}_lcrit r,
  @{sys}/devices/**/hwmon@{int}/curr@{int}_lowest r,
  @{sys}/devices/**/hwmon@{int}/curr@{int}_max r,
  @{sys}/devices/**/hwmon@{int}/curr@{int}_min r,

  # The line below is not in kernel doc, but present in real system for CPU hwmon
  @{sys}/devices/**/hwmon@{int}/curr@{int}_label r,

  include if exists <abstractions/sys/hwmon-current.d>

# vim:syntax=apparmor
