[lkml]   [2018]   [Oct]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 2/2] hwmon: (ina3221) Add operating mode support
Hi Nicolin,

On Thu, Oct 11, 2018 at 12:36:59PM -0700, Nicolin Chen wrote:
> On Thu, Oct 11, 2018 at 12:31:52PM -0700, Guenter Roeck wrote:
> > > One more question here, and this might sound a bit abuse of using
> > > the existing hwmon ABI: would it sound plausible to you that the
> > > driver powers down the chip when all three channels get disabled
> > > via in[123]_enable nodes? :)
> > >
> >
> > I would not call that an abuse, no.
> you mean that you aren't in favor of powering down the chip
> after all channels get disabled?
No, I was trying to say that I would be ok with powering down the chip.

> I was thinking about having pm_runtime_get_sync()/put() for channel
> enabling/disabling routine of in[123]_enable.

Not sure if that would work. It might end up waking the chip when a
sysfs attribute is accessed. It might be worth a try, though.

It might also be possible to utilize userspace runtime attributes,
like setting runtime_enabled and setting the idle time before the sensor
shuts down. It would probably be necessary to implement not only
activating the sensor, though - we would also need to to ensure that
the first reading after activation waits until the first read is


 \ /
  Last update: 2018-10-11 21:51    [W:0.073 / U:0.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site