[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <153567657639.93865.10810620274753191329@swboyd.mtv.corp.google.com>
Date: Thu, 30 Aug 2018 17:49:36 -0700
From: Stephen Boyd <swboyd@...omium.org>
To: Andy Gross <andy.gross@...aro.org>,
David Brown <david.brown@...aro.org>,
Dilip Kota <dkota@...eaurora.org>,
Mark Rutland <mark.rutland@....com>,
Rob Herring <robh+dt@...nel.org>, broonie@...nel.org,
devicetree@...r.kernel.org, dianders@...omium.org,
linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-soc@...r.kernel.org, linux-spi@...r.kernel.org,
mka@...omium.org
Cc: Girish Mahadevan <girishm@...eaurora.org>,
Dilip Kota <dkota@...eaurora.org>
Subject: Re: [PATCH V3] spi: spi-geni-qcom: Add SPI driver support for GENI based QUP
Quoting Dilip Kota (2018-08-24 03:42:15)
> +
> +static int __maybe_unused spi_geni_suspend(struct device *dev)
> +{
> + if (!pm_runtime_status_suspended(dev))
> + return -EBUSY;
This looks odd. Why are we doing this? The i2c driver had a recent fix
from Evan squashed in that removed this logic so that suspend wouldn't
be called twice. Can this driver support the direct_complete PM
mechanism instead? Maybe that works to make this check unnecessary and
also allows us to avoid suspending subdevices and resuming on system
resume? It would be good if the i2c/uart/spi drivers could all agree on
how to handle this.
> + return 0;
> +}
> +
> +static const struct dev_pm_ops spi_geni_pm_ops = {
> + SET_RUNTIME_PM_OPS(spi_geni_runtime_suspend,
> + spi_geni_runtime_resume, NULL)
> + SET_SYSTEM_SLEEP_PM_OPS(spi_geni_suspend, NULL)
> +};
> +
Powered by blists - more mailing lists