* mt7621 i2c fails with upstream driver
@ 2022-01-05 9:51 Kristian Evensen
2022-01-05 11:45 ` Kristian Evensen
2022-01-06 13:23 ` Wolfram Sang
0 siblings, 2 replies; 3+ messages in thread
From: Kristian Evensen @ 2022-01-05 9:51 UTC (permalink / raw)
To: linux-i2c
Hello,
I am in the process of bringing kernel 5.10 up on an mt7621-based
board. The board is equipped with a temperature sensor that is
connected to the i2c bus. Reading the temperature worked fine with my
previous kernel (OpenWRT 4.14/downstream i2c driver), but fails when I
use the upstream driver.
With the 5.10 i2c-mt7621-driver, i2cdetect is no longer able to detect
the sensor and i2cget fails with "Error: Read failed". An strace of
i2cget reveals the cause to be the final ioctl call failing with
ETIMEDOUT.
Replacing the new with the old driver makes i2c work again, but I
would like to try to avoid that. My knowledge of i2c is very limited,
so I wondered if anyone knows what could be wrong or have any
suggestions on things I can try to for example change in the driver?
Thanks in advance for any help,
Kristian
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: mt7621 i2c fails with upstream driver
2022-01-05 9:51 mt7621 i2c fails with upstream driver Kristian Evensen
@ 2022-01-05 11:45 ` Kristian Evensen
2022-01-06 13:23 ` Wolfram Sang
1 sibling, 0 replies; 3+ messages in thread
From: Kristian Evensen @ 2022-01-05 11:45 UTC (permalink / raw)
To: linux-i2c
Hi again,
On Wed, Jan 5, 2022 at 10:51 AM Kristian Evensen
<kristian.evensen@gmail.com> wrote:
> Replacing the new with the old driver makes i2c work again, but I
> would like to try to avoid that. My knowledge of i2c is very limited,
> so I wondered if anyone knows what could be wrong or have any
> suggestions on things I can try to for example change in the driver?
I spent some more time instrumenting the driver. The call that always
times out is the call to mtk_i2c_master_start() made from
mtk_i2c_master_xfer(). From what I can tell, this is the first time
data is written and when I compared with the previous driver, I do not
find equivalents of master_{start,stop,cmd} writes, I only see direct
calls to iowrite/ioread.
Kristian
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: mt7621 i2c fails with upstream driver
2022-01-05 9:51 mt7621 i2c fails with upstream driver Kristian Evensen
2022-01-05 11:45 ` Kristian Evensen
@ 2022-01-06 13:23 ` Wolfram Sang
1 sibling, 0 replies; 3+ messages in thread
From: Wolfram Sang @ 2022-01-06 13:23 UTC (permalink / raw)
To: Kristian Evensen, Qii Wang, Matthias Brugger; +Cc: linux-i2c
[-- Attachment #1: Type: text/plain, Size: 1014 bytes --]
Adding maintainers for this driver/platform to CC...
On Wed, Jan 05, 2022 at 10:51:38AM +0100, Kristian Evensen wrote:
> Hello,
>
> I am in the process of bringing kernel 5.10 up on an mt7621-based
> board. The board is equipped with a temperature sensor that is
> connected to the i2c bus. Reading the temperature worked fine with my
> previous kernel (OpenWRT 4.14/downstream i2c driver), but fails when I
> use the upstream driver.
>
> With the 5.10 i2c-mt7621-driver, i2cdetect is no longer able to detect
> the sensor and i2cget fails with "Error: Read failed". An strace of
> i2cget reveals the cause to be the final ioctl call failing with
> ETIMEDOUT.
>
> Replacing the new with the old driver makes i2c work again, but I
> would like to try to avoid that. My knowledge of i2c is very limited,
> so I wondered if anyone knows what could be wrong or have any
> suggestions on things I can try to for example change in the driver?
>
> Thanks in advance for any help,
> Kristian
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-01-06 13:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-05 9:51 mt7621 i2c fails with upstream driver Kristian Evensen
2022-01-05 11:45 ` Kristian Evensen
2022-01-06 13:23 ` Wolfram Sang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.