#!/bin/bash

install() {
	inst_dir "/lib/firmware"
	inst_dir "/lib/firmware/updates"
	for f in $(find /lib/firmware/qcom/x1e80100 -type f 2>/dev/null); do
		inst "${f}"
	done
	for f in $(find /lib/firmware/updates/qcom/x1e80100 -type f 2>/dev/null); do
		inst "${f}"
	done
	for f in $(find /lib/firmware/qcom/x1p42100 -type f 2>/dev/null); do
		inst "${f}"
	done
	for f in $(find /lib/firmware/updates/qcom/x1p42100 -type f 2>/dev/null); do
		inst "${f}"
	done
}

# called by dracut
installkernel() {
	# Sound
	hostonly='' instmods \
	    snd-soc-lpass-va-macro \
	    snd-soc-lpass-rx-macro \
	    snd-soc-lpass-tx-macro \
	    snd-soc-lpass-wsa-macro \
	    soundwire-qcom \
	    snd_soc_wcd938x \
	    snd_soc_wcd938x_sdw \
	    snd-soc-wsa884

	# Display
	hostonly='' instmods \
	    drm_exec \
	    msm \
	    ps883x \
	    qrtr \
	    tcsrcc_x1e80100 \
	    gpucc_x1e80100 \
	    display_connector \
	    simple_bridge \
	    pwm_bl
}
