From: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
To: Sylwester Nawrocki <s.nawrocki@samsung.com>
Cc: linux-media@vger.kernel.org, m.szyprowski@samsung.com,
wsa@the-dreams.de, linux-samsung-soc@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH 1/4] exynos4-is: Clear isp-i2c adapter power.ignore_children flag
Date: Thu, 01 Sep 2016 13:54:49 +0200 [thread overview]
Message-ID: <4547892.mzTdl6x2IH@amdc1976> (raw)
In-Reply-To: <1472729956-17475-1-git-send-email-s.nawrocki@samsung.com>
Hi,
On Thursday, September 01, 2016 01:39:16 PM Sylwester Nawrocki wrote:
> Since commit 04f59143b571161d25315dd52d7a2ecc022cb71a
> ("i2c: let I2C masters ignore their children for PM")
> the power.ignore_children flag is set when registering an I2C
> adapter. Since I2C transfers are not managed by the fimc-isp-i2c
> driver its clients use pm_runtime_* calls directly to communicate
> required power state of the bus controller.
> However when the power.ignore_children flag is set that doesn't
> work, so clear that flag back after registering the adapter.
> While at it drop pm_runtime_enable() call on the i2c_adapter
> as it is already done by the I2C subsystem when registering
> I2C adapter.
>
> Cc: <stable@vger.kernel.org> # 4.7+
You may also use "Fixes:" tag to mark the original commit that
this one corrects.
> Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
> ---
> drivers/media/platform/exynos4-is/fimc-is-i2c.c | 25 ++++++++++++++++++-------
> 1 file changed, 18 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/media/platform/exynos4-is/fimc-is-i2c.c b/drivers/media/platform/exynos4-is/fimc-is-i2c.c
> index 7521aa5..03b4246 100644
> --- a/drivers/media/platform/exynos4-is/fimc-is-i2c.c
> +++ b/drivers/media/platform/exynos4-is/fimc-is-i2c.c
> @@ -55,26 +55,37 @@ static int fimc_is_i2c_probe(struct platform_device *pdev)
> i2c_adap->algo = &fimc_is_i2c_algorithm;
> i2c_adap->class = I2C_CLASS_SPD;
>
> + platform_set_drvdata(pdev, isp_i2c);
> + pm_runtime_enable(&pdev->dev);
> +
> ret = i2c_add_adapter(i2c_adap);
> if (ret < 0) {
> dev_err(&pdev->dev, "failed to add I2C bus %s\n",
> node->full_name);
> - return ret;
> + goto err_pm_dis;
> }
>
> - platform_set_drvdata(pdev, isp_i2c);
> -
> - pm_runtime_enable(&pdev->dev);
> - pm_runtime_enable(&i2c_adap->dev);
> -
> + /*
> + * Client drivers of this adapter don't do any I2C transfers as that
> + * is handled by the ISP firmware. But we rely on the runtime PM
> + * state propagation from the clients up to the adapter driver so
> + * clear the ignore_children flags here. PM rutnime calls are not
Minor nit:
"rutnime" typo
Otherwise it looks all fine to me.
Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
prev parent reply other threads:[~2016-09-01 11:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-01 11:39 [PATCH 1/4] exynos4-is: Clear isp-i2c adapter power.ignore_children flag Sylwester Nawrocki
2016-09-01 11:47 ` Wolfram Sang
2016-09-07 20:38 ` Linus Walleij
2016-09-08 11:16 ` Sylwester Nawrocki
2016-09-01 11:54 ` Bartlomiej Zolnierkiewicz [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=4547892.mzTdl6x2IH@amdc1976 \
--to=b.zolnierkie@samsung.com \
--cc=linux-media@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=s.nawrocki@samsung.com \
--cc=stable@vger.kernel.org \
--cc=wsa@the-dreams.de \
/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