All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bastian Hecht <hechtb@gmail.com>
To: linux-i2c@vger.kernel.org
Cc: Linux-SH <linux-sh@vger.kernel.org>,
	Tomoya MORINAGA <tomoya.rohm@gmail.com>,
	Wolfram Sang <wsa@the-dreams.de>,
	linux-arm-kernel@lists.infradead.org,
	Bastian Hecht <hechtb@gmail.com>,
	Jingoo Han <jg1.han@samsung.com>, Jean Delvare <jdelvare@suse.de>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Paul Gortmaker <paul.gortmaker@windriver.com>,
	Andreas Werner <wernerandy@gmx.de>,
	open list <linux-kernel@vger.kernel.org>
Subject: [PATCH v2 2/5] i2c: eg20t: Remove suspension check
Date: Thu, 17 Jul 2014 16:48:37 +0200	[thread overview]
Message-ID: <1405608520-5644-2-git-send-email-hechtb@gmail.com> (raw)
In-Reply-To: <1405608520-5644-1-git-send-email-hechtb@gmail.com>

We now take care of suspension in the i2c core code. So we can remove this
check here.

Signed-off-by: Bastian Hecht <hechtb@gmail.com>
---
same as v1

 drivers/i2c/busses/i2c-eg20t.c | 15 ---------------
 1 file changed, 15 deletions(-)

diff --git a/drivers/i2c/busses/i2c-eg20t.c b/drivers/i2c/busses/i2c-eg20t.c
index a44ea13..aae0413 100644
--- a/drivers/i2c/busses/i2c-eg20t.c
+++ b/drivers/i2c/busses/i2c-eg20t.c
@@ -162,15 +162,12 @@ struct i2c_algo_pch_data {
  * struct adapter_info - This structure holds the adapter information for the
 			 PCH i2c controller
  * @pch_data:		stores a list of i2c_algo_pch_data
- * @pch_i2c_suspended:	specifies whether the system is suspended or not
- *			perhaps with more lines and words.
  * @ch_num:		specifies the number of i2c instance
  *
  * pch_data has as many elements as maximum I2C channels
  */
 struct adapter_info {
 	struct i2c_algo_pch_data pch_data[PCH_I2C_MAX_DEV];
-	bool pch_i2c_suspended;
 	int ch_num;
 };
 
@@ -677,13 +674,6 @@ static s32 pch_i2c_xfer(struct i2c_adapter *i2c_adap,
 	if (ret)
 		return ret;
 
-	if (adap->p_adapter_info->pch_i2c_suspended) {
-		mutex_unlock(&pch_mutex);
-		return -EBUSY;
-	}
-
-	pch_dbg(adap, "adap->p_adapter_info->pch_i2c_suspended is %d\n",
-		adap->p_adapter_info->pch_i2c_suspended);
 	/* transfer not completed */
 	adap->pch_i2c_xfer_in_progress = true;
 
@@ -786,7 +776,6 @@ static int pch_i2c_probe(struct pci_dev *pdev,
 
 	for (i = 0; i < adap_info->ch_num; i++) {
 		pch_adap = &adap_info->pch_data[i].pch_adapter;
-		adap_info->pch_i2c_suspended = false;
 
 		adap_info->pch_data[i].p_adapter_info = adap_info;
 
@@ -862,8 +851,6 @@ static int pch_i2c_suspend(struct pci_dev *pdev, pm_message_t state)
 	struct adapter_info *adap_info = pci_get_drvdata(pdev);
 	void __iomem *p = adap_info->pch_data[0].pch_base_address;
 
-	adap_info->pch_i2c_suspended = true;
-
 	for (i = 0; i < adap_info->ch_num; i++) {
 		while ((adap_info->pch_data[i].pch_i2c_xfer_in_progress)) {
 			/* Wait until all channel transfers are completed */
@@ -912,8 +899,6 @@ static int pch_i2c_resume(struct pci_dev *pdev)
 	for (i = 0; i < adap_info->ch_num; i++)
 		pch_i2c_init(&adap_info->pch_data[i]);
 
-	adap_info->pch_i2c_suspended = false;
-
 	return 0;
 }
 #else
-- 
1.9.1


WARNING: multiple messages have this Message-ID (diff)
From: Bastian Hecht <hechtb@gmail.com>
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 2/5] i2c: eg20t: Remove suspension check
Date: Thu, 17 Jul 2014 14:48:37 +0000	[thread overview]
Message-ID: <1405608520-5644-2-git-send-email-hechtb@gmail.com> (raw)
In-Reply-To: <1405608520-5644-1-git-send-email-hechtb@gmail.com>

We now take care of suspension in the i2c core code. So we can remove this
check here.

Signed-off-by: Bastian Hecht <hechtb@gmail.com>
---
same as v1

 drivers/i2c/busses/i2c-eg20t.c | 15 ---------------
 1 file changed, 15 deletions(-)

diff --git a/drivers/i2c/busses/i2c-eg20t.c b/drivers/i2c/busses/i2c-eg20t.c
index a44ea13..aae0413 100644
--- a/drivers/i2c/busses/i2c-eg20t.c
+++ b/drivers/i2c/busses/i2c-eg20t.c
@@ -162,15 +162,12 @@ struct i2c_algo_pch_data {
  * struct adapter_info - This structure holds the adapter information for the
 			 PCH i2c controller
  * @pch_data:		stores a list of i2c_algo_pch_data
- * @pch_i2c_suspended:	specifies whether the system is suspended or not
- *			perhaps with more lines and words.
  * @ch_num:		specifies the number of i2c instance
  *
  * pch_data has as many elements as maximum I2C channels
  */
 struct adapter_info {
 	struct i2c_algo_pch_data pch_data[PCH_I2C_MAX_DEV];
-	bool pch_i2c_suspended;
 	int ch_num;
 };
 
@@ -677,13 +674,6 @@ static s32 pch_i2c_xfer(struct i2c_adapter *i2c_adap,
 	if (ret)
 		return ret;
 
-	if (adap->p_adapter_info->pch_i2c_suspended) {
-		mutex_unlock(&pch_mutex);
-		return -EBUSY;
-	}
-
-	pch_dbg(adap, "adap->p_adapter_info->pch_i2c_suspended is %d\n",
-		adap->p_adapter_info->pch_i2c_suspended);
 	/* transfer not completed */
 	adap->pch_i2c_xfer_in_progress = true;
 
@@ -786,7 +776,6 @@ static int pch_i2c_probe(struct pci_dev *pdev,
 
 	for (i = 0; i < adap_info->ch_num; i++) {
 		pch_adap = &adap_info->pch_data[i].pch_adapter;
-		adap_info->pch_i2c_suspended = false;
 
 		adap_info->pch_data[i].p_adapter_info = adap_info;
 
@@ -862,8 +851,6 @@ static int pch_i2c_suspend(struct pci_dev *pdev, pm_message_t state)
 	struct adapter_info *adap_info = pci_get_drvdata(pdev);
 	void __iomem *p = adap_info->pch_data[0].pch_base_address;
 
-	adap_info->pch_i2c_suspended = true;
-
 	for (i = 0; i < adap_info->ch_num; i++) {
 		while ((adap_info->pch_data[i].pch_i2c_xfer_in_progress)) {
 			/* Wait until all channel transfers are completed */
@@ -912,8 +899,6 @@ static int pch_i2c_resume(struct pci_dev *pdev)
 	for (i = 0; i < adap_info->ch_num; i++)
 		pch_i2c_init(&adap_info->pch_data[i]);
 
-	adap_info->pch_i2c_suspended = false;
-
 	return 0;
 }
 #else
-- 
1.9.1


WARNING: multiple messages have this Message-ID (diff)
From: hechtb@gmail.com (Bastian Hecht)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 2/5] i2c: eg20t: Remove suspension check
Date: Thu, 17 Jul 2014 16:48:37 +0200	[thread overview]
Message-ID: <1405608520-5644-2-git-send-email-hechtb@gmail.com> (raw)
In-Reply-To: <1405608520-5644-1-git-send-email-hechtb@gmail.com>

We now take care of suspension in the i2c core code. So we can remove this
check here.

Signed-off-by: Bastian Hecht <hechtb@gmail.com>
---
same as v1

 drivers/i2c/busses/i2c-eg20t.c | 15 ---------------
 1 file changed, 15 deletions(-)

diff --git a/drivers/i2c/busses/i2c-eg20t.c b/drivers/i2c/busses/i2c-eg20t.c
index a44ea13..aae0413 100644
--- a/drivers/i2c/busses/i2c-eg20t.c
+++ b/drivers/i2c/busses/i2c-eg20t.c
@@ -162,15 +162,12 @@ struct i2c_algo_pch_data {
  * struct adapter_info - This structure holds the adapter information for the
 			 PCH i2c controller
  * @pch_data:		stores a list of i2c_algo_pch_data
- * @pch_i2c_suspended:	specifies whether the system is suspended or not
- *			perhaps with more lines and words.
  * @ch_num:		specifies the number of i2c instance
  *
  * pch_data has as many elements as maximum I2C channels
  */
 struct adapter_info {
 	struct i2c_algo_pch_data pch_data[PCH_I2C_MAX_DEV];
-	bool pch_i2c_suspended;
 	int ch_num;
 };
 
@@ -677,13 +674,6 @@ static s32 pch_i2c_xfer(struct i2c_adapter *i2c_adap,
 	if (ret)
 		return ret;
 
-	if (adap->p_adapter_info->pch_i2c_suspended) {
-		mutex_unlock(&pch_mutex);
-		return -EBUSY;
-	}
-
-	pch_dbg(adap, "adap->p_adapter_info->pch_i2c_suspended is %d\n",
-		adap->p_adapter_info->pch_i2c_suspended);
 	/* transfer not completed */
 	adap->pch_i2c_xfer_in_progress = true;
 
@@ -786,7 +776,6 @@ static int pch_i2c_probe(struct pci_dev *pdev,
 
 	for (i = 0; i < adap_info->ch_num; i++) {
 		pch_adap = &adap_info->pch_data[i].pch_adapter;
-		adap_info->pch_i2c_suspended = false;
 
 		adap_info->pch_data[i].p_adapter_info = adap_info;
 
@@ -862,8 +851,6 @@ static int pch_i2c_suspend(struct pci_dev *pdev, pm_message_t state)
 	struct adapter_info *adap_info = pci_get_drvdata(pdev);
 	void __iomem *p = adap_info->pch_data[0].pch_base_address;
 
-	adap_info->pch_i2c_suspended = true;
-
 	for (i = 0; i < adap_info->ch_num; i++) {
 		while ((adap_info->pch_data[i].pch_i2c_xfer_in_progress)) {
 			/* Wait until all channel transfers are completed */
@@ -912,8 +899,6 @@ static int pch_i2c_resume(struct pci_dev *pdev)
 	for (i = 0; i < adap_info->ch_num; i++)
 		pch_i2c_init(&adap_info->pch_data[i]);
 
-	adap_info->pch_i2c_suspended = false;
-
 	return 0;
 }
 #else
-- 
1.9.1

WARNING: multiple messages have this Message-ID (diff)
From: Bastian Hecht <hechtb@gmail.com>
To: linux-i2c@vger.kernel.org
Cc: Linux-SH <linux-sh@vger.kernel.org>,
	Tomoya MORINAGA <tomoya.rohm@gmail.com>,
	Wolfram Sang <wsa@the-dreams.de>,
	linux-arm-kernel@lists.infradead.org,
	Bastian Hecht <hechtb@gmail.com>,
	Jingoo Han <jg1.han@samsung.com>, Jean Delvare <jdelvare@suse.de>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Paul Gortmaker <paul.gortmaker@windriver.com>,
	Andreas Werner <wernerandy@gmx.de>,
	linux-kernel@vger.kernel.org (open list)
Subject: [PATCH v2 2/5] i2c: eg20t: Remove suspension check
Date: Thu, 17 Jul 2014 16:48:37 +0200	[thread overview]
Message-ID: <1405608520-5644-2-git-send-email-hechtb@gmail.com> (raw)
In-Reply-To: <1405608520-5644-1-git-send-email-hechtb@gmail.com>

We now take care of suspension in the i2c core code. So we can remove this
check here.

Signed-off-by: Bastian Hecht <hechtb@gmail.com>
---
same as v1

 drivers/i2c/busses/i2c-eg20t.c | 15 ---------------
 1 file changed, 15 deletions(-)

diff --git a/drivers/i2c/busses/i2c-eg20t.c b/drivers/i2c/busses/i2c-eg20t.c
index a44ea13..aae0413 100644
--- a/drivers/i2c/busses/i2c-eg20t.c
+++ b/drivers/i2c/busses/i2c-eg20t.c
@@ -162,15 +162,12 @@ struct i2c_algo_pch_data {
  * struct adapter_info - This structure holds the adapter information for the
 			 PCH i2c controller
  * @pch_data:		stores a list of i2c_algo_pch_data
- * @pch_i2c_suspended:	specifies whether the system is suspended or not
- *			perhaps with more lines and words.
  * @ch_num:		specifies the number of i2c instance
  *
  * pch_data has as many elements as maximum I2C channels
  */
 struct adapter_info {
 	struct i2c_algo_pch_data pch_data[PCH_I2C_MAX_DEV];
-	bool pch_i2c_suspended;
 	int ch_num;
 };
 
@@ -677,13 +674,6 @@ static s32 pch_i2c_xfer(struct i2c_adapter *i2c_adap,
 	if (ret)
 		return ret;
 
-	if (adap->p_adapter_info->pch_i2c_suspended) {
-		mutex_unlock(&pch_mutex);
-		return -EBUSY;
-	}
-
-	pch_dbg(adap, "adap->p_adapter_info->pch_i2c_suspended is %d\n",
-		adap->p_adapter_info->pch_i2c_suspended);
 	/* transfer not completed */
 	adap->pch_i2c_xfer_in_progress = true;
 
@@ -786,7 +776,6 @@ static int pch_i2c_probe(struct pci_dev *pdev,
 
 	for (i = 0; i < adap_info->ch_num; i++) {
 		pch_adap = &adap_info->pch_data[i].pch_adapter;
-		adap_info->pch_i2c_suspended = false;
 
 		adap_info->pch_data[i].p_adapter_info = adap_info;
 
@@ -862,8 +851,6 @@ static int pch_i2c_suspend(struct pci_dev *pdev, pm_message_t state)
 	struct adapter_info *adap_info = pci_get_drvdata(pdev);
 	void __iomem *p = adap_info->pch_data[0].pch_base_address;
 
-	adap_info->pch_i2c_suspended = true;
-
 	for (i = 0; i < adap_info->ch_num; i++) {
 		while ((adap_info->pch_data[i].pch_i2c_xfer_in_progress)) {
 			/* Wait until all channel transfers are completed */
@@ -912,8 +899,6 @@ static int pch_i2c_resume(struct pci_dev *pdev)
 	for (i = 0; i < adap_info->ch_num; i++)
 		pch_i2c_init(&adap_info->pch_data[i]);
 
-	adap_info->pch_i2c_suspended = false;
-
 	return 0;
 }
 #else
-- 
1.9.1


  reply	other threads:[~2014-07-17 14:48 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-17 14:48 [PATCH v2 1/5] i2c: Don't start transfers when suspended Bastian Hecht
2014-07-17 14:48 ` Bastian Hecht
2014-07-17 14:48 ` Bastian Hecht
2014-07-17 14:48 ` Bastian Hecht
2014-07-17 14:48 ` Bastian Hecht [this message]
2014-07-17 14:48   ` [PATCH v2 2/5] i2c: eg20t: Remove suspension check Bastian Hecht
2014-07-17 14:48   ` Bastian Hecht
2014-07-17 14:48   ` Bastian Hecht
2014-07-17 14:48 ` [PATCH v3 3/5] i2c: exynos5: " Bastian Hecht
2014-07-17 14:48   ` Bastian Hecht
2014-07-17 14:48   ` Bastian Hecht
2014-07-17 14:48   ` Bastian Hecht
2014-07-17 16:54   ` Bastian Hecht
2014-07-17 16:54     ` Bastian Hecht
2014-07-17 16:54     ` Bastian Hecht
2014-07-17 16:54     ` Bastian Hecht
2014-07-17 14:48 ` [PATCH v2 4/5] i2c: sc3c2410: " Bastian Hecht
2014-07-17 14:48   ` Bastian Hecht
2014-07-17 14:48   ` Bastian Hecht
2014-07-17 14:48   ` Bastian Hecht
2014-07-17 14:48 ` [PATCH v2 5/5] i2c: tegra: " Bastian Hecht
2014-07-17 14:48   ` Bastian Hecht
2014-07-17 14:48   ` Bastian Hecht
2014-07-17 14:48   ` Bastian Hecht
     [not found]   ` <1405608520-5644-5-git-send-email-hechtb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-07-17 14:59     ` Thierry Reding
2014-07-17 14:59       ` Thierry Reding
2014-07-17 14:59       ` Thierry Reding
2014-07-17 14:59       ` Thierry Reding
2014-07-17 16:52       ` Bastian Hecht
2014-07-17 16:52         ` Bastian Hecht
2014-07-17 16:52         ` Bastian Hecht
2014-07-17 16:52         ` Bastian Hecht
2014-07-17 14:58 ` [PATCH v2 1/5] i2c: Don't start transfers when suspended Bastian Hecht
2014-07-17 14:58   ` Bastian Hecht
2014-07-17 14:58   ` Bastian Hecht
2014-07-17 15:09   ` Wolfram Sang
2014-07-17 15:09     ` Wolfram Sang
2014-07-17 15:09     ` Wolfram Sang
2014-07-22 18:01 ` Grygorii Strashko
2014-07-22 18:46   ` Grygorii Strashko
2014-07-22 18:46   ` Grygorii Strashko
2014-07-22 18:46   ` Grygorii Strashko
     [not found]   ` <53CEB196.9060903-l0cyMroinI0@public.gmane.org>
2014-07-22 21:20     ` Russell King - ARM Linux
2014-07-22 21:20       ` Russell King - ARM Linux
2014-07-22 21:20       ` Russell King - ARM Linux
2014-07-22 21:20       ` Russell King - ARM Linux
2014-09-19 17:18 ` Wolfram Sang
2014-09-19 17:18   ` Wolfram Sang
2014-09-19 17:18   ` Wolfram Sang

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=1405608520-5644-2-git-send-email-hechtb@gmail.com \
    --to=hechtb@gmail.com \
    --cc=jdelvare@suse.de \
    --cc=jg1.han@samsung.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=paul.gortmaker@windriver.com \
    --cc=tomoya.rohm@gmail.com \
    --cc=wernerandy@gmx.de \
    --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 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.