lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190729135113.GA3049@onstation.org>
Date:   Mon, 29 Jul 2019 09:51:13 -0400
From:   Brian Masney <masneyb@...tation.org>
To:     Jonathan Cameron <jonathan.cameron@...wei.com>
Cc:     Chuhong Yuan <hslester96@...il.com>,
        Jonathan Cameron <jic23@...nel.org>, linux-iio@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] iio: tsl2772: Use device-managed API

On Mon, Jul 29, 2019 at 12:08:02PM +0100, Jonathan Cameron wrote:
> On Mon, 29 Jul 2019 04:03:07 -0400
> Brian Masney <masneyb@...tation.org> wrote:
> > There are devm_regulator_*() variants of the regulator API available
> > that you can use. Lots of other APIs in the kernel have devm variants
> > to simply drivers.
> I don't think there are any devm_ versions of regulator disable.
> 
> IIRC the argument made when this last came up was that it was rarely correct
> to be as course grained as a lot of IIO drivers are.   We should probably
> do runtime pm and turn these regulators off a lot more frequently.
> 
> The reality is that it is an optimization that doesn't get done in 
> IIO drivers that often as we mostly just want them to work and many
> usecases aren't actually power constrained,
> 
> So we end up doing a lot of devm_add_action_or_reset to power down the
> regulators.

That makes sense. I have an out-of-tree patch where I started to add
runtime pm support to the tsl2772 driver around the time I was working
on the staging cleanup. I was unsure of how to do this when the user
configures an interrupt threshold via sysfs since we don't want to
completely power off the chip in that case. At the time, I couldn't
find any other examples in IIO that showed how to do that. I should
dust off that patch and send it out as a RFC to get some feedback.

Brian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ