hook-functions: dep_add_modules: Properly include panel drivers

With MODULES=dep, we try to walk the /sys/devices/platform/edp-panel
device to include panel drivers because they are needed get a display
output on some devices. This is a bit wrong, because the "edp-panel"
here is the name of a device-tree node that is not necessarily a panel.

Instead, walk the devices bound under the panel drivers for modules to
add to initramfs. Check not only for panel-edp, but panel-simple and
those available over dp-aux bus as well.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
This commit is contained in:
Alper Nebi Yasak 2023-11-13 14:01:19 +03:00
parent cf964bfb43
commit 1eb6511c71

View File

@ -583,9 +583,13 @@ dep_add_modules()
modules="$modules sunvnet sunvdc"
fi
if [ -e /sys/devices/platform/edp-panel ]; then
sys_walk_mod_add /sys/devices/platform/edp-panel
fi
for device in /sys/bus/platform/drivers/panel-edp/* \
/sys/bus/platform/drivers/panel-simple/* \
/sys/bus/dp-aux/drivers/panel-simple-dp-aux/*; do
if [ -d "$device" ] && [ "$(basename "$device")" != "module" ]; then
sys_walk_mod_add "$device"
fi
done
# shellcheck disable=SC2086
manual_add_modules $modules