2020-03-19 18:23:06

by Alain Volmat

[permalink] [raw]
Subject: [PATCH] i2c: i2c-stm32f7: improve nack debug message

From: Fabrice Gasnier <[email protected]>

Add information on slave addr in the nack debug message.

Signed-off-by: Fabrice Gasnier <[email protected]>
Signed-off-by: Alain Volmat <[email protected]>
---
drivers/i2c/busses/i2c-stm32f7.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-stm32f7.c b/drivers/i2c/busses/i2c-stm32f7.c
index 378956ac6d1d..78d40a4cc282 100644
--- a/drivers/i2c/busses/i2c-stm32f7.c
+++ b/drivers/i2c/busses/i2c-stm32f7.c
@@ -1431,7 +1431,8 @@ static irqreturn_t stm32f7_i2c_isr_event(int irq, void *data)

/* NACK received */
if (status & STM32F7_I2C_ISR_NACKF) {
- dev_dbg(i2c_dev->dev, "<%s>: Receive NACK\n", __func__);
+ dev_dbg(i2c_dev->dev, "<%s>: Receive NACK (addr %x)\n",
+ __func__, f7_msg->addr);
writel_relaxed(STM32F7_I2C_ICR_NACKCF, base + STM32F7_I2C_ICR);
f7_msg->result = -ENXIO;
}
--
2.7.4


2020-03-30 08:42:14

by Pierre-Yves MORDRET

[permalink] [raw]
Subject: Re: [PATCH] i2c: i2c-stm32f7: improve nack debug message

Hello guys !

Reviewed-by: Pierre-Yves MORDRET <[email protected]>

Thanks

On 3/19/20 7:21 PM, Alain Volmat wrote:
> From: Fabrice Gasnier <[email protected]>
>
> Add information on slave addr in the nack debug message.
>
> Signed-off-by: Fabrice Gasnier <[email protected]>
> Signed-off-by: Alain Volmat <[email protected]>
> ---
> drivers/i2c/busses/i2c-stm32f7.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/i2c/busses/i2c-stm32f7.c b/drivers/i2c/busses/i2c-stm32f7.c
> index 378956ac6d1d..78d40a4cc282 100644
> --- a/drivers/i2c/busses/i2c-stm32f7.c
> +++ b/drivers/i2c/busses/i2c-stm32f7.c
> @@ -1431,7 +1431,8 @@ static irqreturn_t stm32f7_i2c_isr_event(int irq, void *data)
>
> /* NACK received */
> if (status & STM32F7_I2C_ISR_NACKF) {
> - dev_dbg(i2c_dev->dev, "<%s>: Receive NACK\n", __func__);
> + dev_dbg(i2c_dev->dev, "<%s>: Receive NACK (addr %x)\n",
> + __func__, f7_msg->addr);
> writel_relaxed(STM32F7_I2C_ICR_NACKCF, base + STM32F7_I2C_ICR);
> f7_msg->result = -ENXIO;
> }
>

2020-04-15 23:00:18

by Wolfram Sang

[permalink] [raw]
Subject: Re: [PATCH] i2c: i2c-stm32f7: improve nack debug message

On Thu, Mar 19, 2020 at 07:21:55PM +0100, Alain Volmat wrote:
> From: Fabrice Gasnier <[email protected]>
>
> Add information on slave addr in the nack debug message.
>
> Signed-off-by: Fabrice Gasnier <[email protected]>
> Signed-off-by: Alain Volmat <[email protected]>

Applied to for-next, thanks! (I'd drop the __func__, though; doesn't
add information, does it?)


Attachments:
(No filename) (395.00 B)
signature.asc (849.00 B)
Download all attachments

2020-04-16 00:03:59

by Alain Volmat

[permalink] [raw]
Subject: Re: [PATCH] i2c: i2c-stm32f7: improve nack debug message

On Wed, Apr 15, 2020 at 01:01:01PM +0200, Wolfram Sang wrote:
> On Thu, Mar 19, 2020 at 07:21:55PM +0100, Alain Volmat wrote:
> > From: Fabrice Gasnier <[email protected]>
> >
> > Add information on slave addr in the nack debug message.
> >
> > Signed-off-by: Fabrice Gasnier <[email protected]>
> > Signed-off-by: Alain Volmat <[email protected]>
>
> Applied to for-next, thanks! (I'd drop the __func__, though; doesn't
> add information, does it?)

In fact similar message is displayed in 2 places. One in case of master mode
isr and the other one in case of slave isr. This message is adding slave
address to the master mode isr. It only makes it more clear on first sight
but indeed displaying the slave address obviously means this is master mode.