staging: pi433: add debugfs interface
authorPaulo Miguel Almeida <paulo.miguel.almeida.rodenas@gmail.com>
Fri, 4 Feb 2022 08:04:32 +0000 (21:04 +1300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Feb 2022 14:25:34 +0000 (15:25 +0100)
commit4ef027d5a367131c56ffc4949466a892733a7d60
tree45fafdcac8ff3b3f6d8e093d807c412e2d5b0d21
parent04952a99cb6e6a218c40b8b22e4103962a5c4cac
staging: pi433: add debugfs interface

This adds debugfs interface that can be used for debugging possible
hardware/software issues.

It currently exposes the following debugfs entries for each SPI device
probed:

  /sys/kernel/debug/pi433/<DEVICE>/regs
  ...

The 'regs' file contains all rf69 uC registers values that are useful
for troubleshooting misconfigurations between 2 devices. It contains one
register per line so it should be easy to use normal filtering tools to
find the registers of interest if needed.

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Paulo Miguel Almeida <paulo.miguel.almeida.rodenas@gmail.com>
Link: https://lore.kernel.org/r/YfzeEHJcd+qvYGZ8@mail.google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/pi433/pi433_if.c
drivers/staging/pi433/rf69.c
drivers/staging/pi433/rf69.h