[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 0/2] Kconfig: Add an I2C_DEVICES device group
From: |
Peter Maydell |
Subject: |
[PATCH 0/2] Kconfig: Add an I2C_DEVICES device group |
Date: |
Tue, 8 Feb 2022 15:59:09 +0000 |
This patchset adds a new Kconfig "device group" for I2C devices which
a user might reasonably want to plug in to an arbitrary i2c bus via
the command line. This follows the approach we use for PCI devices:
generally-usable i2c devices have
default y if I2C_DEVICES
and board models with user-accessible i2c buses have
imply I2C_DEVICES
This means that when building a board model that pulls in the device
group, the devices are all compiled in and available for use.
(Previously they would happen to be present and usable only if some
other board that explicitly pulled that device in happened to also be
built into the same QEMU binary.)
I have been fairly conservative in marking devices as being in the
group and in marking board models as pulling in the group; feel free
to suggest changes.
In particular I've only added 'imply I2C_DEVICES' to arm boards.
Grepping through Kconfig files I only found the PPC boards e500 and
ppc44x that enable some kind of i2c controller anyway.
The immediate motivation here is that the recently added lsm303dlhc
magnetometer isn't currently built unless the user manually adds it
to their config, because as it happens no boards have it as a
hard-wired device.
thanks
-- PMM
Peter Maydell (2):
Kconfig: Add I2C_DEVICES device group
Kconfig: Add 'imply I2C_DEVICES' on boards with available i2c bus
docs/devel/kconfig.rst | 8 ++++++--
hw/arm/Kconfig | 10 ++++++++++
hw/i2c/Kconfig | 5 +++++
hw/rtc/Kconfig | 2 ++
hw/sensor/Kconfig | 5 +++++
5 files changed, 28 insertions(+), 2 deletions(-)
--
2.25.1
- [PATCH 0/2] Kconfig: Add an I2C_DEVICES device group,
Peter Maydell <=