From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH 2/5] i2c: i.MX: move disabling of controller out of i2c_fsl_stop
Date: Wed, 27 Feb 2019 09:19:42 +0100 [thread overview]
Message-ID: <20190227081945.27001-3-s.hauer@pengutronix.de> (raw)
In-Reply-To: <20190227081945.27001-1-s.hauer@pengutronix.de>
Move disabling of the controller out of i2c_fsl_stop(). This makes the
function reusable in other places in the next patch.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
drivers/i2c/busses/i2c-imx.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
index 72d9fe5845..74f080dfc9 100644
--- a/drivers/i2c/busses/i2c-imx.c
+++ b/drivers/i2c/busses/i2c-imx.c
@@ -345,10 +345,6 @@ static void i2c_fsl_stop(struct i2c_adapter *adapter)
i2c_fsl_bus_busy(adapter, 0);
i2c_fsl->stopped = 1;
}
-
- /* Disable I2C controller, and force our state to stopped */
- temp = i2c_fsl->hwdata->i2cr_ien_opcode ^ I2CR_IEN,
- fsl_i2c_write_reg(temp, i2c_fsl, FSL_I2C_I2CR);
}
#ifdef CONFIG_PPC
@@ -609,6 +605,10 @@ fail0:
/* Stop I2C transfer */
i2c_fsl_stop(adapter);
+ /* Disable I2C controller, and force our state to stopped */
+ temp = i2c_fsl->hwdata->i2cr_ien_opcode ^ I2CR_IEN,
+ fsl_i2c_write_reg(temp, i2c_fsl, FSL_I2C_I2CR);
+
return (result < 0) ? result : num;
}
--
2.20.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2019-02-27 8:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-27 8:19 [PATCH 0/5] i2c: i.MX driver some cleanup Sascha Hauer
2019-02-27 8:19 ` [PATCH 1/5] i2c: i.MX: Do not call i2c_fsl_bus_busy twice Sascha Hauer
2019-02-27 8:19 ` Sascha Hauer [this message]
2019-02-27 8:19 ` [PATCH 3/5] i2c: i.MX: Track stopped status in I2CR_MSTA bit Sascha Hauer
2019-02-27 8:19 ` [PATCH 4/5] i2c: i.MX: consolidate code Sascha Hauer
2019-02-27 8:19 ` [PATCH 5/5] i2c: i.MX: fix variable name Sascha Hauer
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=20190227081945.27001-3-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.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: 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