Re: [PATCH] iio: imu: inv_mpu6050: add debugfs register r/w interface

From: Andy Shevchenko
Date: Thu Mar 19 2020 - 06:24:15 EST


On Thu, Mar 19, 2020 at 8:10 AM Rohit Sarkar <rohitsarkar5398@xxxxxxxxx> wrote:
>
> The iio debugfs interface provides direct access to read and write device
> registers if debugfs is enabled.

But regmap API provides at least reading facility. Isn't it enough?

...

> static const struct iio_info mpu_info = {
> .read_raw = &inv_mpu6050_read_raw,
> .write_raw = &inv_mpu6050_write_raw,
> .write_raw_get_fmt = &inv_write_raw_get_fmt,
> .attrs = &inv_attribute_group,
> .validate_trigger = inv_mpu6050_validate_trigger,

> + .debugfs_reg_access = &inv_mpu6050_reg_access

Leaving comma is helpful for future development.

> };


--
With Best Regards,
Andy Shevchenko