#!/bin/sh

# load vendor specific drivers
vendor=$(ipcinfo -v)

log_vendor() {
	logger -s -p daemon.info -t ${vendor} "$1"
}

case "$1" in
	start)
		[ "${vendor}" = "goke" ] || [ "${vendor}" = "hisilicon" ] && status=$(check_mac)
		[ -n "${status}" ] && log_vendor "${status}"
# mux GPIO37 for speaker
		devmem 0x200f0068 32 0x0
		echo -e '\nLoading of kernel modules...'
		load_${vendor} -i
		;;
esac
