dpll: fix register pin with unregistered parent pin
authorArkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
Fri, 19 Jan 2024 13:43:04 +0000 (14:43 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 22 Jan 2024 11:01:11 +0000 (11:01 +0000)
commit7dc5b18ff71bd6f948810ab8a08b6a6ff8b315c5
tree02bd3cf3d6df5cd67d03ad0d2c7fff052152e6f1
parentdb2ec3c94667eaeecc6a74d96594fab6baf80fdc
dpll: fix register pin with unregistered parent pin

In case of multiple kernel module instances using the same dpll device:
if only one registers dpll device, then only that one can register
directly connected pins with a dpll device. When unregistered parent is
responsible for determining if the muxed pin can be registered with it
or not, the drivers need to be loaded in serialized order to work
correctly - first the driver instance which registers the direct pins
needs to be loaded, then the other instances could register muxed type
pins.

Allow registration of a pin with a parent even if the parent was not
yet registered, thus allow ability for unserialized driver instance
load order.
Do not WARN_ON notification for unregistered pin, which can be invoked
for described case, instead just return error.

Fixes: 9431063ad323 ("dpll: core: Add DPLL framework base functions")
Fixes: 9d71b54b65b1 ("dpll: netlink: Add DPLL framework base functions")
Reviewed-by: Jan Glaza <jan.glaza@intel.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/dpll/dpll_core.c