public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: Michael Riesch <michael.riesch@wolfvision.net>
To: Michael Grzeschik <mgr@pengutronix.de>, linux-i2c@vger.kernel.org
Cc: kernel@pengutronix.de, michal.simek@xilinx.com,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] i2c: cadence: make bus recovery optional
Date: Mon, 28 Nov 2022 12:58:20 +0100	[thread overview]
Message-ID: <ec30bbb7-88f4-f24c-c080-d195d91c2b95@wolfvision.net> (raw)
In-Reply-To: <20221114155700.GA18924@pengutronix.de>

Hi Michael,

On 11/14/22 16:57, Michael Grzeschik wrote:
> On Sun, Oct 23, 2022 at 11:51:21PM +0200, Michael Grzeschik wrote:
>> There is no need for the i2c driver to have functional bus recovery to
>> probe successfully. We patch this by only adding bus_recovery_info only
>> if we get usable pinctrl data.
> 
> Gentle Ping!

Thanks for your efforts. I believe this issue is adressed in a more
recent patch [0], which seems to be on its way to mainline.

Best regards,
Michael


[0]
https://lore.kernel.org/lkml/20221128105158.1536551-1-carsten.haitzler@foss.arm.com/

> 
>> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
>> ---
>> drivers/i2c/busses/i2c-cadence.c | 7 +++----
>> 1 file changed, 3 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/i2c/busses/i2c-cadence.c
>> b/drivers/i2c/busses/i2c-cadence.c
>> index fe0cd205502de9..cf212b8ffd56af 100644
>> --- a/drivers/i2c/busses/i2c-cadence.c
>> +++ b/drivers/i2c/busses/i2c-cadence.c
>> @@ -1262,10 +1262,10 @@ static int cdns_i2c_probe(struct
>> platform_device *pdev)
>>     }
>>
>>     id->rinfo.pinctrl = devm_pinctrl_get(&pdev->dev);
>> -    if (IS_ERR(id->rinfo.pinctrl)) {
>> +    if (!IS_ERR(id->rinfo.pinctrl))
>> +        id->adap.bus_recovery_info = &id->rinfo;
>> +    else
>>         dev_info(&pdev->dev, "can't get pinctrl, bus recovery not
>> supported\n");
>> -        return PTR_ERR(id->rinfo.pinctrl);
>> -    }
>>
>>     id->membase = devm_platform_get_and_ioremap_resource(pdev, 0,
>> &r_mem);
>>     if (IS_ERR(id->membase))
>> @@ -1283,7 +1283,6 @@ static int cdns_i2c_probe(struct platform_device
>> *pdev)
>>     id->adap.retries = 3;        /* Default retry value. */
>>     id->adap.algo_data = id;
>>     id->adap.dev.parent = &pdev->dev;
>> -    id->adap.bus_recovery_info = &id->rinfo;
>>     init_completion(&id->xfer_done);
>>     snprintf(id->adap.name, sizeof(id->adap.name),
>>          "Cadence I2C at %08lx", (unsigned long)r_mem->start);
>> -- 
>> 2.30.2
>>
>>
>>
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-11-28 11:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-23 21:51 [PATCH] i2c: cadence: make bus recovery optional Michael Grzeschik
2022-11-14 15:57 ` Michael Grzeschik
2022-11-28 11:58   ` Michael Riesch [this message]
2022-11-28 13:07     ` Michael Grzeschik
2022-11-28 13:24       ` Michael Grzeschik
2022-12-01 22:54         ` 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=ec30bbb7-88f4-f24c-c080-d195d91c2b95@wolfvision.net \
    --to=michael.riesch@wolfvision.net \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=mgr@pengutronix.de \
    --cc=michal.simek@xilinx.com \
    /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