linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] i2c: stm32: fix slot id after introduction of host-notify support
@ 2020-09-15  9:11 Alain Volmat
  2020-09-18 21:05 ` wsa
  0 siblings, 1 reply; 2+ messages in thread
From: Alain Volmat @ 2020-09-15  9:11 UTC (permalink / raw)
  To: wsa, pierre-yves.mordret
  Cc: alexandre.torgue, linux-kernel, alain.volmat, linux-i2c,
	fabrice.gasnier, linux-stm32, linux-arm-kernel

Commit 68302245720a ("i2c: stm32f7: Add SMBus Host-Notify protocol support")
added a new slot specific for handling host-notify however failed
to update the previous slot ID leading to having the 7bit address
only slot with the wrong number.

Signed-off-by: Alain Volmat <alain.volmat@st.com>
---
 drivers/i2c/busses/i2c-stm32f7.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-stm32f7.c b/drivers/i2c/busses/i2c-stm32f7.c
index b401940c5580..0880f6a4cd44 100644
--- a/drivers/i2c/busses/i2c-stm32f7.c
+++ b/drivers/i2c/busses/i2c-stm32f7.c
@@ -1355,7 +1355,7 @@ static int stm32f7_i2c_get_free_slave_id(struct stm32f7_i2c_dev *i2c_dev,
 	}
 
 	for (i = STM32F7_I2C_MAX_SLAVE - 1; i > 0; i--) {
-		if (i == 1 && (slave->flags & I2C_CLIENT_TEN))
+		if (i == 2 && (slave->flags & I2C_CLIENT_TEN))
 			continue;
 		if (!i2c_dev->slave[i]) {
 			*id = i;
-- 
2.7.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/2] i2c: stm32: fix slot id after introduction of host-notify support
  2020-09-15  9:11 [PATCH 1/2] i2c: stm32: fix slot id after introduction of host-notify support Alain Volmat
@ 2020-09-18 21:05 ` wsa
  0 siblings, 0 replies; 2+ messages in thread
From: wsa @ 2020-09-18 21:05 UTC (permalink / raw)
  To: Alain Volmat
  Cc: alexandre.torgue, linux-kernel, pierre-yves.mordret, linux-i2c,
	fabrice.gasnier, linux-stm32, linux-arm-kernel


[-- Attachment #1.1: Type: text/plain, Size: 430 bytes --]

On Tue, Sep 15, 2020 at 11:11:30AM +0200, Alain Volmat wrote:
> Commit 68302245720a ("i2c: stm32f7: Add SMBus Host-Notify protocol support")
> added a new slot specific for handling host-notify however failed
> to update the previous slot ID leading to having the 7bit address
> only slot with the wrong number.
> 
> Signed-off-by: Alain Volmat <alain.volmat@st.com>

Folded this into 68302245720a in for-next, thanks!


[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-09-18 21:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-15  9:11 [PATCH 1/2] i2c: stm32: fix slot id after introduction of host-notify support Alain Volmat
2020-09-18 21:05 ` wsa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).