@echo off

set currentpath=%cd%
cd %~dp0
echo Installing All Intel MRD7 Drivers for P1 hardware

cd..
echo %cd%
cd Installer\PlatformInstaller\Drivers

echo ****************
echo Install IO driver
set foldername=I2C
set infname=iaioi2ce.inf
cd %foldername% 
pnputil -i -a %infname%
cd ..

echo **************
echo Install GPIO driver
set foldername=GPIO
set infname=iaiogpioe.inf
cd %foldername% 
pnputil -i -a %infname%
cd ..

echo **************
echo Install UART driver
set foldername=UART
set infname=iaiouart.inf
cd %foldername% 
pnputil -i -a %infname%
cd ..

echo **************
echo Install GPIO Virtual driver
set foldername=GPIOVirtual
set infname=iaiogpiovirtual.inf
cd %foldername% 
pnputil -i -a %infname%
cd ..


echo **************
echo Install MBI driver
set foldername=MBI
set infname=MBI.inf
cd %foldername% 
pnputil -i -a %infname%
cd ..

echo **************
echo Install PMIC driver
set foldername=PMIC
set infname=pmic.inf
cd %foldername% 
pnputil -i -a %infname%
cd ..

echo **************
echo Install BM driver
set foldername=BM
set infname=IntelBatteryManagement.inf
cd %foldername% 
pnputil -i -a %infname%
cd ..

echo **************
echo Install DPTF driver
set foldername=DPTF
set infname=Dptf.inf
cd %foldername% 
pnputil -i -a %infname%
cd ..

echo **************
echo Install TXEI driver
set foldername=TXEI
set infname=TXEI.inf
cd %foldername% 
pnputil -i -a %infname%
cd ..


echo **************
echo Install Audio driver
set foldername=audio
set infname=isstrtc.inf
cd %foldername% 
pnputil -i -a isstrtc.inf
rem pnputil -i -a rtii2sac.inf
cd ..

echo **************
echo Install Camera driver
set foldername=camera
set infname=camera.inf
cd %foldername% 
pnputil -i -a camera.inf
pnputil -i -a gc2235.inf
pnputil -i -a gc310.inf
cd ..


echo **************
echo Install Sensor driver
set foldername=sensors
set infname=GYRO_SensorDriver.inf
cd %foldername% 

rem pnputil -i -a JSA1212.inf
rem pnputil -i -a SemtechSX9500.inf
pnputil -i -a GYRO_SensorDriver.inf
pnputil -i -a ACC_SensorDriver.inf
pnputil -i -a MAG_SensorDriver.inf
pnputil -i -a HIDFusion.inf

cd ..

echo **************
echo Install graphic driver .... 
echo 
set foldername=Graphics
set infname=igdlh.inf
cd %foldername% 
pnputil -i -a %infname%
cd ..

echo All Intel drivers for MRD7 are installed !

cd %currentpath%