Supporting different temp sensors at same I2C location

Joel Stanley joel at jms.id.au
Thu Dec 8 09:55:03 AEDT 2016


Hi Matt,

On Wed, Dec 7, 2016 at 8:21 AM, Matt Spinler
<mspinler at linux.vnet.ibm.com> wrote:
> On Witherspoon the hardware team is asking us(or maybe warning us?) if they
> can change the ambient temp/altitude sensor from the BMP280 to a DPS310,
> which would have the same I2C address.  Only the new one would ship.
>
> How are things like this usually handled in Linux?  Can both drivers be kept
> around and just activate based on their probing? Or do we just drop support
> for the old chip completely, though I haven't asked if this is OK yet.  Or
> should we push for having a different I2C address and then support both
> still?

We can keep both drivers around without issue. It takes a few KB of
extra flash space, but we are still a long way from overflowing the
space set aside for the kernel.

The harder bit is the device tree. We would need to update the device
tree depending on which piece of hardware is attached. I'm not sure
the best way to handle that.

Cheers,

Joel


More information about the openbmc mailing list