Re: [PATCH 2/2] iio: magnetometer: add Infineon TLE493D-W2B6 driver

From: Victor Chernyakin

Date: Sun Nov 08 2026 - 14:28:23 EST


> > > +/* I2C addresses selected by IICadr, i.e. the default of variants A0 to A3 */
> > > +static const u8 tle493d_i2c_addrs[] = { 0x35, 0x22, 0x78, 0x44 };
> >
> > The manual seems to list these addresses as 0x6A, 0x44, 0xF0, 0x88 (Table 4,
> > p. 14). Can you explain how you go from those values to the ones in
> > the code?
>
> Table 4 gives the addresses in 8-bit form, that is, the 7-bit address
> shifted left by one with the R/W bit in bit 0. Linux uses 7-bit
> addresses, so 0x6A >> 1 = 0x35, 0x44 >> 1 = 0x22, 0xF0 >> 1 = 0x78
> and 0x88 >> 1 = 0x44. The hardware agrees: the driver probes my A0
> part at 0x35 on a Pi 5.
>
> I'll add that to the comment in v2.

Okay, now that you've explained it I feel silly for not getting
it earlier :p
Feel free to add the comment, but it may be unnecessary, I think
the problem is that I'm just not very familiar with I2C.