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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

iio debugfs register interface is quite handy because we can read a single register and write a value.

regmap debugfs is only a dump of all registers, as far as I know (may have missed something).

Thanks.
JB

From: Andy Shevchenko <andy.shevchenko@xxxxxxxxx>

Sent: Thursday, March 19, 2020 11:24

To: Rohit Sarkar <rohitsarkar5398@xxxxxxxxx>

Cc: linux-iio <linux-iio@xxxxxxxxxxxxxxx>; Linux Kernel Mailing List <linux-kernel@xxxxxxxxxxxxxxx>; Jonathan Cameron <jic23@xxxxxxxxxx>; Hartmut Knaack <knaack.h@xxxxxx>; Lars-Peter Clausen <lars@xxxxxxxxxx>; Peter Meerwald-Stadler <pmeerw@xxxxxxxxxx>;
 Jean-Baptiste Maneyrol <JManeyrol@xxxxxxxxxxxxxx>; Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>; Linus Walleij <linus.walleij@xxxxxxxxxx>

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

 


 CAUTION: This email originated from outside of the organization. Please make sure the sender is who they say they are and do not click links or open attachments unless you recognize the sender and know the content is safe.



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





[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux