Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Arm drivers: are device tree descriptions required for every device?

Greg Troxel <gdt%lexort.com@localhost> writes:

> I guess the key question here is the nature of i2c probing, in that once
> you have an i2c bus, can the kernel enumerate the devices by address and
> for an address determine the type.  This must be true for your no-config
> case to work, and I would think that with the line
>   bmx280thp* at iic? addr 0x76
> it would be ok.  However, it strikes me as irregular to configure an
> explicit address with a iic?, in that if you know where it is and want
> to hard-wire it fine, but knowing the address and that it's on some
> random bus that you don't know which doesn't quite make sense.  Unless
> you know where you wired it and you don't know how iic numbering is
> going to happen.

This will probably also work with that driver:

   bmx280thp* at iic? addr ?

if it is put in the config file and the driver will try 0x76 and 0x77 to
see if a device is there (or whatever the FDT indicates, which probably
means it does NOT try both in that case).  You will likely still have to
do a device tree overlay in 10.x and -current, but not in 9.x on the RPI
(and maybe all of the ARM) devices.  I really don't know why this is the
case for 9.x, but it may be related to the strange behavior of i2cscan
on 10.x and -current.

If you use gpioiic or just load the module the driver will probe for a
device at 0x76 and 0x77 and Generally Do The Right Thing.  This is the
common method I use with these devices, either just loading the module
and using the built in i2c port, or using gpioiic.

Brad Spencer - brad%anduin.eldar.org@localhost - KC8VKS - http://anduin.eldar.org

Home | Main Index | Thread Index | Old Index