2022-01-10 20:02:26

by Luiz Sampaio

[permalink] [raw]
Subject: Implementing overdrive communication in w1

Hello, all

Recently, I had to use the w1-gpio driver to access an EEPROM w1 slave.
The problem is that the slave only supported overdrive speed, and
w1-gpio is using standard communication. I checked the delays and
confirmed in the Maxim website:

http://www.maximintegrated.com/en/design/technical-documents/app-notes/1/126.html

Back then, I changed the w1_io.c driver in order to support it, but I
want to make a patch to be able to choose between standard and overdrive
speeds. Maybe set this in the w1-gpio device tree, if the user wants
overdrive mode (adding "w1-overdrive", for instance, not to break the
already working standard speed mode).

Do you have some orientation in the path that I have to follow? I
thought I could add a parameter (bool?) in the struct w1_bus_master in
linux/w1.h, and test the value of this parameter where delays are used
in drivers/w1/w1_io.c. This is the best approach? How can I know if this
would break something?

Is there some effort to add support to this already that I could help?

Best regards,

--
2.34.1