1/* SPDX-License-Identifier: GPL-2.0-or-later */
2/*
3 * Mock-up PTP Hardware Clock driver for virtual network devices
4 *
5 * Copyright 2023 NXP
6 */
7
8#ifndef _PTP_MOCK_H_
9#define _PTP_MOCK_H_
10
11struct device;
12struct mock_phc;
13
14#if IS_ENABLED(CONFIG_PTP_1588_CLOCK_MOCK)
15
16struct mock_phc *mock_phc_create(struct device *dev);
17void mock_phc_destroy(struct mock_phc *phc);
18int mock_phc_index(struct mock_phc *phc);
19
20#else
21
22static inline struct mock_phc *mock_phc_create(struct device *dev)
23{
24	return NULL;
25}
26
27static inline void mock_phc_destroy(struct mock_phc *phc)
28{
29}
30
31static inline int mock_phc_index(struct mock_phc *phc)
32{
33	return -1;
34}
35
36#endif
37
38#endif /* _PTP_MOCK_H_ */
39