media: i2c: max9286: Introduce a debugfs layer

The MAX9286 provides several read-only status registers for observing
the system state of the device.

Provide error statistics and link status through debugfs files.
These files will be free-form and should not be considered as part
of any userspace API

Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>

---

Please consider this a starting point for adding useful debug. I don't
necessarily expect this code to make it to the final driver, but it
could be very useful to process and expose this information internally
in the driver.

Alternatively - we could move this all to max9286_debugfs.c or such.

Watch out for a lot of the error counters which reset to 0 when read.
We should handle those by adding the value to a local store on every
read.

v2:
 - Cleanup debugfs in error path of probe()
1 file changed