#include <linux/device.h>
#include <linux/debugfs.h>
#include <linux/fsl/ptp_qoriq.h>
static int ptp_qoriq_fiper1_lpbk_get(void *data, u64 *val)
struct ptp_qoriq *ptp_qoriq = data;
struct ptp_qoriq_registers *regs = &ptp_qoriq->regs;
ctrl = ptp_qoriq->read(®s->ctrl_regs->tmr_ctrl);
*val = ctrl & PP1L ? 1 : 0;
static int ptp_qoriq_fiper1_lpbk_set(void *data, u64 val)
struct ptp_qoriq *ptp_qoriq = data;
struct ptp_qoriq_registers *regs = &ptp_qoriq->regs;
ctrl = ptp_qoriq->read(®s->ctrl_regs->tmr_ctrl);
ptp_qoriq->write(®s->ctrl_regs->tmr_ctrl, ctrl);
DEFINE_DEBUGFS_ATTRIBUTE(ptp_qoriq_fiper1_fops, ptp_qoriq_fiper1_lpbk_get,
ptp_qoriq_fiper1_lpbk_set, "%llu\n");
static int ptp_qoriq_fiper2_lpbk_get(void *data, u64 *val)
struct ptp_qoriq *ptp_qoriq = data;
struct ptp_qoriq_registers *regs = &ptp_qoriq->regs;
ctrl = ptp_qoriq->read(®s->ctrl_regs->tmr_ctrl);
*val = ctrl & PP2L ? 1 : 0;
static int ptp_qoriq_fiper2_lpbk_set(void *data, u64 val)
struct ptp_qoriq *ptp_qoriq = data;
struct ptp_qoriq_registers *regs = &ptp_qoriq->regs;
ctrl = ptp_qoriq->read(®s->ctrl_regs->tmr_ctrl);
ptp_qoriq->write(®s->ctrl_regs->tmr_ctrl, ctrl);