From 2d7dbdcbe0b595fccc3c6d09e92db4e8010d2ad0 Mon Sep 17 00:00:00 2001 From: abhijit Date: Wed, 9 Aug 2017 11:02:41 +0530 Subject: platform: tegra: safety: Add multiple ivc channel support Current safety ivc driver has support for single ivc channel which is used by command/response safety module. This patch extends the driver functionality to support multiple ivc channels, each exposed as char device to userspace safety module. HeartBeat safety module will use one of the ivc channel to communicate with layer 2 (SCE) via this driver. Bug 200267609 Change-Id: Ic9f83db90e2c6a4c9bf8d96d49753087817b7ad2 Reviewed-on: http://git-master/r/1310979 Signed-off-by: Abhijit Reviewed-on: https://git-master.nvidia.com/r/1535492 Reviewed-by: svccoveritychecker GVS: Gerrit_Virtual_Submit Reviewed-by: Sumeet Gupta --- include/linux/tegra-safety-ivc.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/linux/tegra-safety-ivc.h b/include/linux/tegra-safety-ivc.h index 0549e8101..e508168e2 100644 --- a/include/linux/tegra-safety-ivc.h +++ b/include/linux/tegra-safety-ivc.h @@ -23,6 +23,8 @@ enum { SAFETY_CONF_IVC_READY = 1, }; +#define MAX_SAFETY_CHANNELS 5 + struct safety_ast_region { u8 ast_id; u32 slave_base; @@ -42,7 +44,7 @@ struct tegra_safety_ivc { atomic_t response; atomic_t emptied; } cmd; - struct tegra_safety_ivc_chan *ivc_chan; + struct tegra_safety_ivc_chan *ivc_chan[MAX_SAFETY_CHANNELS]; }; struct tegra_safety_ivc_chan { @@ -51,8 +53,8 @@ struct tegra_safety_ivc_chan { struct tegra_safety_ivc *safety_ivc; }; -int tegra_safety_dev_init(struct device *dev); -void tegra_safety_dev_exit(struct device *dev); +int tegra_safety_dev_init(struct device *dev, int index); +void tegra_safety_dev_exit(struct device *dev, int index); void tegra_safety_dev_notify(void); #endif -- cgit v1.2.2