From 59019fd72a46bb4d1fa4e14e15122f56841f2e0d Mon Sep 17 00:00:00 2001
From: Bruce Beare <bruce.j.beare@intel.com>
Date: Thu, 22 Oct 2015 11:51:09 -0700
Subject: [PATCH] Define the i2C device policy

Change-Id: I93d9cfea2f2148bb042d1cb8af3649524ad31034
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
---
 device.te     | 1 +
 file_contexts | 1 +
 2 files changed, 2 insertions(+)

diff --git a/device.te b/device.te
index a120ba324..b1b4582f7 100644
--- a/device.te
+++ b/device.te
@@ -54,6 +54,7 @@ type usbaccessory_device, dev_type, mlstrustedobject;
 type usb_device, dev_type, mlstrustedobject;
 type klog_device, dev_type;
 type properties_device, dev_type;
+type i2c_device, dev_type;
 
 # All devices have a uart for the hci
 # attach service. The uart dev node
diff --git a/file_contexts b/file_contexts
index 6b7f85192..2143a77e7 100644
--- a/file_contexts
+++ b/file_contexts
@@ -70,6 +70,7 @@
 /dev/fuse		u:object_r:fuse_device:s0
 /dev/graphics(/.*)?	u:object_r:graphics_device:s0
 /dev/hw_random		u:object_r:hw_random_device:s0
+/dev/i2c-[0-9]+		u:object_r:i2c_device:s0
 /dev/input(/.*)		u:object_r:input_device:s0
 /dev/iio:device[0-9]+   u:object_r:iio_device:s0
 /dev/ion		u:object_r:ion_device:s0
-- 
GitLab