Re: [PATCH] i2c: cadence: make bus recovery optional

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxx/

> 
>> Signed-off-by: Michael Grzeschik <m.grzeschik@xxxxxxxxxxxxxx>
>> ---
>> 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@xxxxxxxxxxxxxxxxxxx
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel



[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux