hw/core/clock: Add the clock_new helper function
commit5ebc664800b66f886f58cd4d5bcc7785644c9980
authorLuc Michel <luc@lmichel.fr>
Mon, 12 Oct 2020 09:57:47 +0000 (12 11:57 +0200)
committerPhilippe Mathieu-Daudé <f4bug@amsat.org>
Fri, 16 Oct 2020 16:58:10 +0000 (16 18:58 +0200)
tree08eb87f982aa2176c5d493ac2b32c7143d1ad006
parent01d858629eae532f50f3dac6df9e6ab912626e00
hw/core/clock: Add the clock_new helper function

This function creates a clock and parents it to another object with a
given name. It calls clock_setup_canonical_path before returning the
new clock.

This function is useful to create clocks in devices when one doesn't
want to expose it at the qdev level (as an input or an output).

Suggested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Luc Michel <luc@lmichel.fr>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20201010135759.437903-4-luc@lmichel.fr>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
hw/core/clock.c
include/hw/clock.h