* i2c-slave-testunit over i2c-gpio bus
@ 2025-02-18 8:49 Matwey V. Kornilov
2025-02-18 9:44 ` Wolfram Sang
0 siblings, 1 reply; 5+ messages in thread
From: Matwey V. Kornilov @ 2025-02-18 8:49 UTC (permalink / raw)
To: linux-i2c; +Cc: wsa
Hello,
I am trying to run i2c-slave-testunit over i2c-gpio bus in order to
test/debug my MCU based board firmware. I would like to use i2c-gpio
to use the fault injector.
Currently, I see the following message in the system logs:
[ 120.703458] [ T1309] i2c-slave-testunit 3-1030: i2c_slave_register:
not supported by adapter
[ 120.703496] [ T1309] i2c-slave-testunit 3-1030: probe with driver
i2c-slave-testunit failed with error -95
As far as I learned from the i2c-gpio source, the module doesn't
introduce itself as i2c slave compatible. Do I understand it
correctly? If so, would it have any sense to add i2c slave support for
i2c-gpio?
--
With best regards,
Matwey V. Kornilov
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: i2c-slave-testunit over i2c-gpio bus
2025-02-18 8:49 i2c-slave-testunit over i2c-gpio bus Matwey V. Kornilov
@ 2025-02-18 9:44 ` Wolfram Sang
2025-02-18 9:46 ` Matwey V. Kornilov
0 siblings, 1 reply; 5+ messages in thread
From: Wolfram Sang @ 2025-02-18 9:44 UTC (permalink / raw)
To: Matwey V. Kornilov; +Cc: linux-i2c
[-- Attachment #1: Type: text/plain, Size: 542 bytes --]
Hi,
> As far as I learned from the i2c-gpio source, the module doesn't
> introduce itself as i2c slave compatible. Do I understand it
> correctly? If so, would it have any sense to add i2c slave support for
> i2c-gpio?
No, i2c-gpio is not suitable for this. It would mean Linux had to read
the GPIOs constantly to not miss anything, e.g. the remote controller
starting a communication. With all the latencies involved in running the
system, this cannot be guaranteed. You need dedicated HW for that.
Sorry for no better news,
Wolfram
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: i2c-slave-testunit over i2c-gpio bus
2025-02-18 9:44 ` Wolfram Sang
@ 2025-02-18 9:46 ` Matwey V. Kornilov
2025-02-18 10:02 ` Wolfram Sang
0 siblings, 1 reply; 5+ messages in thread
From: Matwey V. Kornilov @ 2025-02-18 9:46 UTC (permalink / raw)
To: Wolfram Sang, Matwey V. Kornilov, linux-i2c
вт, 18 февр. 2025 г. в 12:44, Wolfram Sang <wsa@sang-engineering.com>:
>
> Hi,
>
> > As far as I learned from the i2c-gpio source, the module doesn't
> > introduce itself as i2c slave compatible. Do I understand it
> > correctly? If so, would it have any sense to add i2c slave support for
> > i2c-gpio?
>
> No, i2c-gpio is not suitable for this. It would mean Linux had to read
> the GPIOs constantly to not miss anything, e.g. the remote controller
> starting a communication. With all the latencies involved in running the
> system, this cannot be guaranteed. You need dedicated HW for that.
Thanks. But isn't it possible to attach an interrupt handler to SCL
GPIO? Or do you mean that the latency for IRQ handling is too high?
>
> Sorry for no better news,
>
> Wolfram
>
--
With best regards,
Matwey V. Kornilov
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: i2c-slave-testunit over i2c-gpio bus
2025-02-18 9:46 ` Matwey V. Kornilov
@ 2025-02-18 10:02 ` Wolfram Sang
2025-02-18 10:21 ` Matwey V. Kornilov
0 siblings, 1 reply; 5+ messages in thread
From: Wolfram Sang @ 2025-02-18 10:02 UTC (permalink / raw)
To: Matwey V. Kornilov; +Cc: linux-i2c
[-- Attachment #1: Type: text/plain, Size: 479 bytes --]
> Thanks. But isn't it possible to attach an interrupt handler to SCL
> GPIO? Or do you mean that the latency for IRQ handling is too high?
Way too high for most systems. I made the in-kernel sloppy GPIO logic
analyzer. From that experience, even with constant polling using an
isolated CPU core, you would need at least a dedicatded 300MHz core to
monitor 100kHz. With interrupts, it will probably be a magnitutde more.
I scrapped that idea for the above analyzer, too slow.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: i2c-slave-testunit over i2c-gpio bus
2025-02-18 10:02 ` Wolfram Sang
@ 2025-02-18 10:21 ` Matwey V. Kornilov
0 siblings, 0 replies; 5+ messages in thread
From: Matwey V. Kornilov @ 2025-02-18 10:21 UTC (permalink / raw)
To: Wolfram Sang, Matwey V. Kornilov, linux-i2c
вт, 18 февр. 2025 г. в 13:02, Wolfram Sang <wsa@sang-engineering.com>:
>
>
> > Thanks. But isn't it possible to attach an interrupt handler to SCL
> > GPIO? Or do you mean that the latency for IRQ handling is too high?
>
> Way too high for most systems. I made the in-kernel sloppy GPIO logic
> analyzer. From that experience, even with constant polling using an
> isolated CPU core, you would need at least a dedicatded 300MHz core to
> monitor 100kHz. With interrupts, it will probably be a magnitutde more.
> I scrapped that idea for the above analyzer, too slow.
>
Thanks for sharing this. Initially, I didn't realize this.
--
With best regards,
Matwey V. Kornilov
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-02-18 10:21 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-18 8:49 i2c-slave-testunit over i2c-gpio bus Matwey V. Kornilov
2025-02-18 9:44 ` Wolfram Sang
2025-02-18 9:46 ` Matwey V. Kornilov
2025-02-18 10:02 ` Wolfram Sang
2025-02-18 10:21 ` Matwey V. Kornilov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox