From: Ulf Hansson <ulf.hansson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> To: "Rafael J. Wysocki" <rjw-LthD3rsA81gm4RdzfppkhA@public.gmane.org>, Len Brown <len.brown-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>, Pavel Machek <pavel-+ZI9xUNit7I@public.gmane.org>, Greg Kroah-Hartman <gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>, linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Geert Uytterhoeven <geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>, Kevin Hilman <khilman-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>, Alan Stern <stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org>, Daniel Lezcano <daniel.lezcano-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>, Tomasz Figa <tomasz.figa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>, Simon Horman <horms-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>, Magnus Damm <magnus.damm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>, Ben Dooks <ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>, Kukjin Kim <kgene.kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>, Stephen Boyd <sboyd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>, Philipp Zabel <philipp.zabel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>, Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>, Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>, Chris Ball <chris-OsFVWbfNK3isTnJN9+BGXg@public.gmane.org>, Russell King <linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>, Ulf Hansson <ulf.hansson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>, linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Subject: [PATCH v2 5/9] i2c: core: Convert to dev_pm_domain_attach|detach() Date: Thu, 28 Aug 2014 10:38:58 +0200 [thread overview] Message-ID: <1409215142-8218-6-git-send-email-ulf.hansson@linaro.org> (raw) In-Reply-To: <1409215142-8218-1-git-send-email-ulf.hansson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> Previously only the ACPI power domain was supported by the i2c bus. Let's convert to the common attach/detach functions for power domains, which currently means we are extending the support to include the generic power domain as well. Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Signed-off-by: Ulf Hansson <ulf.hansson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> --- drivers/i2c/i2c-core.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index 632057a..3cd8f11 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c @@ -279,10 +279,13 @@ static int i2c_device_probe(struct device *dev) if (status < 0) return status; - acpi_dev_pm_attach(&client->dev, true); - status = driver->probe(client, i2c_match_id(driver->id_table, client)); - if (status) - acpi_dev_pm_detach(&client->dev, true); + status = dev_pm_domain_attach(&client->dev, true); + if (status != -EPROBE_DEFER) { + status = driver->probe(client, i2c_match_id(driver->id_table, + client)); + if (status) + dev_pm_domain_detach(&client->dev, true); + } return status; } @@ -302,7 +305,7 @@ static int i2c_device_remove(struct device *dev) status = driver->remove(client); } - acpi_dev_pm_detach(&client->dev, true); + dev_pm_domain_detach(&client->dev, true); return status; } -- 1.9.1
WARNING: multiple messages have this Message-ID (diff)
From: ulf.hansson@linaro.org (Ulf Hansson) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 5/9] i2c: core: Convert to dev_pm_domain_attach|detach() Date: Thu, 28 Aug 2014 10:38:58 +0200 [thread overview] Message-ID: <1409215142-8218-6-git-send-email-ulf.hansson@linaro.org> (raw) In-Reply-To: <1409215142-8218-1-git-send-email-ulf.hansson@linaro.org> Previously only the ACPI power domain was supported by the i2c bus. Let's convert to the common attach/detach functions for power domains, which currently means we are extending the support to include the generic power domain as well. Cc: linux-i2c at vger.kernel.org Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> --- drivers/i2c/i2c-core.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index 632057a..3cd8f11 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c @@ -279,10 +279,13 @@ static int i2c_device_probe(struct device *dev) if (status < 0) return status; - acpi_dev_pm_attach(&client->dev, true); - status = driver->probe(client, i2c_match_id(driver->id_table, client)); - if (status) - acpi_dev_pm_detach(&client->dev, true); + status = dev_pm_domain_attach(&client->dev, true); + if (status != -EPROBE_DEFER) { + status = driver->probe(client, i2c_match_id(driver->id_table, + client)); + if (status) + dev_pm_domain_detach(&client->dev, true); + } return status; } @@ -302,7 +305,7 @@ static int i2c_device_remove(struct device *dev) status = driver->remove(client); } - acpi_dev_pm_detach(&client->dev, true); + dev_pm_domain_detach(&client->dev, true); return status; } -- 1.9.1
next prev parent reply other threads:[~2014-08-28 8:38 UTC|newest] Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-08-28 8:38 [PATCH v2 0/9] PM / Domains: Generic OF-based support Ulf Hansson 2014-08-28 8:38 ` Ulf Hansson 2014-08-28 8:38 ` [PATCH v2 1/9] ACPI / PM: Let acpi_dev_pm_detach() return an error code Ulf Hansson 2014-08-28 8:38 ` Ulf Hansson 2014-08-28 8:38 ` [PATCH v2 2/9] PM / Domains: Add generic OF-based power domain look-up Ulf Hansson 2014-08-28 8:38 ` Ulf Hansson 2014-09-02 18:28 ` Geert Uytterhoeven 2014-09-02 18:28 ` Geert Uytterhoeven 2014-09-03 11:24 ` Ulf Hansson 2014-09-03 11:24 ` Ulf Hansson 2014-08-28 8:38 ` [PATCH v2 3/9] PM / Domains: Add APIs to attach/detach a PM domain for a device Ulf Hansson 2014-08-28 8:38 ` Ulf Hansson 2014-08-28 8:38 ` [PATCH v2 4/9] drivercore / platform: Convert to dev_pm_domain_attach|detach() Ulf Hansson 2014-08-28 8:38 ` Ulf Hansson [not found] ` <1409215142-8218-1-git-send-email-ulf.hansson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> 2014-08-28 8:38 ` Ulf Hansson [this message] 2014-08-28 8:38 ` [PATCH v2 5/9] i2c: core: " Ulf Hansson 2014-08-28 8:38 ` [PATCH v2 6/9] mmc: sdio: " Ulf Hansson 2014-08-28 8:38 ` Ulf Hansson 2014-08-28 8:39 ` [PATCH v2 7/9] spi: core: " Ulf Hansson 2014-08-28 8:39 ` Ulf Hansson 2014-08-28 8:39 ` [PATCH v2 8/9] amba: Add support for attach/detach of power domains Ulf Hansson 2014-08-28 8:39 ` Ulf Hansson 2014-08-28 8:39 ` [PATCH v2 9/9] ARM: exynos: Move to generic power domain bindings Ulf Hansson 2014-08-28 8:39 ` Ulf Hansson
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=1409215142-8218-6-git-send-email-ulf.hansson@linaro.org \ --to=ulf.hansson-qsej5fyqhm4dnm+yrofe0a@public.gmane.org \ --cc=ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org \ --cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \ --cc=chris-OsFVWbfNK3isTnJN9+BGXg@public.gmane.org \ --cc=daniel.lezcano-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \ --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \ --cc=geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org \ --cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \ --cc=horms-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org \ --cc=kgene.kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \ --cc=khilman-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \ --cc=len.brown-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \ --cc=linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \ --cc=linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \ --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \ --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \ --cc=linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org \ --cc=linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \ --cc=magnus.damm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \ --cc=pavel-+ZI9xUNit7I@public.gmane.org \ --cc=philipp.zabel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \ --cc=rjw-LthD3rsA81gm4RdzfppkhA@public.gmane.org \ --cc=sboyd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \ --cc=stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org \ --cc=tomasz.figa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \ --cc=wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.