diff options
author | Xabier Marquiegui <reibax@gmail.com> | 2023-10-12 01:39:57 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-10-15 22:07:52 +0300 |
commit | 403376ddb4221be9db5326ae334773807df71ffe (patch) | |
tree | 027d7c1055733aecd925d4941b8a7d90296e57f6 /drivers/ptp/ptp_private.h | |
parent | c5a445b1e9347b14752b01f1a304bd7a2f260acc (diff) | |
download | linux-403376ddb4221be9db5326ae334773807df71ffe.tar.xz |
ptp: add debugfs interface to see applied channel masks
Use debugfs to be able to view channel mask applied to every timestamp
event queue.
Every time the device is opened, a new entry is created in
`$DEBUGFS_MOUNTPOINT/ptpN/$INSTANCE_ADDRESS/mask`.
The mask value can be viewed grouped in 32bit decimal values using cat,
or converted to hexadecimal with the included `ptpchmaskfmt.sh` script.
32 bit values are listed from least significant to most significant.
Signed-off-by: Xabier Marquiegui <reibax@gmail.com>
Suggested-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/ptp/ptp_private.h')
-rw-r--r-- | drivers/ptp/ptp_private.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/ptp/ptp_private.h b/drivers/ptp/ptp_private.h index ad4ce1b25c86..52f87e394aa6 100644 --- a/drivers/ptp/ptp_private.h +++ b/drivers/ptp/ptp_private.h @@ -17,6 +17,7 @@ #include <linux/time.h> #include <linux/list.h> #include <linux/bitmap.h> +#include <linux/debugfs.h> #define PTP_MAX_TIMESTAMPS 128 #define PTP_BUF_TIMESTAMPS 30 @@ -30,6 +31,8 @@ struct timestamp_event_queue { spinlock_t lock; struct list_head qlist; unsigned long *mask; + struct dentry *debugfs_instance; + struct debugfs_u32_array dfs_bitmap; }; struct ptp_clock { @@ -57,6 +60,7 @@ struct ptp_clock { struct mutex n_vclocks_mux; /* protect concurrent n_vclocks access */ bool is_virtual_clock; bool has_cycles; + struct dentry *debugfs_root; }; #define info_to_vclock(d) container_of((d), struct ptp_vclock, info) |