Move part of mp_device_setup_link to a new function to allow
setting links between entities with entity and port indices,
and add a function to set entity pad formats.
clang-format always manages to mix spaces into tab-based indentation.
Since we already require an exact tab-width of 8 it makes more sense to
use spaces.