Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f5c48149 authored by Sudeep Dutt's avatar Sudeep Dutt Committed by Greg Kroah-Hartman
Browse files

misc: mic: add support for loading/unloading SCIF driver



modprobe SCIF driver upon start and remove it upon unload

Reviewed-by: default avatarNikhil Rao <nikhil.rao@intel.com>
Reviewed-by: default avatarAshutosh Dixit <ashutosh.dixit@intel.com>
Signed-off-by: default avatarSudeep Dutt <sudeep.dutt@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent dd8d8d44
Loading
Loading
Loading
Loading
+11 −13
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@

exec=/usr/sbin/mpssd
sysfs="/sys/class/mic"
mic_modules="mic_host mic_x100_dma scif"

start()
{
@@ -48,18 +49,15 @@ start()
	fi

	echo -e $"Starting MPSS Stack"
	echo -e $"Loading MIC_X100_DMA & MIC_HOST Modules"
	echo -e $"Loading MIC drivers:" $mic_modules

	for f in "mic_host" "mic_x100_dma"
	do
		modprobe $f
	modprobe -a $mic_modules
	RETVAL=$?
	if [ $RETVAL -ne 0 ]; then
		failure
		echo
		return $RETVAL
	fi
	done

	# Start the daemon
	echo -n $"Starting MPSSD "
@@ -170,8 +168,8 @@ unload()
	stop

	sleep 5
	echo -n $"Removing MIC_HOST & MIC_X100_DMA Modules: "
	modprobe -r mic_host mic_x100_dma
	echo -n $"Removing MIC drivers:" $mic_modules
	modprobe -r $mic_modules
	RETVAL=$?
	[ $RETVAL -ne 0 ] && failure || success
	echo