Newbie Question: Clarifying I2C Master/Slave roles and device tree binding for client hardware info

Momin M <[email protected]> Sat, 9 May 2026 21:41:59 +0530
Newsgroups org.kernelnewbies.kernelnewbies
Message-ID <CAFsBPGeKhbDPfSGgr=BwBUYjo7ctu+wrYv4HjaP+RgCm=ZvzGA@mail.gmail.com>
--===============5016400022933434692==
Content-Type: multipart/alternative; boundary="0000000000009e3a1b065164c6b0"

--0000000000009e3a1b065164c6b0
Content-Type: text/plain; charset="UTF-8"

Hi all,

I have been reading the I2C kernel documentation, and I understand the
basic principles of SDA/SCL. I am now trying to grasp the kernel-side
implementation.

I'm struggling with two interconnected points regarding driver development:

   1. *Master/Slave Abstraction:* How are the concepts of I2C "Master" and
   "Slave" represented in Linux kernel drivers? Specifically, is the
   i2c_adapter always considered the "master" (the controller that
   initiates transactions), and the i2c_client always considered the
   "slave" (the device being accessed), or are there contexts where this
   simple analogy breaks down (e.g., multi-master environments or slave-mode
   drivers)?
   2. *Client Hardware Information:* I'm trying to understand the minimum
   necessary hardware information required for the i2c_client to probe
   successfully. Beyond the reg property (slave address) and a
compatible string
   in the Device Tree, what other information, if any, is crucial for
   correctly instantiating the client device, especially for a standard,
   non-complex sensor?

Any guidance on tracing this abstraction back to the low-level
register/hardware interaction would be greatly appreciated.

Thanks,

Momin M

--0000000000009e3a1b065164c6b0
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><span class=3D"gmail-rnc2Gd" style=3D"color:rgb(191,188,18=
3);font-family:&quot;Google Sans&quot;,Roboto,Arial,sans-serif;font-size:14=
px;font-variant-ligatures:no-contextual">Hi all,</span><div class=3D"gmail-=
gWqWw gmail-rnc2Gd" style=3D"color:rgb(191,188,183);font-family:&quot;Googl=
e Sans&quot;,Roboto,Arial,sans-serif;font-size:14px;font-variant-ligatures:=
no-contextual"><br></div><span class=3D"gmail-rnc2Gd" style=3D"color:rgb(19=
1,188,183);font-family:&quot;Google Sans&quot;,Roboto,Arial,sans-serif;font=
-size:14px;font-variant-ligatures:no-contextual">I have been reading the I2=
C kernel documentation, and I understand the basic principles of SDA/SCL. I=
 am now trying to grasp the kernel-side implementation.</span><div class=3D=
"gmail-gWqWw gmail-rnc2Gd" style=3D"color:rgb(191,188,183);font-family:&quo=
t;Google Sans&quot;,Roboto,Arial,sans-serif;font-size:14px;font-variant-lig=
atures:no-contextual"><br></div><span class=3D"gmail-rnc2Gd" style=3D"color=
:rgb(191,188,183);font-family:&quot;Google Sans&quot;,Roboto,Arial,sans-ser=
if;font-size:14px;font-variant-ligatures:no-contextual">I&#39;m struggling =
with two interconnected points regarding driver development:</span><ol clas=
s=3D"gmail-gdAMzb" style=3D"color:rgb(191,188,183);font-family:&quot;Google=
 Sans&quot;,Roboto,Arial,sans-serif;font-size:14px;font-variant-ligatures:n=
o-contextual"><li class=3D"gmail-rnc2Gd" style=3D"mask-repeat: no-repeat;">=
<strong><span class=3D"gmail-rnc2Gd" style=3D"mask-repeat: no-repeat;">Mast=
er/Slave Abstraction:</span></strong><span class=3D"gmail-rnc2Gd" style=3D"=
mask-repeat: no-repeat;">=C2=A0How are the concepts of I2C &quot;Master&quo=
t; and &quot;Slave&quot; represented in Linux kernel drivers? Specifically,=
 is the=C2=A0</span><code class=3D"gmail-dfqOJc" style=3D"display:inline-bl=
ock;background-color:rgb(36,39,40);border-radius:4px;color:rgb(169,164,157)=
;padding:1px 4px;font-size:0.75rem;letter-spacing:0.00625rem;line-height:1r=
em;font-family:&quot;Google Sans Mono&quot;,monospace;white-space:pre-wrap;=
margin:unset">i2c_adapter</code><span class=3D"gmail-rnc2Gd" style=3D"mask-=
repeat: no-repeat;">=C2=A0always considered the &quot;master&quot; (the con=
troller that initiates transactions), and the=C2=A0</span><code class=3D"gm=
ail-dfqOJc" style=3D"display:inline-block;background-color:rgb(36,39,40);bo=
rder-radius:4px;color:rgb(169,164,157);padding:1px 4px;font-size:0.75rem;le=
tter-spacing:0.00625rem;line-height:1rem;font-family:&quot;Google Sans Mono=
&quot;,monospace;white-space:pre-wrap;margin:unset">i2c_client</code><span =
class=3D"gmail-rnc2Gd" style=3D"mask-repeat: no-repeat;">=C2=A0always consi=
dered the &quot;slave&quot; (the device being accessed), or are there conte=
xts where this simple analogy breaks down (e.g., multi-master environments =
or slave-mode drivers)?</span></li><li class=3D"gmail-rnc2Gd" style=3D"mask=
-repeat: no-repeat;"><strong><span class=3D"gmail-rnc2Gd" style=3D"mask-rep=
eat: no-repeat;">Client Hardware Information:</span></strong><span class=3D=
"gmail-rnc2Gd" style=3D"mask-repeat: no-repeat;">=C2=A0I&#39;m trying to un=
derstand the minimum necessary hardware information required for the=C2=A0<=
/span><code class=3D"gmail-dfqOJc" style=3D"display:inline-block;background=
-color:rgb(36,39,40);border-radius:4px;color:rgb(169,164,157);padding:1px 4=
px;font-size:0.75rem;letter-spacing:0.00625rem;line-height:1rem;font-family=
:&quot;Google Sans Mono&quot;,monospace;white-space:pre-wrap;margin:unset">=
i2c_client</code><span class=3D"gmail-rnc2Gd" style=3D"mask-repeat: no-repe=
at;">=C2=A0to probe successfully. Beyond the=C2=A0</span><code class=3D"gma=
il-dfqOJc" style=3D"display:inline-block;background-color:rgb(36,39,40);bor=
der-radius:4px;color:rgb(169,164,157);padding:1px 4px;font-size:0.75rem;let=
ter-spacing:0.00625rem;line-height:1rem;font-family:&quot;Google Sans Mono&=
quot;,monospace;white-space:pre-wrap;margin:unset">reg</code><span class=3D=
"gmail-rnc2Gd" style=3D"mask-repeat: no-repeat;">=C2=A0property (slave addr=
ess) and a=C2=A0</span><code class=3D"gmail-dfqOJc" style=3D"display:inline=
-block;background-color:rgb(36,39,40);border-radius:4px;color:rgb(169,164,1=
57);padding:1px 4px;font-size:0.75rem;letter-spacing:0.00625rem;line-height=
:1rem;font-family:&quot;Google Sans Mono&quot;,monospace;white-space:pre-wr=
ap;margin:unset">compatible</code><span class=3D"gmail-rnc2Gd" style=3D"mas=
k-repeat: no-repeat;">=C2=A0string in the Device Tree, what other informati=
on, if any, is crucial for correctly instantiating the client device, espec=
ially for a standard, non-complex sensor?</span></li></ol><span class=3D"gm=
ail-rnc2Gd" style=3D"color:rgb(191,188,183);font-family:&quot;Google Sans&q=
uot;,Roboto,Arial,sans-serif;font-size:14px;font-variant-ligatures:no-conte=
xtual">Any guidance on tracing this abstraction back to the low-level regis=
ter/hardware interaction would be greatly appreciated.</span><div class=3D"=
gmail-gWqWw gmail-rnc2Gd" style=3D"color:rgb(191,188,183);font-family:&quot=
;Google Sans&quot;,Roboto,Arial,sans-serif;font-size:14px;font-variant-liga=
tures:no-contextual"><br></div><span class=3D"gmail-rnc2Gd" style=3D"color:=
rgb(191,188,183);font-family:&quot;Google Sans&quot;,Roboto,Arial,sans-seri=
f;font-size:14px;font-variant-ligatures:no-contextual">Thanks,</span><div c=
lass=3D"gmail-gWqWw gmail-rnc2Gd" style=3D"color:rgb(191,188,183);font-fami=
ly:&quot;Google Sans&quot;,Roboto,Arial,sans-serif;font-size:14px;font-vari=
ant-ligatures:no-contextual"><br></div><span class=3D"gmail-rnc2Gd" style=
=3D"color:rgb(191,188,183);font-family:&quot;Google Sans&quot;,Roboto,Arial=
,sans-serif;font-size:14px;font-variant-ligatures:no-contextual">Momin M</s=
pan></div>

--0000000000009e3a1b065164c6b0--


--===============5016400022933434692==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Kernelnewbies mailing list
[email protected]
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

--===============5016400022933434692==--