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

# PWM
#
# PWM enumeration starts from 1 not 0

  abi <abi/4.0>,

  include <abstractions/sys/hwmon>

  @{sys}/devices/**/hwmon@{int}/pwm@{int} r,
  @{sys}/devices/**/hwmon@{int}/pwm@{int}_auto_channels_temp r,
  @{sys}/devices/**/hwmon@{int}/pwm@{int}_auto_point@{int}_pwm r,
  @{sys}/devices/**/hwmon@{int}/pwm@{int}_auto_point@{int}_temp r,
  @{sys}/devices/**/hwmon@{int}/pwm@{int}_auto_point@{int}_temp_hyst r,
  @{sys}/devices/**/hwmon@{int}/pwm@{int}_enable r,
  @{sys}/devices/**/hwmon@{int}/pwm@{int}_freq r,
  @{sys}/devices/**/hwmon@{int}/pwm@{int}_mode r,
  @{sys}/devices/**/hwmon@{int}/temp@{int}_auto_point@{int}_pwm r,
  @{sys}/devices/**/hwmon@{int}/temp@{int}_auto_point@{int}_temp r,
  @{sys}/devices/**/hwmon@{int}/temp@{int}_auto_point@{int}_temp_hyst r,

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

# vim:syntax=apparmor
