Thread (21 messages) 21 messages, 9 authors, 2017-08-14

Re: [PATCH 000/102] Convert drivers to explicit reset API

From: Thomas Petazzoni <hidden>
Date: 2017-07-19 19:15:15
Also in: alsa-devel, dri-devel, linux-arm-msm, linux-clk, linux-crypto, linux-gpio, linux-i2c, linux-ide, linux-iio, linux-input, linux-mediatek, linux-mips, linux-mmc, linux-pm, linux-pwm, linux-remoteproc, linux-rockchip, linux-serial, linux-spi, linux-tegra, nouveau

Hello,

On Wed, 19 Jul 2017 17:25:04 +0200, Philipp Zabel wrote:
The reset control API has two modes: exclusive access, where the driver
expects to have full and immediate control over the state of the reset
line, and shared (clock-like) access, where drivers only request reset
deassertion while active, but don't care about the state of the reset line
while inactive.

Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting
reset lines") started to transition the reset control request API calls
to explicitly state whether the driver needs exclusive or shared reset
control behavior.

This series converts all drivers that currently implicitly request
exclusive reset controls to the corresponding explicit API call. It is,
for the most part, generated from the following semantic patch:

@@
expression rstc, dev, id;
@@
-rstc = reset_control_get(dev, id);
+rstc = reset_control_get_exclusive(dev, id);
I don't know if it has been discussed in the past, so forgive me if it
has been. Have you considered adding a "int flags" argument to the
existing reset_control_get_*() functions, rather than introducing
separate exclusive variants ?

Indeed, with a "int flags" argument you could in the future add more
variants/behaviors without actually multiplying the number of
functions. Something like the "flags" argument for request_irq() for
example.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help