[RFC PATCH v1 2/2] dm: i2c: use CONFIG_IS_ENABLED macro for DM_I2C and DM_I2C_GPIO
Heiko Schocher
hs at denx.de
Mon Feb 8 14:01:34 CET 2021
Hello Igor,
On 05.02.21 16:10, Igor Opaniuk wrote:
> From: Igor Opaniuk <igor.opaniuk at foundries.io>
>
> Use CONFIG_IS_ENABLED() macro, which provides more convenient
> way to check $(SPL)DM_I2C/$(SPL)DM_I2C_GPIO configs
> for both SPL and U-Boot proper.
>
> CONFIG_IS_ENABLED(DM_I2C) expands to:
> - 1 if CONFIG_SPL_BUILD is undefined and CONFIG_DM_I2C is set to 'y',
> - 1 if CONFIG_SPL_BUILD is defined and CONFIG_SPL_DM_I2C is set to 'y',
> - 0 otherwise.
>
> All occurences were replaced automatically using these bash cmds:
> $ find . -type f -exec sed -i
> 's/ifndef CONFIG_DM_I2C/if !CONFIG_IS_ENABLED(DM_I2C)/g' {} +
> $ find . -type f -exec sed -i
> 's/ifdef CONFIG_DM_I2C/if CONFIG_IS_ENABLED(DM_I2C)/g' {} +
> $ find . -type f -exec sed -i
> 's/defined(CONFIG_DM_I2C)/CONFIG_IS_ENABLED(DM_I2C)/g' {} +
> $ find . -type f -exec sed -i
> 's/ifndef CONFIG_DM_I2C_GPIO/if !CONFIG_IS_ENABLED(DM_I2C_GPIO)/g' {} +
> $ find . -type f -exec sed -i
> 's/ifdef CONFIG_DM_I2C_GPIO/if CONFIG_IS_ENABLED(DM_I2C_GPIO)/g' {} +
> $ find . -type f -exec sed -i
> 's/defined(CONFIG_DM_I2C_GPIO)/CONFIG_IS_ENABLED(DM_I2C_GPIO)/g' {} +
>
> Signed-off-by: Igor Opaniuk <igor.opaniuk at foundries.io>
>
> ---
>
> .../include/asm/arch-fsl-layerscape/config.h | 2 +-
> arch/arm/include/asm/arch-lpc32xx/i2c.h | 2 +-
> arch/arm/include/asm/mach-imx/mxc_i2c.h | 2 +-
> arch/arm/include/asm/omap_i2c.h | 2 +-
> arch/arm/mach-imx/i2c-mxv7.c | 2 +-
> arch/arm/mach-keystone/ddr3_spd.c | 2 +-
> arch/arm/mach-kirkwood/include/mach/config.h | 2 +-
> arch/arm/mach-omap2/am33xx/board.c | 2 +-
> arch/arm/mach-omap2/am33xx/clk_synthesizer.c | 6 +-
> arch/arm/mach-omap2/boot-common.c | 2 +-
> arch/arm/mach-omap2/clocks-common.c | 2 +-
> arch/arm/mach-sunxi/board.c | 2 +-
> arch/powerpc/include/asm/fsl_i2c.h | 2 +-
> board/freescale/common/dcu_sii9022a.c | 2 +-
> board/freescale/common/diu_ch7301.c | 2 +-
> board/freescale/common/emc2305.c | 4 +-
> board/freescale/common/qixis.c | 4 +-
> board/freescale/common/sys_eeprom.c | 20 ++--
> board/freescale/common/vid.c | 24 ++---
> board/freescale/common/vsc3316_3308.c | 10 +-
> board/freescale/ls1012aqds/ls1012aqds.c | 2 +-
> board/freescale/ls1012ardb/eth.c | 2 +-
> board/freescale/ls1012ardb/ls1012ardb.c | 12 +--
> board/freescale/ls1021aqds/dcu.c | 6 +-
> board/freescale/ls1021aqds/ls1021aqds.c | 2 +-
> board/freescale/ls1021atwr/ls1021atwr.c | 2 +-
> board/freescale/ls1028a/ls1028a.c | 2 +-
> board/freescale/ls1043aqds/ls1043aqds.c | 4 +-
> board/freescale/ls1046afrwy/ls1046afrwy.c | 2 +-
> board/freescale/ls1046aqds/ls1046aqds.c | 2 +-
> board/freescale/ls1088a/eth_ls1088aqds.c | 16 +--
> board/freescale/ls1088a/ls1088a.c | 60 ++++++------
> board/freescale/ls2080aqds/eth.c | 14 +--
> board/freescale/ls2080aqds/ls2080aqds.c | 4 +-
> board/freescale/ls2080ardb/ls2080ardb.c | 2 +-
> board/freescale/lx2160a/lx2160a.c | 2 +-
> board/freescale/p1010rdb/p1010rdb.c | 8 +-
> board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c | 2 +-
> board/freescale/t102xrdb/t102xrdb.c | 2 +-
> board/freescale/t208xqds/t208xqds.c | 2 +-
> board/friendlyarm/nanopi2/onewire.c | 6 +-
> board/keymile/common/ivm.c | 2 +-
> board/samsung/common/misc.c | 2 +-
> board/samsung/trats/trats.c | 10 +-
> board/samsung/trats2/trats2.c | 10 +-
> board/sunxi/board.c | 2 +-
> board/ti/am335x/board.c | 8 +-
> board/ti/am335x/mux.c | 2 +-
> board/ti/am43xx/board.c | 12 +--
> board/ti/common/board_detect.c | 4 +-
> board/ti/ks2_evm/board_k2g.c | 2 +-
> board/wandboard/wandboard.c | 4 +-
> cmd/eeprom.c | 6 +-
> cmd/i2c.c | 98 +++++++++----------
> doc/driver-model/i2c-howto.rst | 2 +-
> drivers/ddr/fsl/main.c | 8 +-
> drivers/i2c/davinci_i2c.c | 4 +-
> drivers/i2c/designware_i2c.c | 4 +-
> drivers/i2c/fsl_i2c.c | 6 +-
> drivers/i2c/ihs_i2c.c | 42 ++++----
> drivers/i2c/lpc32xx_i2c.c | 4 +-
> drivers/i2c/mv_i2c.c | 2 +-
> drivers/i2c/mvtwsi.c | 16 +--
> drivers/i2c/mxc_i2c.c | 4 +-
> drivers/i2c/omap24xx_i2c.c | 2 +-
> drivers/power/palmas.c | 2 +-
> drivers/power/pmic/pmic_tps62362.c | 6 +-
> drivers/power/pmic/pmic_tps65217.c | 14 +--
> drivers/power/pmic/pmic_tps65218.c | 4 +-
> drivers/power/pmic/pmic_tps65910.c | 6 +-
> drivers/power/twl4030.c | 2 +-
> drivers/power/twl6030.c | 2 +-
> drivers/tpm/tpm_atmel_twi.c | 6 +-
> drivers/usb/host/ohci-lpc32xx.c | 8 +-
> include/_exports.h | 2 +-
> include/config_fallbacks.h | 2 +-
> include/configs/MPC8548CDS.h | 2 +-
> include/configs/P1010RDB.h | 2 +-
> include/configs/P2041RDB.h | 2 +-
> include/configs/T102xRDB.h | 2 +-
> include/configs/T104xRDB.h | 2 +-
> include/configs/T208xQDS.h | 2 +-
> include/configs/T208xRDB.h | 2 +-
> include/configs/T4240RDB.h | 2 +-
> include/configs/am43xx_evm.h | 2 +-
> include/configs/corenet_ds.h | 2 +-
> include/configs/ls1012a_common.h | 2 +-
> include/configs/ls1021aiot.h | 2 +-
> include/configs/ls1021aqds.h | 2 +-
> include/configs/ls1021atsn.h | 2 +-
> include/configs/ls1021atwr.h | 2 +-
> include/configs/ls1028a_common.h | 2 +-
> include/configs/ls1043a_common.h | 2 +-
> include/configs/ls1046a_common.h | 2 +-
> include/configs/ls1088a_common.h | 2 +-
> include/configs/ls1088aqds.h | 2 +-
> include/configs/ls2080a_common.h | 2 +-
> include/configs/ls2080aqds.h | 2 +-
> include/configs/ls2080ardb.h | 2 +-
> include/configs/p1_p2_rdb_pc.h | 2 +-
> include/configs/sunxi-common.h | 2 +-
> include/configs/ti_armv7_common.h | 2 +-
> include/exports.h | 2 +-
> include/i2c.h | 2 +-
> include/palmas.h | 2 +-
> include/twl4030.h | 2 +-
> include/twl6030.h | 2 +-
> 107 files changed, 311 insertions(+), 311 deletions(-)
Puh, huge patchset...
In principle it looks good to me ... testing is here the big question.
Did you also made an azure build ?
Reviewed-by: Heiko Schocher <hs at denx.de>
bye,
Heiko
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: hs at denx.de
More information about the U-Boot
mailing list