qemu-patch-raspberry4/include/hw/i2c
Markus Armbruster ec150c7e09 include: Make headers more self-contained
Back in 2016, we discussed[1] rules for headers, and these were
generally liked:

1. Have a carefully curated header that's included everywhere first.  We
   got that already thanks to Peter: osdep.h.

2. Headers should normally include everything they need beyond osdep.h.
   If exceptions are needed for some reason, they must be documented in
   the header.  If all that's needed from a header is typedefs, put
   those into qemu/typedefs.h instead of including the header.

3. Cyclic inclusion is forbidden.

This patch gets include/ closer to obeying 2.

It's actually extracted from my "[RFC] Baby steps towards saner
headers" series[2], which demonstrates a possible path towards
checking 2 automatically.  It passes the RFC test there.

[1] Message-ID: <87h9g8j57d.fsf@blackfin.pond.sub.org>
    https://lists.nongnu.org/archive/html/qemu-devel/2016-03/msg03345.html
[2] Message-Id: <20190711122827.18970-1-armbru@redhat.com>
    https://lists.nongnu.org/archive/html/qemu-devel/2019-07/msg02715.html

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20190812052359.30071-2-armbru@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-08-16 13:31:51 +02:00
..
aspeed_i2c.h include: Make headers more self-contained 2019-08-16 13:31:51 +02:00
bitbang_i2c.h hw/i2c/bitbang_i2c: Use in-place rather than malloc'd bitbang_i2c_interface struct 2019-07-03 10:51:35 +02:00
i2c.h i2c: Move bitbang_i2c.h to include/hw/i2c/ 2019-06-28 10:49:36 +02:00
imx_i2c.h Clean up ill-advised or unusual header guards 2016-07-12 16:20:46 +02:00
microbit_i2c.h arm: Stub out NRF51 TWI magnetometer/accelerometer detection 2019-01-29 11:46:03 +00:00
pm_smbus.h i2c:pm_smbus: Fix state transfer 2019-02-27 21:06:08 -06:00
ppc4xx_i2c.h hw/i2c/bitbang_i2c: Use in-place rather than malloc'd bitbang_i2c_interface struct 2019-07-03 10:51:35 +02:00
smbus_eeprom.h i2c: Split smbus into parts 2019-02-27 21:06:08 -06:00
smbus_master.h i2c: Split smbus into parts 2019-02-27 21:06:08 -06:00
smbus_slave.h i2c:smbus_slave: Add an SMBus vmstate structure 2019-02-27 21:06:08 -06:00