# Copyright (c) 2012-2015, 2017-2019, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#     * Redistributions of source code must retain the above copyright
#       notice, this list of conditions and the following disclaimer.
#     * Redistributions in binary form must reproduce the above copyright
#       notice, this list of conditions and the following disclaimer in the
#       documentation and/or other materials provided with the distribution.
#     * Neither the name of The Linux Foundation nor
#       the names of its contributors may be used to endorse or promote
#       products derived from this software without specific prior written
#       permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NON-INFRINGEMENT ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#

# Firmware directory Path
# Below macro will be read by uevent and path will
# be added to search path for firmware loading
firmware_directories /vendor/firmware_mnt/image/

# the DIAG device node is not world writable/readable.
/dev/diag                 0660   system     oem_2901
/dev/ttydiag0             0660   system     oem_2901
/dev/ttydiag1             0660   system     oem_2901
/dev/ttydiag2             0660   system     oem_2901
/dev/ttydiag3             0660   system     oem_2901

/dev/genlock              0666   system     system
/dev/wlan                 0660   wifi       wifi
/dev/kgsl                 0666   system     system
/dev/kgsl-3d0             0666   system     system
/dev/kgsl-2d0             0666   root       root
/dev/kgsl-2d1             0666   root       root
/dev/ion                  0664   system     system
/dev/rtc0                 0660   system     system
/dev/smd0                 0660   system     system
/dev/smd4                 0660   system     system
/dev/smd_cxm_qmi          0640   radio      radio
/dev/smd5                 0660   system     system
/dev/smd6                 0660   system     system
/dev/smd7                 0660   bluetooth  bluetooth
/dev/ccid_bridge          0660   system     system
/dev/ipa                  0660   radio      radio
/dev/wwan_ioctl           0660   radio      radio
/dev/ipaNatTable          0660   radio      radio
/dev/rmnet_ctrl           0660   usb        usb
/dev/dpl_ctrl             0660   usb        usb
/dev/ipa_odl_ctl          0660   radio      radio
/dev/ipa_adpl             0660   system     oem_2905
/dev/synx_device          0660   root       camera
/dev/hab                  0666   system     system

#permissions for CSVT
/dev/smd11                0660   radio      radio

#permsissions for BT/FM
/dev/smd2                 0660   bluetooth  bluetooth
/dev/smd3                 0660   bluetooth  bluetooth
/dev/btpower              0660   bluetooth  system

#permissions for pta
/dev/pta                  0660   system     system

/dev/radio0               0640   system     system
/dev/rfcomm0              0660   bluetooth  bluetooth
/dev/ttyUSB0              0660   bluetooth  bluetooth
/dev/smdcntl0             0640   radio      radio
/dev/smdcntl1             0640   radio      radio
/dev/smdcntl2             0640   radio      radio
/dev/smdcntl3             0640   radio      radio
/dev/smdcntl4             0640   radio      radio
/dev/smdcntl5             0640   radio      radio
/dev/smdcntl6             0640   radio      radio
/dev/smdcntl7             0640   radio      radio
/dev/smdcntl8             0640   radio      radio
/dev/smdcnt_rev0          0640   radio      radio
/dev/smdcnt_rev1          0640   radio      radio
/dev/smdcnt_rev2          0640   radio      radio
/dev/smdcnt_rev3          0640   radio      radio
/dev/smdcnt_rev4          0640   radio      radio
/dev/smdcnt_rev5          0640   radio      radio
/dev/smdcnt_rev6          0640   radio      radio
/dev/smdcnt_rev7          0640   radio      radio
/dev/smdcnt_rev8          0640   radio      radio
/dev/smuxctl32            0640   radio      radio
/dev/sdioctl0             0640   radio      radio
/dev/sdioctl1             0640   radio      radio
/dev/sdioctl2             0640   radio      radio
/dev/sdioctl3             0640   radio      radio
/dev/sdioctl4             0640   radio      radio
/dev/sdioctl5             0640   radio      radio
/dev/sdioctl6             0640   radio      radio
/dev/sdioctl7             0640   radio      radio
/dev/sdioctl8             0640   radio      radio
/dev/rmnet_mux_ctrl       0640   radio      radio
/dev/hsicctl0             0640   radio      radio
/dev/hsicctl1             0640   radio      radio
/dev/hsicctl2             0640   radio      radio
/dev/hsicctl3             0640   radio      radio
/dev/hsicctl4             0640   radio      radio
/dev/hsicctl5             0640   radio      radio
/dev/hsicctl6             0640   radio      radio
/dev/hsicctl7             0640   radio      radio
/dev/hsicctl8             0640   radio      radio
/dev/hsicctl9             0640   radio      radio
/dev/hsicctl10            0640   radio      radio
/dev/hsicctl11            0640   radio      radio
/dev/hsicctl12            0640   radio      radio
/dev/hsicctl13            0640   radio      radio
/dev/hsicctl14            0640   radio      radio
/dev/hsicctl15            0640   radio      radio
/dev/hsicctl16            0640   radio      radio
/dev/mhi_*_pipe_14        0640   radio      radio
/dev/mhi_*_pipe_16        0640   radio      radio
/dev/mhi_*_pipe_32        0640   radio      radio
/dev/at_usb0              0640   radio      radio
/dev/at_mdm0              0640   radio      radio
/dev/video*               0660   system     camera
/dev/cvp*                 0660   system     camera
/dev/media*               0660   system     camera
/dev/v4l-subdev*          0660   system     camera
/dev/cci_intf             0660   system     camera
/dev/qseecom              0660   system     drmrpc
/dev/qce                  0660   system     drmrpc
/dev/smcinvoke            0660   system     drmrpc
/dev/qsee_ipc_irq_spss    0660   system     drmrpc
/dev/seemplog             0660   system     system
/dev/pft                  0660   system     drmrpc
/dev/spcom                0660   system     system
/dev/spss_utils           0660   system     system
/dev/sp_kernel            0660   system     system
/dev/sp_nvm               0660   system     system
/dev/sp_ssr               0660   system     system
/dev/sp_keymaster         0660   system     system
/dev/sec_nvm_*            0660   system     system
/dev/cryptoapp            0660   system     system
/dev/spdaemon_ssr         0660   system     system
/dev/iuicc                0660   system     system
/dev/iuicc0               0660   system     system
/dev/iuicc1               0660   system     system
/dev/gemini0              0660   system     camera
/dev/jpeg0                0660   system     camera
/dev/jpeg1                0660   system     camera
/dev/jpeg2                0660   system     camera
/dev/jpeg3                0660   system     camera
/dev/adsprpc-smd          0664   system     system
/dev/adsprpc-smd-secure   0644   system     system
/dev/system_health_monitor 0644  radio      system
/dev/mdss_rotator         0664   system     system

#QDSS
/dev/byte-cntr            0660   system    oem_2902
/dev/mhi_qdss             0660   system    oem_2902
/sys/class/qdss_bridge/mhi_qdss  mode      0660     system   oem_2902

#qg
/dev/qg                   0660  system     system
/dev/qg_battery           0660  system     system

#qvr
/dev/qvr_external_sensor_ioctl      0660  system  system
/sys/kernel/qvr_external_sensor/fd  0660  system  system

# wlan
/dev/wcnss_wlan           0660   system     system
/dev/wcnss_ctrl           0660   system     system
/sys/devices/soc/a000000.qcom,wcnss-wlan/net/wlan0/queues/rx-* rps_cpus           0660   system     system
/sys/devices/soc/a000000.qcom,wcnss-wlan/net/p2p0/queues/rx-* rps_cpus            0660   system     system
/dev/spidev0.0            0660   system     audio
/dev/msm_camera/*         0660   system     camera
/dev/gemini/              0660   system     camera
/dev/mercury0             0660   system     camera
/dev/msm_vidc_reg         0660   system     audio
/dev/msm_vidc_dec         0660   system     audio
/dev/msm_vidc_dec_sec     0660   system     audio
/dev/msm_vidc_enc         0660   system     audio
/dev/msm_rotator          0660   system     system
/dev/hw_random            0600   root       root
/dev/sdsprpc-smd          0660   system     system

#permissions for audio
/dev/wcd_dsp0_control     0660   system     audio
/dev/wcd-dsp-glink        0660   system     audio
/dev/audio_slimslave      0660   system     audio
/dev/msm_qcelp            0660   system     audio
/dev/msm_evrc             0660   system     audio
/dev/msm_wma              0660   system     audio
/dev/msm_wmapro           0660   system     audio
/dev/msm_alac             0660   system     audio
/dev/msm_ape              0660   system     audio
/dev/msm_amrnb            0660   system     audio
/dev/msm_amrwb            0660   system     audio
/dev/msm_amrwbplus        0660   system     audio
/dev/msm_aac              0660   system     audio
/dev/msm_multi_aac        0660   system     audio
/dev/msm_aac_in           0660   system     audio
/dev/msm_qcelp_in         0660   system     audio
/dev/msm_evrc_in          0660   system     audio
/dev/msm_amrnb_in         0660   system     audio
/dev/msm_amrwb_in         0660   system     audio
/dev/msm_a2dp_in          0660   system     audio
/dev/msm_ac3              0660   system     audio
/dev/msm_audio_cal        0660   system     audio
/dev/msm_hweffects        0660   system     audio
/dev/msm_cad              0660   system     audio
/dev/msm_fm               0660   system     audio
/dev/msm_mvs              0660   system     audio
/dev/msm_pcm_lp_dec       0660   system     audio
/dev/msm_preproc_ctl      0660   system     audio
/dev/msm_rtac             0660   system     audio
/dev/msm_voicememo        0660   system     audio
/dev/ttyHSL1              0660   system     system
/dev/ttyHS1               0660   system     system
/dev/mdm                  0660   system     radio
/sys/devices/virtual/smdpkt/smdcntl*       open_timeout   0664 radio radio
/dev/sdio_tty_ciq_00      0660   system     system
/dev/tty_sdio_00          0660   system     system
/dev/ttyGS0               0660   system     system
/dev/i2c-5                0660   media       media
/dev/avtimer              0660   system     audio
/dev/spidev2.0            0660   system     audio

# DVB devices
/dev/dvb/adapter0/demux*  0440   media       media
/dev/dvb/adapter0/dvr*    0660   media       media
/dev/dvb/adapter0/video*  0660   media       media

# Broadcast devices
/dev/tsc_mux0             0660   media       media
/dev/tsc_ci0              0660   media       media

# sensors
/dev/sensors              0660   system     system
/sys/devices/i2c-12/12-*  pollrate_ms 0664 system system
/sys/devices/f9925000.i2c/i2c-0/0-*                 enable         0660    input    system
/sys/devices/f9925000.i2c/i2c-0/0-*                 poll_delay     0660    input    system
/sys/devices/soc.0/78b6000.i2c/i2c-0/0-*            enable         0660    input    system
/sys/devices/soc.0/78b6000.i2c/i2c-0/0-*            poll_delay     0660    input    system
/sys/devices/soc.0/78b6000.i2c/i2c-0/0-*            enable_wakeup  0660    input    system
/sys/devices/soc.0/78b6000.i2c/i2c-0/0-*            max_latency    0660    input    system
/sys/devices/soc.0/78b6000.i2c/i2c-0/0-*            flush          0660    input    system
/sys/devices/soc.0/78b6000.i2c/i2c-0/0-*            calibrate      0660    input    system
/sys/devices/soc.0/78b5000.i2c/i2c-1/1-*            enable         0660    input    system
/sys/devices/soc.0/78b5000.i2c/i2c-1/1-*            poll_delay     0660    input    system
/sys/devices/soc.0/78b5000.i2c/i2c-1/1-*            enable_wakeup  0660    input    system
/sys/devices/soc.0/78b5000.i2c/i2c-1/1-*            max_latency    0660    input    system
/sys/devices/soc.0/78b5000.i2c/i2c-1/1-*            flush          0660    input    system
/sys/devices/soc.0/78b5000.i2c/i2c-1/1-*            calibrate      0660    input    system
/sys/devices/virtual/optical_sensors/proximity      ps_adc         0660    input    system
/sys/devices/virtual/optical_sensors/proximity      ps_poll_delay  0660    input    system
/sys/devices/virtual/optical_sensors/lightsensor    ls_auto        0660    input    system
/sys/devices/virtual/optical_sensors/lightsensor    ls_poll_delay  0660    input    system
/sys/devices/virtual/input/input*                   poll           0660    root     input
/sys/devices/virtual/input/input*                   pollrate_ms    0660    root     input
/sys/devices/virtual/input/input*                   enable         0660    root     input
/sys/devices/virtual/input/input*                   enable_wakeup  0660    root     input
/sys/devices/virtual/input/input*                   flush          0660    root     input
/sys/devices/virtual/input/input*                   max_latency    0660    root     input
/sys/devices/virtual/input/input*                   poll_delay     0660    root     input
/sys/devices/soc/78b7000.i2c/i2c-3/3-0020/input/input*    secure_touch         0440   system  drmrpc
/sys/devices/soc/78b7000.i2c/i2c-3/3-0020/input/input*    secure_touch_enable  0660   system  drmrpc
/sys/devices/soc/78b7000.i2c/i2c-3/3-0038/input/input*    secure_touch         0440   system  drmrpc
/sys/devices/soc/78b7000.i2c/i2c-3/3-0038/input/input*    secure_touch_enable  0660   system  drmrpc
/sys/devices/soc/78b7000.i2c/i2c-3/3-004b/input/input*    secure_touch         0440   system  drmrpc
/sys/devices/soc/78b7000.i2c/i2c-3/3-004b/input/input*    secure_touch_enable  0660   system  drmrpc
/sys/devices/soc/c179000.i2c/i2c-5/5-0020/input/input*    secure_touch         0440   system  drmrpc
/sys/devices/soc/c179000.i2c/i2c-5/5-0020/input/input*    secure_touch_enable  0660   system  drmrpc
/sys/devices/platform/soc/a98000.i2c/i2c-2/2-0020/input/input*  secure_touch          0440 system drmrpc
/sys/devices/platform/soc/a98000.i2c/i2c-2/2-0020/input/input*  secure_touch_enable   0660 system drmrpc
/sys/devices/platform/soc/a84000.i2c/i2c-2/2-0020/input/input*  secure_touch          0440 system drmrpc
/sys/devices/platform/soc/a84000.i2c/i2c-2/2-0020/input/input*  secure_touch_enable   0660 system drmrpc

# GNSS Device premissions
/dev/gnss_sirf             0660   gps     gps

# laser sensor access
/sys/devices/virtual/input/input*                   enable_ps_sensor 0660  system   input
/sys/devices/virtual/input/input*                   set_delay_ms     0660  system   input
/sys/devices/virtual/input/input*                   do_flush         0660  system   input
/dev/laser                0660   system     camera

# vm_bms
/dev/vm_bms               0660   system     system
/dev/battery_data         0660   system     system

# wlan
/dev/wcnss_wlan           0660   system     system
/dev/wcnss_ctrl           0660   system     system
/sys/devices/soc/600000.qcom,pcie/pci0000:00/0000:00:00.0/0000:01:00.0/net/wlan0/queues/rx-* rps_cpus 0660 system system
/sys/devices/soc/600000.qcom,pcie/pci0000:00/0000:00:00.0/0000:01:00.0/net/p2p0/queues/rx-* rps_cpus 0660 system system

# wigig
/sys/bus/pci/drivers/wil6210* 0000:01:00.0/wil6210/fst_link_loss 0660 wifi wifi
/sys/bus/pci/drivers/wil6210* 0000:01:00.0/wil6210/thermal_throttling 0660 system system
/sys/bus/pci/drivers/wil6210* 0000:01:00.0/wil6210/snr_thresh 0660 wifi wifi
/sys/bus/pci/drivers/wil6210* 0000:01:00.0/net/wigig0/queues/rx-0/rps_cpus 0660 system system
/sys/bus/pci/drivers/wil6210* 0000:01:00.0/net/wigig0/gro_flush_timeout 0660 system system
/sys/devices/virtual/net/bond0 queues/rx-0/rps_cpus 0660 system system

#nfc permissions
/dev/nfc-nci              0660    nfc         nfc
/dev/nq-nci               0660    nfc         nfc
/dev/assd                 0660    nfc         nfc

# UIO devices
/dev/uio0                 0660   system     system
/dev/uio1                 0660   system     system
/dev/uio2                 0660   system     system

# SSR devices
/dev/subsys_*         0640   system     system

# Ultrasound device
/dev/usf1                 0660   system     system

# Ramdump devices
/dev/ramdump*             0640   system     system

# Fingerprint device
/dev/qbt*                 0660   system     system
/sys/class/fts/touch_aoi aoi_set 0660 root system
/sys/class/fts/touch_aoi power_set 0660 root system

#ImproveTouch device
/dev/hbtp_input           0660   system     system
/dev/hbtp_vm              0660   system     system

# Add device block for FRP
/dev/block/platform/soc/7824900.sdhci/by-name/config    0600   system     system
/dev/block/platform/soc/7464900.sdhci/by-name/frp       0600   system     system
/dev/block/platform/soc/624000.ufshc/by-name/frp        0600   system     system
/dev/block/platform/soc/1da4000.ufshc/by-name/frp       0600   system     system
/dev/block/platform/soc/c0c4000.sdhci/by-name/frp       0600   system     system
/dev/block/platform/soc/1d84000.ufshc/by-name/frp       0600   system     system
/dev/block/platform/soc/7c4000.sdhci/by-name/frp        0600   system     system
/dev/block/platform/soc/4744000.sdhci/by-name/frp       0600   system     system
/dev/block/platform/soc/4804000.ufshc/by-name/frp       0600   system     system

# This is temporary while using SD card for initial bring-up
/dev/block/platform/soc/8804000.sdhci/by-name/frp       0600   system     system

# Add device block for MISC
/dev/block/platform/soc/1d84000.ufshc/by-name/misc       0660   root     system

# Kmsg device
/dev/kmsg                                               0620   root       system

# LED class devices
/sys/class/leds/red      delay_on     0640    system    system
/sys/class/leds/red      delay_off    0640    system    system
/sys/class/leds/red      breath       0640    system    system
/sys/class/leds/green    delay_on     0640    system    system
/sys/class/leds/green    delay_off    0640    system    system
/sys/class/leds/green    breath       0640    system    system
/sys/class/leds/blue     delay_on     0640    system    system
/sys/class/leds/blue     delay_off    0640    system    system
/sys/class/leds/blue     breath       0640    system    system

# NPU device
/dev/msm_npu             0644   system     system

# USB role switch
/sys/class/dual_role_usb/*	data_role	0660	system	system
/sys/class/dual_role_usb/*	power_role	0660	system	system
/sys/class/dual_role_usb/*	mode		0660	system	system

#Memory Offline
/sys/devices/system/memory/memory* state    0660 system system

/sys/devices/virtual/hdcp/msm_hdcp  min_level_change 0664    system  graphics

# sys-fs display
/sys/class/graphics/fb*     hpd                      0664    system  graphics
/sys/class/graphics/fb*     res_info                 0664    system  graphics
/sys/class/graphics/fb*     vendor_name              0664    system  graphics
/sys/class/graphics/fb*     product_description      0664    system  graphics
/sys/class/graphics/fb*     video_mode               0664    system  graphics
/sys/class/graphics/fb*     format_3d                0664    system  graphics
/sys/class/graphics/fb*     s3d_mode                 0664    system  graphics
/sys/class/graphics/fb*     dynamic_fps              0664    system  graphics
/sys/class/graphics/fb*     msm_fb_dfps_mode         0664    system  graphics
/sys/class/graphics/fb*     hdr_stream               0664    system  graphics
/sys/class/graphics/fb*     cec/enable               0664    system  graphics
/sys/class/graphics/fb*     cec/logical_addr         0664    system  graphics
/sys/class/graphics/fb*     cec/rd_msg               0664    system  graphics
/sys/class/graphics/fb*     pa                       0664    system  graphics
/sys/class/graphics/fb*     cec/wr_msg               0600    system  graphics
/sys/class/graphics/fb*     hdcp/tp                  0664    system  graphics
/sys/class/graphics/fb*     hdcp2p2/min_level_change 0660    system  graphics
/sys/class/graphics/fb*     hdmi_audio_cb            0600    audioserver audio

/sys/class/graphics/fb*     lineptr_value            0664    system  graphics
/sys/class/graphics/fb*     msm_fb_persist_mode      0664    system  graphics

/sys/class/graphics/fb0     idle_time                0664    system  graphics
/sys/class/graphics/fb0     dynamic_fps              0664    system  graphics
/sys/class/graphics/fb0     dyn_pu                   0664    system  graphics
/sys/class/graphics/fb0     modes                    0664    system  graphics
/sys/class/graphics/fb0     mode                     0664    system  graphics
/sys/class/graphics/fb0     msm_cmd_autorefresh_en   0664    system  graphics

# I2C
/dev/i2c-*                0660   system     system

# Egistec fingerprint
/dev/esfp0            0660   system     system

# Goodix FPS
/dev/goodix_fp      0664    system  system

# Change permission for FPC fingerprint
/sys/class/fingerprint/fpc1020 nav        0440     system    system
/sys/class/fingerprint/fpc1020 irq        0440     system    system
/sys/class/fingerprint/fpc1020 irq_cnt    0440     system    system
/sys/class/fingerprint/fpc1020 dev_enable 0220     system    system
/sys/class/fingerprint/fpc1020 vendor     0444     system    system

# Motorola: Add for QVR(qvrservice) to access the glass usb device
/dev/bus/usb/001/*     0660    system     system
/dev/bus/usb/002/*     0660    system     system

# Motorola: Add for HIDRAW to access the glass usb device
/dev/hidraw*             0660    uhid       uhid

# NFC ST Driver permissions
/dev/st21nfc              0660   nfc        nfc
