linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rohit Sarkar <rohitsarkar5398@gmail.com>
To: Jean-Baptiste Maneyrol <JManeyrol@invensense.com>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>,
	Jonathan Cameron <jic23@jic23.retrosnub.co.uk>,
	linux-iio <linux-iio@vger.kernel.org>
Subject: Re: [PATCH] iio: imu: inv_mpu6050: add debugfs register r/w interface
Date: Fri, 27 Mar 2020 18:12:17 +0530	[thread overview]
Message-ID: <5e7df4ad.1c69fb81.25b38.eec8@mx.google.com> (raw)
In-Reply-To: <MN2PR12MB4422EA3CFA8DCFC397502B02C4CC0@MN2PR12MB4422.namprd12.prod.outlook.com>

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@gmail.com>
> 
> Sent: Saturday, March 21, 2020 20:53
> 
> To: Jonathan Cameron <jic23@jic23.retrosnub.co.uk>
> 
> Cc: Jean-Baptiste Maneyrol <JManeyrol@invensense.com>; Rohit Sarkar <rohitsarkar5398@gmail.com>; linux-iio <linux-iio@vger.kernel.org>
> 
> 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@jic23.retrosnub.co.uk> wrote:
> 
> > On Thu, 19 Mar 2020 11:08:44 +0000
> 
> > Jean-Baptiste Maneyrol <JManeyrol@invensense.com> 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
> 

      reply	other threads:[~2020-03-27 12:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-19  6:07 [PATCH] iio: imu: inv_mpu6050: add debugfs register r/w interface Rohit Sarkar
2020-03-19 10:24 ` Andy Shevchenko
2020-03-19 11:08   ` Jean-Baptiste Maneyrol
2020-03-21 18:31     ` Jonathan Cameron
2020-03-21 19:53       ` Andy Shevchenko
2020-03-27 10:56         ` Jean-Baptiste Maneyrol
2020-03-27 12:42           ` Rohit Sarkar [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5e7df4ad.1c69fb81.25b38.eec8@mx.google.com \
    --to=rohitsarkar5398@gmail.com \
    --cc=JManeyrol@invensense.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=jic23@jic23.retrosnub.co.uk \
    --cc=linux-iio@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).