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

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

 



On Fri, Mar 27, 2020 at 10:56:33AM +0000, Jean-Baptiste Maneyrol wrote:
> Hello,
> 
> this is quite useful for me for debugging and testing. So I am in favor.
> 
> Just one comment, I think it is safer here to lock the mutex to ensure this doesn't happen in the middle of an interrupt or anything else.
Sure
> I am waiting for V2.
Will send it asap, was waiting for your ack.
> Thanks for the patch,
> JB
> 
> 
> 
> From: Andy Shevchenko <andy.shevchenko@xxxxxxxxx>
> 
> Sent: Saturday, March 21, 2020 20:53
> 
> To: Jonathan Cameron <jic23@xxxxxxxxxxxxxxxxxxxxx>
> 
> Cc: Jean-Baptiste Maneyrol <JManeyrol@xxxxxxxxxxxxxx>; Rohit Sarkar <rohitsarkar5398@xxxxxxxxx>; linux-iio <linux-iio@xxxxxxxxxxxxxxx>
> 
> 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 Sat, Mar 21, 2020 at 8:31 PM Jonathan Cameron
> 
> <jic23@xxxxxxxxxxxxxxxxxxxxx> wrote:
> 
> > On Thu, 19 Mar 2020 11:08:44 +0000
> 
> > Jean-Baptiste Maneyrol <JManeyrol@xxxxxxxxxxxxxx> wrote:
> 
> 
> 
> > > 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).
> 
> >
> 
> > So this is something Mark has discussed before around regmap
> 
> > and more generally IIRC.  The issue is that a write
> 
> > interface does make it somewhat easy to do really nasty things
> 
> > in some drivers that use regmap (to the extent of setting boards
> 
> > on fire etc).  For IIO we are much safer - the worst you can do
> 
> > is break the IIO driver.
> 
> 
> 
> Sometimes IIO driver provides a sensor data about platform facilities,
> 
> such as temperature of the die / chip or battery voltage threshold.
> 
> 
> 
> > I've never been that fussed myself about the debugfs interfaces
> 
> > as it's easy to hack them in when needed for actual debugging, but
> 
> > have taken the view that if someone has enough of a usecase to
> 
> > want to add them to a particular driver, then it's up to them.
> 
> 
> 
> Good to know your p.o.v.!
> 
> 
> 
> -- 
> 
> 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