Lines Matching refs:clk
308 const struct device *clk; in iface_cb() local
315 clk = net_eth_get_ptp_clock(iface); in iface_cb()
316 if (!clk) { in iface_cb()
415 const struct device *clk; in test_ptp_clock_interfaces() local
419 clk = net_eth_get_ptp_clock(eth_interfaces[idx]); in test_ptp_clock_interfaces()
420 zassert_not_null(clk, "Clock not found for interface %p\n", in test_ptp_clock_interfaces()
424 clk = net_eth_get_ptp_clock(eth_interfaces[idx]); in test_ptp_clock_interfaces()
425 zassert_not_null(clk, "Clock not found for interface %p\n", in test_ptp_clock_interfaces()
428 clk = net_eth_get_ptp_clock(eth_interfaces[non_ptp_interface]); in test_ptp_clock_interfaces()
429 zassert_is_null(clk, "Clock found for interface %p\n", in test_ptp_clock_interfaces()
445 const struct device *clk; in test_ptp_clock_iface() local
448 clk = net_eth_get_ptp_clock(eth_interfaces[idx]); in test_ptp_clock_iface()
450 zassert_not_null(clk, "Clock not found for interface %p\n", in test_ptp_clock_iface()
453 ptp_clock_set(clk, &tm); in test_ptp_clock_iface()
461 ptp_clock_adjust(clk, rnd_value); in test_ptp_clock_iface()
464 ptp_clock_get(clk, &tm); in test_ptp_clock_iface()
489 const struct device *clk, *clk_by_index; in test_ptp_clock_get_by_index() local
494 clk = net_eth_get_ptp_clock(eth_interfaces[idx]); in test_ptp_clock_get_by_index()
495 zassert_not_null(clk, "PTP 0 not found"); in test_ptp_clock_get_by_index()
497 clk0 = clk; in test_ptp_clock_get_by_index()
502 zassert_equal(clk, clk_by_index, "Interface index %d invalid", idx); in test_ptp_clock_get_by_index()
506 clk = net_eth_get_ptp_clock(eth_interfaces[idx]); in test_ptp_clock_get_by_index()
507 zassert_not_null(clk, "PTP 1 not found"); in test_ptp_clock_get_by_index()
509 clk1 = clk; in test_ptp_clock_get_by_index()
514 zassert_equal(clk, clk_by_index, "Interface index %d invalid", idx); in test_ptp_clock_get_by_index()
551 const struct device *clk; in test_ptp_clock_get_kernel() local
556 clk = net_eth_get_ptp_clock(eth_interfaces[0]); in test_ptp_clock_get_kernel()
568 const struct device *clk; in setup() local
570 clk = device_get_binding(PTP_VIRT_CLOCK_NAME); in setup()
571 if (clk != NULL) { in setup()
572 k_object_access_grant(clk, k_current_get()); in setup()