Commit 77bda7f6 authored by Martí Bolívar's avatar Martí Bolívar Committed by Christopher Friedt
Browse files

samples: clock_control_litex: drop DEVICE_GET_BINDING



Use DEVICE_DT_GET.

Signed-off-by: default avatarMartí Bolívar <marti.bolivar@nordicsemi.no>
parent 330aa047
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -56,7 +56,7 @@ The driver is interfaced with the :ref:`Clock Control API <clock_control_api>` f
		.duty = 75,
		.phase = 90
	};
	dev = device_get_binding("clock0");
	dev = DEVICE_DT_GET(MMCM);
	clock_control_subsys_t sub_system = (clock_control_subsys_t*)&setup;
	if ((ret = clock_control_on(dev, sub_system)) != 0) {
		LOG_ERR("Set CLKOUT%d param error!", setup.clkout_nr);
+4 −5
Original line number Diff line number Diff line
@@ -297,14 +297,13 @@ int litex_clk_test(const struct device *dev)

void main(void)
{
	const struct device *dev;
	const struct device *dev = DEVICE_DT_GET(MMCM);

	printf("Clock Control Example! %s\n", CONFIG_ARCH);

	printf("device name: %s\n", MMCM_NAME);
	dev = device_get_binding(MMCM_NAME);
	if (!dev) {
		printf("error: no %s device\n", MMCM_NAME);
	printf("device name: %s\n", dev->name);
	if (!device_is_ready(dev)) {
		printf("error: device %s is not ready\n", dev->name);
		return;
	}