mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
51 lines
1.2 KiB
C
51 lines
1.2 KiB
C
![]() |
/* SPDX-License-Identifier: GPL-2.0+ */
|
||
|
/* TI K3 AM65 CPTS driver interface
|
||
|
*
|
||
|
* Copyright (C) 2020 Texas Instruments Incorporated - http://www.ti.com
|
||
|
*/
|
||
|
|
||
|
#ifndef K3_CPTS_H_
|
||
|
#define K3_CPTS_H_
|
||
|
|
||
|
#include <linux/device.h>
|
||
|
#include <linux/of.h>
|
||
|
|
||
|
struct am65_cpts;
|
||
|
|
||
|
#if IS_ENABLED(CONFIG_TI_K3_AM65_CPTS)
|
||
|
struct am65_cpts *am65_cpts_create(struct device *dev, void __iomem *regs,
|
||
|
struct device_node *node);
|
||
|
int am65_cpts_phc_index(struct am65_cpts *cpts);
|
||
|
void am65_cpts_tx_timestamp(struct am65_cpts *cpts, struct sk_buff *skb);
|
||
|
void am65_cpts_prep_tx_timestamp(struct am65_cpts *cpts, struct sk_buff *skb);
|
||
|
void am65_cpts_rx_enable(struct am65_cpts *cpts, bool en);
|
||
|
#else
|
||
|
static inline struct am65_cpts *am65_cpts_create(struct device *dev,
|
||
|
void __iomem *regs,
|
||
|
struct device_node *node)
|
||
|
{
|
||
|
return ERR_PTR(-EOPNOTSUPP);
|
||
|
}
|
||
|
|
||
|
static inline int am65_cpts_phc_index(struct am65_cpts *cpts)
|
||
|
{
|
||
|
return -1;
|
||
|
}
|
||
|
|
||
|
static inline void am65_cpts_tx_timestamp(struct am65_cpts *cpts,
|
||
|
struct sk_buff *skb)
|
||
|
{
|
||
|
}
|
||
|
|
||
|
static inline void am65_cpts_prep_tx_timestamp(struct am65_cpts *cpts,
|
||
|
struct sk_buff *skb)
|
||
|
{
|
||
|
}
|
||
|
|
||
|
static inline void am65_cpts_rx_enable(struct am65_cpts *cpts, bool en)
|
||
|
{
|
||
|
}
|
||
|
#endif
|
||
|
|
||
|
#endif /* K3_CPTS_H_ */
|