From: Simon Glass <sjg@chromium.org>
To: U-Boot Mailing List <u-boot@lists.denx.de>
Cc: Tom Rini <trini@konsulko.com>, Heiko Schocher <hs@denx.de>,
Simon Glass <sjg@chromium.org>,
Jaehoon Chung <jh80.chung@samsung.com>,
Philip Richard Oberfichtner <pro@denx.de>
Subject: [PATCH 15/20] i2c: Remove I2C_SET_BUS()
Date: Thu, 18 Jul 2024 18:36:06 +0100 [thread overview]
Message-ID: <20240718173611.4014274-16-sjg@chromium.org> (raw)
In-Reply-To: <20240718173611.4014274-1-sjg@chromium.org>
This is very old, predating even the legacy I2C support, so drop it.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
drivers/power/power_i2c.c | 5 -----
include/i2c.h | 7 -------
2 files changed, 12 deletions(-)
diff --git a/drivers/power/power_i2c.c b/drivers/power/power_i2c.c
index a871fc41987..c2fc1c6b42f 100644
--- a/drivers/power/power_i2c.c
+++ b/drivers/power/power_i2c.c
@@ -33,8 +33,6 @@ int pmic_reg_write(struct pmic *p, u32 reg, u32 val)
p->bus);
return -ENXIO;
}
-#else /* Non DM I2C support - will be removed */
- I2C_SET_BUS(p->bus);
#endif
switch (pmic_i2c_tx_num) {
@@ -93,9 +91,6 @@ int pmic_reg_read(struct pmic *p, u32 reg, u32 *val)
return -ENXIO;
}
ret = dm_i2c_read(dev, reg, buf, pmic_i2c_tx_num);
-#else /* Non DM I2C support - will be removed */
- I2C_SET_BUS(p->bus);
- ret = i2c_read(pmic_i2c_addr, reg, 1, buf, pmic_i2c_tx_num);
#endif
if (ret)
return ret;
diff --git a/include/i2c.h b/include/i2c.h
index 45ca3d63e3f..1d1430b74a6 100644
--- a/include/i2c.h
+++ b/include/i2c.h
@@ -954,13 +954,6 @@ static inline unsigned int I2C_GET_BUS(void)
return I2C_MULTI_BUS ? i2c_get_bus_num() : 0;
}
-static inline void I2C_SET_BUS(unsigned int bus) __attribute__((always_inline));
-static inline void I2C_SET_BUS(unsigned int bus)
-{
- if (I2C_MULTI_BUS)
- i2c_set_bus_num(bus);
-}
-
/**
* Find the I2C bus number by given a FDT I2C node.
*
--
2.34.1
next prev parent reply other threads:[~2024-07-18 17:39 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-18 17:35 [PATCH 00/20] i2c: Chip away at some old code Simon Glass
2024-07-18 17:35 ` [PATCH 01/20] arm: Remove pg_wcom boards Simon Glass
2024-07-19 8:50 ` Anatolij Gustschin
2024-07-19 19:20 ` Anatolij Gustschin
2024-07-18 17:35 ` [PATCH 02/20] i2c: Remove board_i2c_init() Simon Glass
2024-07-18 17:35 ` [PATCH 03/20] i2c: Remove IC2_xxx enum Simon Glass
2024-07-18 17:35 ` [PATCH 04/20] i2c: Remove CFG_I2C_MULTI_BUS Simon Glass
2024-07-18 17:35 ` [PATCH 05/20] mips: malta: Drop CMD_DATE Simon Glass
2024-07-18 17:35 ` [PATCH 06/20] armv8: ls2085a: " Simon Glass
2024-07-18 17:35 ` [PATCH 07/20] mx28 / mx51: " Simon Glass
2024-07-18 17:35 ` [PATCH 08/20] MPC837XERDB: ethernut5: work_92105: " Simon Glass
2024-07-18 17:36 ` [PATCH 09/20] rtc: Drop CFG_SYS_RTC_BUS_NUM Simon Glass
2024-07-18 17:36 ` [PATCH 10/20] date: Drop the legacy I2C code Simon Glass
2024-07-18 17:36 ` [PATCH 11/20] keymile: Remove use of legacy I2C Simon Glass
2024-07-19 23:36 ` Anatolij Gustschin
2024-07-22 4:10 ` Heiko Schocher
2024-07-18 17:36 ` [PATCH 12/20] i2c: mxc: pg_wcom: Drop legacy I2c Simon Glass
2024-07-18 17:36 ` [PATCH 13/20] i2c: Drop reference to SYS_I2C_INIT_BOARD Simon Glass
2024-07-18 17:36 ` [PATCH 14/20] octeon: Drop OCTEON_I2C_FDT dead code Simon Glass
2024-07-18 17:36 ` Simon Glass [this message]
2024-07-18 17:36 ` [PATCH 16/20] i2c: Remove I2C_GET_BUS() Simon Glass
2024-07-18 17:36 ` [PATCH 17/20] i2c: Drop CFG_SYS_MAX_I2C_BUS Simon Glass
2024-07-18 17:36 ` [PATCH 18/20] i2c: Drop i2c_get_bus_num_fdt() and i2c_reset_port_fdt() Simon Glass
2024-07-18 17:36 ` [PATCH 19/20] i2c: Remove CFG_SYS_I2C_MAX_HOPS Simon Glass
2024-07-18 17:36 ` [PATCH 20/20] i2c: Remove CFG_SYS_I2C_DIRECT_BUS Simon Glass
2024-08-09 18:37 ` [PATCH 00/20] i2c: Chip away at some old code Simon Glass
2024-08-09 18:56 ` Tom Rini
2024-08-09 19:58 ` Anatolij Gustschin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240718173611.4014274-16-sjg@chromium.org \
--to=sjg@chromium.org \
--cc=hs@denx.de \
--cc=jh80.chung@samsung.com \
--cc=pro@denx.de \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.