* [PATCH v8 00/11] Congatec Board Controller: Add storage devices support
@ 2026-11-30 14:28 Thomas Richard (congatec GmbH)
2026-11-30 14:28 ` [PATCH v8 01/11] mfd: cgbc: Fix use of negative error code as valid session handle Thomas Richard (congatec GmbH)
` (11 more replies)
0 siblings, 12 replies; 20+ messages in thread
From: Thomas Richard (congatec GmbH) @ 2026-11-30 14:28 UTC (permalink / raw)
To: Lee Jones, Andi Shyti
Cc: Thomas Petazzoni, Werner Gartner, mfd, linux-kernel, linux-i2c,
Thomas Richard (congatec GmbH),
stable, Sashiko, Markus Haberlander
This is the 8th version. I just fixed a Sashiko's comment in PATCH 7.
Instead of checking if data returned by the Board Controller is zero, we
check if the computed frequency is zero to prevent a division by zero.
Best Regards,
Thomas
Signed-off-by: Thomas Richard (congatec GmbH) <thomas.richard@bootlin.com>
---
Changes in v8:
- PATCH 7: check if bus_frequency (instead of data) is zero.
- Link to v7: https://patch.msgid.link/20261127-cgbc-i2c-storage-devices-support-v7-0-d0e70fc57879@bootlin.com
Changes in v7:
- Rebased on top of for-mfd-next.
- PATCH 2: add Andi's RB tag.
- PATCH 3: add Andi's AB tag, also remove Cc and Fixes tags.
- PATCH 7: initialize data to '0' and prevent potential division by '0'.
- PATCH 10: make the I2C bus probe fail if device instantiation fails.
- PATCH 11: add Markus' patch.
- Link to v6: https://patch.msgid.link/20261117-cgbc-i2c-storage-devices-support-v6-0-bb070ad3e9aa@bootlin.com
Changes in v6:
- rebased on top of next-20261116.
- add Lee's I2C patch (PATCH 2).
- Link to v5: https://patch.msgid.link/20261103-cgbc-i2c-storage-devices-support-v5-0-ac11f23fae51@bootlin.com
Changes in v5:
- mfd: fix error message in case we fail to get session handle.
- fix I2C bus names earlier in the series.
- Link to v4: https://patch.msgid.link/20261002-cgbc-i2c-storage-devices-support-v4-0-eb42e0f1df59@bootlin.com
Changes in v4:
- Fix struct cgbc_i2c_platform_data comment (kernel-doc warning)
- Move struct cgbc_i2c_platform_data from linux/platform_data/i2c-cgbc.h to
linux/mfd/cgbc.h
- Use MFD_CELL_NAME macros.
- Link to v3: https://patch.msgid.link/20260911-cgbc-i2c-storage-devices-support-v3-0-594b53fbc5ea@bootlin.com
Changes in v3:
- rebased on v7.3-rc2
- use PLATFORM_DEVID_AUTO for child devices
- move I2C bus and I2C device definition in the MFD driver
- Link to v2: https://patch.msgid.link/20260811-cgbc-i2c-storage-devices-support-v2-0-3efa998e0ef5@bootlin.com
Changes in v2:
- i2c: fix typo in CGBC BIOS EEPROM label.
- mfd: make cgbc_devs const
- Link to v1: https://patch.msgid.link/20260804-cgbc-i2c-storage-devices-support-v1-0-fed38510671c@bootlin.com
To: Thomas Richard <thomas.richard@bootlin.com>
To: Lee Jones <lee@kernel.org>
To: Andi Shyti <andi.shyti@kernel.org>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Werner Gartner <Werner.Gartner@congatec.com>
Cc: mfd@lists.linux.dev
Cc: linux-kernel@vger.kernel.org
Cc: linux-i2c@vger.kernel.org
---
Lee Jones (1):
i2c: cgbc: Propagate hardware errors when polling read status
Markus Haberlander (1):
i2c: cgbc: Fetch the status of a write transfer
Thomas Richard (congatec GmbH) (9):
mfd: cgbc: Fix use of negative error code as valid session handle
i2c: cgbc: Use real I2C bus names
mfd: cgbc: Add I2C platform data
i2c: cgbc: Use plateform data to get bus ID and adapter name
mfd: cgbc: Use PLATFORM_DEVID_AUTO for child device registration
i2c: cgbc: Add support for fixed frequency buses
mfd: cgbc: Add virtual I2C bus support
mfd: cgbc: Add virtual storage devices on the virtual I2C bus
i2c: cgbc: Register known I2C devices on the bus
drivers/i2c/busses/i2c-cgbc.c | 164 ++++++++++++++++++++++--------------
drivers/mfd/cgbc-core.c | 187 +++++++++++++++++++++++++++++++++++++++---
include/linux/mfd/cgbc.h | 16 ++++
3 files changed, 294 insertions(+), 73 deletions(-)
---
base-commit: 5a8fc2b762fdd22698dc10449a960a892e43192e
change-id: 20260717-cgbc-i2c-storage-devices-support-b3ee7cea3320
Best regards,
--
Best Regards,
Thomas Richard
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH v8 01/11] mfd: cgbc: Fix use of negative error code as valid session handle
2026-11-30 14:28 [PATCH v8 00/11] Congatec Board Controller: Add storage devices support Thomas Richard (congatec GmbH)
@ 2026-11-30 14:28 ` Thomas Richard (congatec GmbH)
2026-11-30 14:28 ` [PATCH v8 02/11] i2c: cgbc: Propagate hardware errors when polling read status Thomas Richard (congatec GmbH)
` (10 subsequent siblings)
11 siblings, 0 replies; 20+ messages in thread
From: Thomas Richard (congatec GmbH) @ 2026-11-30 14:28 UTC (permalink / raw)
To: Lee Jones, Andi Shyti
Cc: Thomas Petazzoni, Werner Gartner, mfd, linux-kernel, linux-i2c,
Thomas Richard (congatec GmbH),
stable, Sashiko
The cgbc_session_command() return value was directly cast to u8 and used
as session handle without error checking. Casting a negative error to u8
produces a valid-looking session handle. So check if return value is
positive before to cast and use it.
Cc: stable@vger.kernel.org
Reported-by: Sashiko <sashiko-bot@kernel.org>
Closes: https://sashiko.dev/#/patchset/20260713-cgbc-core-fix-cgbc-remove-v1-1-79274ad62b3a%40bootlin.com?part=1
Fixes: 6f1067cfbee7 ("mfd: Add Congatec Board Controller driver")
Signed-off-by: Thomas Richard (congatec GmbH) <thomas.richard@bootlin.com>
---
drivers/mfd/cgbc-core.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/mfd/cgbc-core.c b/drivers/mfd/cgbc-core.c
index 8a63923d1912..1d5c99a38e85 100644
--- a/drivers/mfd/cgbc-core.c
+++ b/drivers/mfd/cgbc-core.c
@@ -103,7 +103,12 @@ static int cgbc_session_request(struct cgbc_device_data *cgbc)
if (ret)
return dev_err_probe(cgbc->dev, ret, "device not found or not ready\n");
- cgbc->session = cgbc_session_command(cgbc, CGBC_SESSION_CMD_REQUEST);
+ ret = cgbc_session_command(cgbc, CGBC_SESSION_CMD_REQUEST);
+ if (ret < 0)
+ return dev_err_probe(cgbc->dev, ret,
+ "failed to start a session with the Board Controller\n");
+
+ cgbc->session = ret;
/* The Board Controller sent us a wrong session handle, we cannot communicate with it */
if (cgbc->session < CGBC_SESSION_VALID_MIN || cgbc->session > CGBC_SESSION_VALID_MAX)
--
2.53.0
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH v8 02/11] i2c: cgbc: Propagate hardware errors when polling read status
2026-11-30 14:28 [PATCH v8 00/11] Congatec Board Controller: Add storage devices support Thomas Richard (congatec GmbH)
2026-11-30 14:28 ` [PATCH v8 01/11] mfd: cgbc: Fix use of negative error code as valid session handle Thomas Richard (congatec GmbH)
@ 2026-11-30 14:28 ` Thomas Richard (congatec GmbH)
2026-11-30 14:28 ` [PATCH v8 03/11] i2c: cgbc: Use real I2C bus names Thomas Richard (congatec GmbH)
` (9 subsequent siblings)
11 siblings, 0 replies; 20+ messages in thread
From: Thomas Richard (congatec GmbH) @ 2026-11-30 14:28 UTC (permalink / raw)
To: Lee Jones, Andi Shyti
Cc: Thomas Petazzoni, Werner Gartner, mfd, linux-kernel, linux-i2c,
Thomas Richard (congatec GmbH),
stable
From: Lee Jones <lee@kernel.org>
In cgbc_i2c_xfer_msg(), read_poll_timeout() uses the same ret variable
to store the polled return value of cgbc_i2c_get_status() and the
timeout result of the macro itself. When cgbc_i2c_get_status() returns
a negative error code (such as -EIO on an I2C NACK), the loop condition
ret != CGBC_I2C_STAT_BUSY evaluates to true and read_poll_timeout()
overwrites ret with 0. The driver then issues CGBC_I2C_CMD_DATA, which
completes with CGBC_STATUS_CMD_READY without populating msg->buf,
leaving uninitialised heap memory in the caller's read buffer.
Store the polled status in a separate variable, verify that it equals
CGBC_I2C_STAT_DAT, and check that CGBC_I2C_CMD_DATA returns the expected
number of bytes.
Fixes: 6894f640b8f3 ("i2c: Congatec Board Controller i2c bus driver")
Closes: https://sashiko.dev/#/bug/linux-66cbf4b1-a219-4012-969d-236417bf419a
Cc: stable@vger.kernel.org
Reviewed-by: Thomas Richard (congatec GmbH) <thomas.richard@bootlin.com>
Tested-by: Thomas Richard (congatec GmbH) <thomas.richard@bootlin.com>
Signed-off-by: Lee Jones <lee@kernel.org>
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Signed-off-by: Thomas Richard (congatec GmbH) <thomas.richard@bootlin.com>
---
drivers/i2c/busses/i2c-cgbc.c | 27 +++++++++++++++++++++------
1 file changed, 21 insertions(+), 6 deletions(-)
diff --git a/drivers/i2c/busses/i2c-cgbc.c b/drivers/i2c/busses/i2c-cgbc.c
index 164be9b99eb3..dfdb9ffc6447 100644
--- a/drivers/i2c/busses/i2c-cgbc.c
+++ b/drivers/i2c/busses/i2c-cgbc.c
@@ -205,9 +205,9 @@ static int cgbc_i2c_xfer_msg(struct i2c_adapter *adap)
struct cgbc_device_data *cgbc = i2c->cgbc;
struct i2c_msg *msg = i2c->msg;
u8 cmd[CGBC_I2C_CMD_SIZE];
- int ret, max_len, len, i;
+ int ret, status, max_len, len, i;
unsigned int cmd_len;
- u8 cmd_data;
+ u8 cmd_data, data_len;
struct cgbc_i2c_transfer xfer = {
.bus_id = algo_data->bus_id,
@@ -266,17 +266,32 @@ static int cgbc_i2c_xfer_msg(struct i2c_adapter *adap)
if (ret)
goto err;
- ret = read_poll_timeout(cgbc_i2c_get_status, ret,
- ret != CGBC_I2C_STAT_BUSY, 0,
+ ret = read_poll_timeout(cgbc_i2c_get_status, status,
+ status != CGBC_I2C_STAT_BUSY, 0,
2 * algo_data->read_maxtime_us, false, adap);
- if (ret < 0)
+ if (ret)
+ goto err;
+
+ if (status < 0) {
+ ret = status;
goto err;
+ }
+
+ if (status != CGBC_I2C_STAT_DAT) {
+ ret = -EIO;
+ goto err;
+ }
cmd_data = CGBC_I2C_CMD_DATA | algo_data->bus_id;
ret = cgbc_command(cgbc, &cmd_data, sizeof(cmd_data),
- msg->buf + i2c->pos, len, NULL);
+ msg->buf + i2c->pos, len, &data_len);
if (ret)
goto err;
+
+ if (data_len != len) {
+ ret = -EIO;
+ goto err;
+ }
}
if (len == (msg->len - i2c->pos)) {
--
2.53.0
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH v8 03/11] i2c: cgbc: Use real I2C bus names
2026-11-30 14:28 [PATCH v8 00/11] Congatec Board Controller: Add storage devices support Thomas Richard (congatec GmbH)
2026-11-30 14:28 ` [PATCH v8 01/11] mfd: cgbc: Fix use of negative error code as valid session handle Thomas Richard (congatec GmbH)
2026-11-30 14:28 ` [PATCH v8 02/11] i2c: cgbc: Propagate hardware errors when polling read status Thomas Richard (congatec GmbH)
@ 2026-11-30 14:28 ` Thomas Richard (congatec GmbH)
2026-11-30 14:28 ` [PATCH v8 04/11] mfd: cgbc: Add I2C platform data Thomas Richard (congatec GmbH)
` (8 subsequent siblings)
11 siblings, 0 replies; 20+ messages in thread
From: Thomas Richard (congatec GmbH) @ 2026-11-30 14:28 UTC (permalink / raw)
To: Lee Jones, Andi Shyti
Cc: Thomas Petazzoni, Werner Gartner, mfd, linux-kernel, linux-i2c,
Thomas Richard (congatec GmbH)
The adapter names described the expected purpose of the buses ("General
Purpose I2C adapter", "Power Management I2C adapter") on conga-sa7 board
rather than their actual names on the Board Controller.
Rename them to the real bus names "cgbc-i2c0" and "cgbc-ddc0", matching
the naming used by Congatec.
Acked-by: Andi Shyti <andi.shyti@kernel.org>
Signed-off-by: Thomas Richard (congatec GmbH) <thomas.richard@bootlin.com>
---
drivers/i2c/busses/i2c-cgbc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/i2c/busses/i2c-cgbc.c b/drivers/i2c/busses/i2c-cgbc.c
index dfdb9ffc6447..baf02bfe090c 100644
--- a/drivers/i2c/busses/i2c-cgbc.c
+++ b/drivers/i2c/busses/i2c-cgbc.c
@@ -358,7 +358,7 @@ static struct i2c_algo_cgbc_data cgbc_i2c_algo_data[] = {
static const struct i2c_adapter cgbc_i2c_adapter[] = {
{
.owner = THIS_MODULE,
- .name = "Congatec General Purpose I2C adapter",
+ .name = "cgbc-i2c0",
.class = I2C_CLASS_DEPRECATED,
.algo = &cgbc_i2c_algorithm,
.algo_data = &cgbc_i2c_algo_data[0],
@@ -366,7 +366,7 @@ static const struct i2c_adapter cgbc_i2c_adapter[] = {
},
{
.owner = THIS_MODULE,
- .name = "Congatec Power Management I2C adapter",
+ .name = "cgbc-ddc0",
.class = I2C_CLASS_DEPRECATED,
.algo = &cgbc_i2c_algorithm,
.algo_data = &cgbc_i2c_algo_data[1],
--
2.53.0
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH v8 04/11] mfd: cgbc: Add I2C platform data
2026-11-30 14:28 [PATCH v8 00/11] Congatec Board Controller: Add storage devices support Thomas Richard (congatec GmbH)
` (2 preceding siblings ...)
2026-11-30 14:28 ` [PATCH v8 03/11] i2c: cgbc: Use real I2C bus names Thomas Richard (congatec GmbH)
@ 2026-11-30 14:28 ` Thomas Richard (congatec GmbH)
2026-11-30 14:28 ` [PATCH v8 05/11] i2c: cgbc: Use plateform data to get bus ID and adapter name Thomas Richard (congatec GmbH)
` (7 subsequent siblings)
11 siblings, 0 replies; 20+ messages in thread
From: Thomas Richard (congatec GmbH) @ 2026-11-30 14:28 UTC (permalink / raw)
To: Lee Jones, Andi Shyti
Cc: Thomas Petazzoni, Werner Gartner, mfd, linux-kernel, linux-i2c,
Thomas Richard (congatec GmbH)
Define I2C platform data for each I2C bus in the cgbc MFD driver. Platform
data passes per-bus parameters to the I2C driver, rather than being defined
inside the i2c-cgbc driver itself. This makes the i2c-cgbc driver more
generic.
Signed-off-by: Thomas Richard (congatec GmbH) <thomas.richard@bootlin.com>
---
drivers/mfd/cgbc-core.c | 38 +++++++++++++++++++++++++++++---------
include/linux/mfd/cgbc.h | 10 ++++++++++
2 files changed, 39 insertions(+), 9 deletions(-)
diff --git a/drivers/mfd/cgbc-core.c b/drivers/mfd/cgbc-core.c
index 1d5c99a38e85..6c1fbff323e6 100644
--- a/drivers/mfd/cgbc-core.c
+++ b/drivers/mfd/cgbc-core.c
@@ -55,6 +55,35 @@
static struct platform_device *cgbc_pdev;
+static const struct cgbc_i2c_platform_data cgbc_i2c_i2c0_pdata = {
+ .name = "cgbc-i2c0",
+ .cgbc_bus_id = 0,
+};
+
+static const struct cgbc_i2c_platform_data cgbc_i2c_ddc0_pdata = {
+ .name = "cgbc-ddc0",
+ .cgbc_bus_id = 4,
+};
+
+static const struct mfd_cell cgbc_devs[] = {
+ MFD_CELL_NAME("cgbc-backlight"),
+ MFD_CELL_NAME("cgbc-gpio"),
+ MFD_CELL_NAME("cgbc-hwmon"),
+ {
+ .name = "cgbc-i2c",
+ .id = 1,
+ .platform_data = &cgbc_i2c_i2c0_pdata,
+ .pdata_size = sizeof(cgbc_i2c_i2c0_pdata),
+ },
+ {
+ .name = "cgbc-i2c",
+ .id = 2,
+ .platform_data = &cgbc_i2c_ddc0_pdata,
+ .pdata_size = sizeof(cgbc_i2c_ddc0_pdata),
+ },
+ MFD_CELL_NAME("cgbc-wdt"),
+};
+
/* Wait the Board Controller is ready to receive some session commands */
static int cgbc_wait_device(struct cgbc_device_data *cgbc)
{
@@ -236,15 +265,6 @@ int cgbc_command(struct cgbc_device_data *cgbc, void *cmd, unsigned int cmd_size
}
EXPORT_SYMBOL_GPL(cgbc_command);
-static const struct mfd_cell cgbc_devs[] = {
- { .name = "cgbc-wdt" },
- { .name = "cgbc-gpio" },
- { .name = "cgbc-i2c", .id = 1 },
- { .name = "cgbc-i2c", .id = 2 },
- { .name = "cgbc-hwmon" },
- { .name = "cgbc-backlight" },
-};
-
static int cgbc_map(struct cgbc_device_data *cgbc)
{
struct device *dev = cgbc->dev;
diff --git a/include/linux/mfd/cgbc.h b/include/linux/mfd/cgbc.h
index 91f501e76c8f..4b6e41b9ca4a 100644
--- a/include/linux/mfd/cgbc.h
+++ b/include/linux/mfd/cgbc.h
@@ -41,4 +41,14 @@ struct cgbc_device_data {
int cgbc_command(struct cgbc_device_data *cgbc, void *cmd, unsigned int cmd_size,
void *data, unsigned int data_size, u8 *status);
+/**
+ * struct cgbc_i2c_platform_data - Platform data of the CGBC I2C driver
+ * @name: I2C adapter name
+ * @cgbc_bus_id: I2C bus ID (from Board Controller point of view)
+ */
+struct cgbc_i2c_platform_data {
+ const char *name;
+ int cgbc_bus_id;
+};
+
#endif /*_LINUX_MFD_CGBC_H_*/
--
2.53.0
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH v8 05/11] i2c: cgbc: Use plateform data to get bus ID and adapter name
2026-11-30 14:28 [PATCH v8 00/11] Congatec Board Controller: Add storage devices support Thomas Richard (congatec GmbH)
` (3 preceding siblings ...)
2026-11-30 14:28 ` [PATCH v8 04/11] mfd: cgbc: Add I2C platform data Thomas Richard (congatec GmbH)
@ 2026-11-30 14:28 ` Thomas Richard (congatec GmbH)
2026-12-02 13:59 ` Andi Shyti
2026-11-30 14:28 ` [PATCH v8 06/11] mfd: cgbc: Use PLATFORM_DEVID_AUTO for child device registration Thomas Richard (congatec GmbH)
` (6 subsequent siblings)
11 siblings, 1 reply; 20+ messages in thread
From: Thomas Richard (congatec GmbH) @ 2026-11-30 14:28 UTC (permalink / raw)
To: Lee Jones, Andi Shyti
Cc: Thomas Petazzoni, Werner Gartner, mfd, linux-kernel, linux-i2c,
Thomas Richard (congatec GmbH)
Obtain the bus ID (from the BC point of view) and adapter name from
platform data. This allows the specific definitions to be removed, leaving
only a generic adapter definition.
Signed-off-by: Thomas Richard (congatec GmbH) <thomas.richard@bootlin.com>
---
drivers/i2c/busses/i2c-cgbc.c | 68 ++++++++++++++++---------------------------
1 file changed, 25 insertions(+), 43 deletions(-)
diff --git a/drivers/i2c/busses/i2c-cgbc.c b/drivers/i2c/busses/i2c-cgbc.c
index baf02bfe090c..50483bdc6730 100644
--- a/drivers/i2c/busses/i2c-cgbc.c
+++ b/drivers/i2c/busses/i2c-cgbc.c
@@ -12,9 +12,6 @@
#include <linux/module.h>
#include <linux/platform_device.h>
-#define CGBC_I2C_PRIMARY_BUS_ID 0
-#define CGBC_I2C_PM_BUS_ID 4
-
#define CGBC_I2C_CMD_START 0x40
#define CGBC_I2C_CMD_STAT 0x48
#define CGBC_I2C_CMD_DATA 0x50
@@ -60,11 +57,6 @@ enum cgbc_i2c_state {
CGBC_I2C_STATE_ERROR,
};
-struct i2c_algo_cgbc_data {
- u8 bus_id;
- unsigned long read_maxtime_us;
-};
-
struct cgbc_i2c_data {
struct device *dev;
struct cgbc_device_data *cgbc;
@@ -73,6 +65,8 @@ struct cgbc_i2c_data {
int nmsgs;
int pos;
enum cgbc_i2c_state state;
+ u8 bus_id;
+ unsigned long read_maxtime_us;
};
struct cgbc_i2c_transfer {
@@ -115,10 +109,9 @@ static unsigned int cgbc_i2c_reg_to_freq(u8 reg)
static int cgbc_i2c_get_status(struct i2c_adapter *adap)
{
- struct i2c_algo_cgbc_data *algo_data = adap->algo_data;
struct cgbc_i2c_data *i2c = i2c_get_adapdata(adap);
struct cgbc_device_data *cgbc = i2c->cgbc;
- u8 cmd = CGBC_I2C_CMD_STAT | algo_data->bus_id;
+ u8 cmd = CGBC_I2C_CMD_STAT | i2c->bus_id;
u8 status;
int ret;
@@ -132,7 +125,6 @@ static int cgbc_i2c_get_status(struct i2c_adapter *adap)
static int cgbc_i2c_set_frequency(struct i2c_adapter *adap,
unsigned int bus_frequency)
{
- struct i2c_algo_cgbc_data *algo_data = adap->algo_data;
struct cgbc_i2c_data *i2c = i2c_get_adapdata(adap);
struct cgbc_device_data *cgbc = i2c->cgbc;
u8 cmd[2], data;
@@ -144,7 +136,7 @@ static int cgbc_i2c_set_frequency(struct i2c_adapter *adap,
bus_frequency = I2C_MAX_STANDARD_MODE_FREQ;
}
- cmd[0] = CGBC_I2C_CMD_SPEED | algo_data->bus_id;
+ cmd[0] = CGBC_I2C_CMD_SPEED | i2c->bus_id;
cmd[1] = cgbc_i2c_freq_to_reg(bus_frequency);
ret = cgbc_command(cgbc, &cmd, sizeof(cmd), &data, 1, NULL);
@@ -170,7 +162,7 @@ static int cgbc_i2c_set_frequency(struct i2c_adapter *adap,
* can be read by a command is CGBC_I2C_READ_MAX_LEN.
* Therefore, calculate the max time to properly size the timeout.
*/
- algo_data->read_maxtime_us = (BITS_PER_BYTE + 1) * CGBC_I2C_READ_MAX_LEN
+ i2c->read_maxtime_us = (BITS_PER_BYTE + 1) * CGBC_I2C_READ_MAX_LEN
* USEC_PER_SEC / bus_frequency;
return 0;
@@ -200,7 +192,6 @@ static unsigned int cgbc_i2c_xfer_to_cmd(struct cgbc_i2c_transfer xfer, u8 *cmd)
static int cgbc_i2c_xfer_msg(struct i2c_adapter *adap)
{
- struct i2c_algo_cgbc_data *algo_data = adap->algo_data;
struct cgbc_i2c_data *i2c = i2c_get_adapdata(adap);
struct cgbc_device_data *cgbc = i2c->cgbc;
struct i2c_msg *msg = i2c->msg;
@@ -210,7 +201,7 @@ static int cgbc_i2c_xfer_msg(struct i2c_adapter *adap)
u8 cmd_data, data_len;
struct cgbc_i2c_transfer xfer = {
- .bus_id = algo_data->bus_id,
+ .bus_id = i2c->bus_id,
.addr = i2c_8bit_addr_from_msg(msg),
};
@@ -268,7 +259,7 @@ static int cgbc_i2c_xfer_msg(struct i2c_adapter *adap)
ret = read_poll_timeout(cgbc_i2c_get_status, status,
status != CGBC_I2C_STAT_BUSY, 0,
- 2 * algo_data->read_maxtime_us, false, adap);
+ 2 * i2c->read_maxtime_us, false, adap);
if (ret)
goto err;
@@ -282,7 +273,7 @@ static int cgbc_i2c_xfer_msg(struct i2c_adapter *adap)
goto err;
}
- cmd_data = CGBC_I2C_CMD_DATA | algo_data->bus_id;
+ cmd_data = CGBC_I2C_CMD_DATA | i2c->bus_id;
ret = cgbc_command(cgbc, &cmd_data, sizeof(cmd_data),
msg->buf + i2c->pos, len, &data_len);
if (ret)
@@ -350,44 +341,35 @@ static const struct i2c_algorithm cgbc_i2c_algorithm = {
.functionality = cgbc_i2c_func,
};
-static struct i2c_algo_cgbc_data cgbc_i2c_algo_data[] = {
- { .bus_id = CGBC_I2C_PRIMARY_BUS_ID },
- { .bus_id = CGBC_I2C_PM_BUS_ID },
-};
-
-static const struct i2c_adapter cgbc_i2c_adapter[] = {
- {
- .owner = THIS_MODULE,
- .name = "cgbc-i2c0",
- .class = I2C_CLASS_DEPRECATED,
- .algo = &cgbc_i2c_algorithm,
- .algo_data = &cgbc_i2c_algo_data[0],
- .nr = -1,
- },
- {
- .owner = THIS_MODULE,
- .name = "cgbc-ddc0",
- .class = I2C_CLASS_DEPRECATED,
- .algo = &cgbc_i2c_algorithm,
- .algo_data = &cgbc_i2c_algo_data[1],
- .nr = -1,
- },
+static const struct i2c_adapter cgbc_i2c_adapter = {
+ .owner = THIS_MODULE,
+ .class = I2C_CLASS_DEPRECATED,
+ .algo = &cgbc_i2c_algorithm,
+ .nr = -1,
};
static int cgbc_i2c_probe(struct platform_device *pdev)
{
- struct cgbc_device_data *cgbc = dev_get_drvdata(pdev->dev.parent);
+ struct device *dev = &pdev->dev;
+ struct cgbc_device_data *cgbc = dev_get_drvdata(dev->parent);
+ struct cgbc_i2c_platform_data *pdata;
struct cgbc_i2c_data *i2c;
int ret;
- i2c = devm_kzalloc_obj(&pdev->dev, *i2c);
+ i2c = devm_kzalloc_obj(dev, *i2c);
if (!i2c)
return -ENOMEM;
+ pdata = dev_get_platdata(dev);
+ if (!pdata)
+ return dev_err_probe(dev, -ENODEV, "missing platform_data\n");
+
i2c->cgbc = cgbc;
- i2c->dev = &pdev->dev;
- i2c->adap = cgbc_i2c_adapter[pdev->id];
+ i2c->dev = dev;
+ i2c->adap = cgbc_i2c_adapter;
i2c->adap.dev.parent = i2c->dev;
+ i2c->bus_id = pdata->cgbc_bus_id;
+ strscpy(i2c->adap.name, pdata->name, sizeof(i2c->adap.name));
i2c_set_adapdata(&i2c->adap, i2c);
platform_set_drvdata(pdev, i2c);
--
2.53.0
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH v8 06/11] mfd: cgbc: Use PLATFORM_DEVID_AUTO for child device registration
2026-11-30 14:28 [PATCH v8 00/11] Congatec Board Controller: Add storage devices support Thomas Richard (congatec GmbH)
` (4 preceding siblings ...)
2026-11-30 14:28 ` [PATCH v8 05/11] i2c: cgbc: Use plateform data to get bus ID and adapter name Thomas Richard (congatec GmbH)
@ 2026-11-30 14:28 ` Thomas Richard (congatec GmbH)
2026-11-30 14:28 ` [PATCH v8 07/11] i2c: cgbc: Add support for fixed frequency buses Thomas Richard (congatec GmbH)
` (5 subsequent siblings)
11 siblings, 0 replies; 20+ messages in thread
From: Thomas Richard (congatec GmbH) @ 2026-11-30 14:28 UTC (permalink / raw)
To: Lee Jones, Andi Shyti
Cc: Thomas Petazzoni, Werner Gartner, mfd, linux-kernel, linux-i2c,
Thomas Richard (congatec GmbH)
Since parameters are now passed to the i2c-cgbc driver via platform
data, the I2C driver no longer depends on the platform device ID to probe
the correct I2C buses. Drop the hardcoded cell ID in favor of
PLATFORM_DEVID_AUTO.
Signed-off-by: Thomas Richard (congatec GmbH) <thomas.richard@bootlin.com>
---
drivers/mfd/cgbc-core.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/mfd/cgbc-core.c b/drivers/mfd/cgbc-core.c
index 6c1fbff323e6..dbd6a7539d8e 100644
--- a/drivers/mfd/cgbc-core.c
+++ b/drivers/mfd/cgbc-core.c
@@ -71,13 +71,11 @@ static const struct mfd_cell cgbc_devs[] = {
MFD_CELL_NAME("cgbc-hwmon"),
{
.name = "cgbc-i2c",
- .id = 1,
.platform_data = &cgbc_i2c_i2c0_pdata,
.pdata_size = sizeof(cgbc_i2c_i2c0_pdata),
},
{
.name = "cgbc-i2c",
- .id = 2,
.platform_data = &cgbc_i2c_ddc0_pdata,
.pdata_size = sizeof(cgbc_i2c_ddc0_pdata),
},
@@ -350,8 +348,8 @@ static int cgbc_init_device(struct cgbc_device_data *cgbc)
if (ret)
goto release_session;
- ret = mfd_add_devices(cgbc->dev, -1, cgbc_devs, ARRAY_SIZE(cgbc_devs),
- NULL, 0, NULL);
+ ret = mfd_add_devices(cgbc->dev, PLATFORM_DEVID_AUTO, cgbc_devs,
+ ARRAY_SIZE(cgbc_devs), NULL, 0, NULL);
if (ret)
goto release_session;
--
2.53.0
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH v8 07/11] i2c: cgbc: Add support for fixed frequency buses
2026-11-30 14:28 [PATCH v8 00/11] Congatec Board Controller: Add storage devices support Thomas Richard (congatec GmbH)
` (5 preceding siblings ...)
2026-11-30 14:28 ` [PATCH v8 06/11] mfd: cgbc: Use PLATFORM_DEVID_AUTO for child device registration Thomas Richard (congatec GmbH)
@ 2026-11-30 14:28 ` Thomas Richard (congatec GmbH)
2026-12-02 14:05 ` Andi Shyti
2026-11-30 14:28 ` [PATCH v8 08/11] mfd: cgbc: Add virtual I2C bus support Thomas Richard (congatec GmbH)
` (4 subsequent siblings)
11 siblings, 1 reply; 20+ messages in thread
From: Thomas Richard (congatec GmbH) @ 2026-11-30 14:28 UTC (permalink / raw)
To: Lee Jones, Andi Shyti
Cc: Thomas Petazzoni, Werner Gartner, mfd, linux-kernel, linux-i2c,
Thomas Richard (congatec GmbH)
Some I2C buses run at a fixed frequency. Add a fixed_freq flag to struct
cgbc_i2c_platform_data to identify them. But the frequency is still needed
to compute read_maxtime_us, so split cgbc_i2c_set_frequency() into two
functions:
- cgbc_i2c_set_frequency(): sets the bus frequency (skipped for
fixed-frequency buses).
- cgbc_i2c_get_frequency(): reads the bus frequency and computes
read_maxtime_us.
Signed-off-by: Thomas Richard (congatec GmbH) <thomas.richard@bootlin.com>
---
drivers/i2c/busses/i2c-cgbc.c | 37 ++++++++++++++++++++++++++-----------
include/linux/mfd/cgbc.h | 2 ++
2 files changed, 28 insertions(+), 11 deletions(-)
diff --git a/drivers/i2c/busses/i2c-cgbc.c b/drivers/i2c/busses/i2c-cgbc.c
index 50483bdc6730..5b39778cc11d 100644
--- a/drivers/i2c/busses/i2c-cgbc.c
+++ b/drivers/i2c/busses/i2c-cgbc.c
@@ -128,7 +128,6 @@ static int cgbc_i2c_set_frequency(struct i2c_adapter *adap,
struct cgbc_i2c_data *i2c = i2c_get_adapdata(adap);
struct cgbc_device_data *cgbc = i2c->cgbc;
u8 cmd[2], data;
- int ret;
if (bus_frequency > CGBC_I2C_FREQ_MAX_HZ ||
bus_frequency < CGBC_I2C_FREQ_MIN_HZ) {
@@ -139,21 +138,31 @@ static int cgbc_i2c_set_frequency(struct i2c_adapter *adap,
cmd[0] = CGBC_I2C_CMD_SPEED | i2c->bus_id;
cmd[1] = cgbc_i2c_freq_to_reg(bus_frequency);
- ret = cgbc_command(cgbc, &cmd, sizeof(cmd), &data, 1, NULL);
- if (ret)
- return dev_err_probe(i2c->dev, ret,
- "Failed to initialize I2C bus %s",
- adap->name);
+ return cgbc_command(cgbc, &cmd, sizeof(cmd), &data, 1, NULL);
+}
- cmd[1] = 0x00;
+static int cgbc_i2c_get_frequency(struct i2c_adapter *adap)
+{
+ struct cgbc_i2c_data *i2c = i2c_get_adapdata(adap);
+ struct cgbc_device_data *cgbc = i2c->cgbc;
+ u8 cmd[2] = { CGBC_I2C_CMD_SPEED | i2c->bus_id };
+ unsigned int bus_frequency;
+ u8 data = 0;
+ int ret;
ret = cgbc_command(cgbc, &cmd, sizeof(cmd), &data, 1, NULL);
if (ret)
- return dev_err_probe(i2c->dev, ret,
- "Failed to get I2C bus frequency");
+ return ret;
bus_frequency = cgbc_i2c_reg_to_freq(data);
+ /*
+ * A zero frequency is invalid and will cause a division by zero when
+ * computing read_maxtime_us. Return an error instead.
+ */
+ if (!bus_frequency)
+ return -EIO;
+
dev_dbg(i2c->dev, "%s is running at %d Hz\n", adap->name, bus_frequency);
/*
@@ -373,9 +382,15 @@ static int cgbc_i2c_probe(struct platform_device *pdev)
i2c_set_adapdata(&i2c->adap, i2c);
platform_set_drvdata(pdev, i2c);
- ret = cgbc_i2c_set_frequency(&i2c->adap, I2C_MAX_STANDARD_MODE_FREQ);
+ if (!pdata->fixed_freq) {
+ ret = cgbc_i2c_set_frequency(&i2c->adap, I2C_MAX_STANDARD_MODE_FREQ);
+ if (ret)
+ return dev_err_probe(dev, ret, "Failed to set I2C bus frequency");
+ }
+
+ ret = cgbc_i2c_get_frequency(&i2c->adap);
if (ret)
- return ret;
+ return dev_err_probe(i2c->dev, ret, "Failed to get I2C bus frequency");
return i2c_add_numbered_adapter(&i2c->adap);
}
diff --git a/include/linux/mfd/cgbc.h b/include/linux/mfd/cgbc.h
index 4b6e41b9ca4a..63fdf16fec95 100644
--- a/include/linux/mfd/cgbc.h
+++ b/include/linux/mfd/cgbc.h
@@ -45,10 +45,12 @@ int cgbc_command(struct cgbc_device_data *cgbc, void *cmd, unsigned int cmd_size
* struct cgbc_i2c_platform_data - Platform data of the CGBC I2C driver
* @name: I2C adapter name
* @cgbc_bus_id: I2C bus ID (from Board Controller point of view)
+ * @fixed_freq: I2C bus has a fixed frequency
*/
struct cgbc_i2c_platform_data {
const char *name;
int cgbc_bus_id;
+ bool fixed_freq;
};
#endif /*_LINUX_MFD_CGBC_H_*/
--
2.53.0
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH v8 08/11] mfd: cgbc: Add virtual I2C bus support
2026-11-30 14:28 [PATCH v8 00/11] Congatec Board Controller: Add storage devices support Thomas Richard (congatec GmbH)
` (6 preceding siblings ...)
2026-11-30 14:28 ` [PATCH v8 07/11] i2c: cgbc: Add support for fixed frequency buses Thomas Richard (congatec GmbH)
@ 2026-11-30 14:28 ` Thomas Richard (congatec GmbH)
2026-11-30 14:28 ` [PATCH v8 09/11] mfd: cgbc: Add virtual storage devices on the virtual I2C bus Thomas Richard (congatec GmbH)
` (3 subsequent siblings)
11 siblings, 0 replies; 20+ messages in thread
From: Thomas Richard (congatec GmbH) @ 2026-11-30 14:28 UTC (permalink / raw)
To: Lee Jones, Andi Shyti
Cc: Thomas Petazzoni, Werner Gartner, mfd, linux-kernel, linux-i2c,
Thomas Richard (congatec GmbH)
Internally the Board Controller has a virtual I2C bus with some virtual
storage devices (EEPROM and RAM). So add a new I2C cell for this I2C
virtual bus.
Signed-off-by: Thomas Richard (congatec GmbH) <thomas.richard@bootlin.com>
---
drivers/mfd/cgbc-core.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/mfd/cgbc-core.c b/drivers/mfd/cgbc-core.c
index dbd6a7539d8e..db22674affbd 100644
--- a/drivers/mfd/cgbc-core.c
+++ b/drivers/mfd/cgbc-core.c
@@ -65,6 +65,12 @@ static const struct cgbc_i2c_platform_data cgbc_i2c_ddc0_pdata = {
.cgbc_bus_id = 4,
};
+static const struct cgbc_i2c_platform_data cgbc_i2c_i2cv_pdata = {
+ .name = "cgbc-i2cv",
+ .cgbc_bus_id = 3,
+ .fixed_freq = true,
+};
+
static const struct mfd_cell cgbc_devs[] = {
MFD_CELL_NAME("cgbc-backlight"),
MFD_CELL_NAME("cgbc-gpio"),
@@ -79,6 +85,11 @@ static const struct mfd_cell cgbc_devs[] = {
.platform_data = &cgbc_i2c_ddc0_pdata,
.pdata_size = sizeof(cgbc_i2c_ddc0_pdata),
},
+ {
+ .name = "cgbc-i2c",
+ .platform_data = &cgbc_i2c_i2cv_pdata,
+ .pdata_size = sizeof(cgbc_i2c_i2cv_pdata),
+ },
MFD_CELL_NAME("cgbc-wdt"),
};
--
2.53.0
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH v8 09/11] mfd: cgbc: Add virtual storage devices on the virtual I2C bus
2026-11-30 14:28 [PATCH v8 00/11] Congatec Board Controller: Add storage devices support Thomas Richard (congatec GmbH)
` (7 preceding siblings ...)
2026-11-30 14:28 ` [PATCH v8 08/11] mfd: cgbc: Add virtual I2C bus support Thomas Richard (congatec GmbH)
@ 2026-11-30 14:28 ` Thomas Richard (congatec GmbH)
2026-11-30 14:28 ` [PATCH v8 10/11] i2c: cgbc: Register known I2C devices on the bus Thomas Richard (congatec GmbH)
` (2 subsequent siblings)
11 siblings, 0 replies; 20+ messages in thread
From: Thomas Richard (congatec GmbH) @ 2026-11-30 14:28 UTC (permalink / raw)
To: Lee Jones, Andi Shyti
Cc: Thomas Petazzoni, Werner Gartner, mfd, linux-kernel, linux-i2c,
Thomas Richard (congatec GmbH)
Add support for virtual storage devices exposed by the Board Controller
on its virtual I2C bus. There are two device types: EEPROM for persistent
storage and RAM for non-persistent storage:
- Secure Data EEPROM (64 bytes, RO): static and dynamic board info
- BIOS EEPROM (32 bytes, RW): reserved for BIOS applications
- BC EEPROM (32 bytes, RO): Board Controller operational params
- User EEPROM (32 bytes, RW): user applications
- BIOS RAM (32 bytes, RW): reserved for BIOS applications
- BC RAM (8 bytes, RO): Board Controller operational params
- User RAM (16 bytes, RW): user applications
Use the at24 driver with the 24c01 entry (the most generic one) for all
virtual storage devices, customizing parameters via software_node
properties (size, pagesize, read-only flag, label).
Signed-off-by: Thomas Richard (congatec GmbH) <thomas.richard@bootlin.com>
---
drivers/mfd/cgbc-core.c | 129 +++++++++++++++++++++++++++++++++++++++++++++++
include/linux/mfd/cgbc.h | 4 ++
2 files changed, 133 insertions(+)
diff --git a/drivers/mfd/cgbc-core.c b/drivers/mfd/cgbc-core.c
index db22674affbd..ce90d7315007 100644
--- a/drivers/mfd/cgbc-core.c
+++ b/drivers/mfd/cgbc-core.c
@@ -13,10 +13,12 @@
#include <linux/dmi.h>
#include <linux/iopoll.h>
+#include <linux/i2c.h>
#include <linux/mfd/cgbc.h>
#include <linux/mfd/core.h>
#include <linux/module.h>
#include <linux/platform_device.h>
+#include <linux/property.h>
#include <linux/sysfs.h>
#define CGBC_IO_SESSION_BASE 0x0E20
@@ -55,6 +57,131 @@
static struct platform_device *cgbc_pdev;
+static const struct property_entry cgbc_secure_data_eeprom_props[] = {
+ PROPERTY_ENTRY_U32("size", 64),
+ PROPERTY_ENTRY_U32("pagesize", 1),
+ PROPERTY_ENTRY_BOOL("read-only"),
+ PROPERTY_ENTRY_STRING("label", "cgbc-secure-data-eeprom"),
+ { }
+};
+
+static const struct software_node cgbc_secure_data_eeprom_node = {
+ .properties = cgbc_secure_data_eeprom_props,
+};
+
+static const struct property_entry cgbc_bc_eeprom_props[] = {
+ PROPERTY_ENTRY_U32("size", 32),
+ PROPERTY_ENTRY_U32("pagesize", 1),
+ PROPERTY_ENTRY_BOOL("read-only"),
+ PROPERTY_ENTRY_STRING("label", "cgbc-bc-eeprom"),
+ { }
+};
+
+static const struct software_node cgbc_bc_eeprom_node = {
+ .properties = cgbc_bc_eeprom_props,
+};
+
+static const struct property_entry cgbc_user_eeprom_props[] = {
+ PROPERTY_ENTRY_U32("size", 32),
+ PROPERTY_ENTRY_U32("pagesize", 1),
+ PROPERTY_ENTRY_STRING("label", "cgbc-user-eeprom"),
+ { }
+};
+
+static const struct software_node cgbc_user_eeprom_node = {
+ .properties = cgbc_user_eeprom_props,
+};
+
+static const struct property_entry cgbc_bios_eeprom_props[] = {
+ PROPERTY_ENTRY_U32("size", 32),
+ PROPERTY_ENTRY_U32("pagesize", 1),
+ PROPERTY_ENTRY_STRING("label", "cgbc-bios-eeprom"),
+ { }
+};
+
+static const struct software_node cgbc_bios_eeprom_node = {
+ .properties = cgbc_bios_eeprom_props,
+};
+
+static const struct property_entry cgbc_bc_ram_props[] = {
+ PROPERTY_ENTRY_U32("size", 8),
+ PROPERTY_ENTRY_U32("pagesize", 1),
+ PROPERTY_ENTRY_BOOL("read-only"),
+ PROPERTY_ENTRY_STRING("label", "cgbc-bc-ram"),
+ { }
+};
+
+static const struct software_node cgbc_bc_ram_node = {
+ .properties = cgbc_bc_ram_props,
+};
+
+static const struct property_entry cgbc_user_ram_props[] = {
+ PROPERTY_ENTRY_U32("size", 16),
+ PROPERTY_ENTRY_U32("pagesize", 1),
+ PROPERTY_ENTRY_STRING("label", "cgbc-user-ram"),
+ { }
+};
+
+static const struct software_node cgbc_user_ram_node = {
+ .properties = cgbc_user_ram_props,
+};
+
+static const struct property_entry cgbc_bios_ram_props[] = {
+ PROPERTY_ENTRY_U32("size", 32),
+ PROPERTY_ENTRY_U32("pagesize", 1),
+ PROPERTY_ENTRY_STRING("label", "cgbc-bios-ram"),
+ { }
+};
+
+static const struct software_node cgbc_bios_ram_node = {
+ .properties = cgbc_bios_ram_props,
+};
+
+static const struct i2c_board_info cgbc_i2c_i2cv_board_info[] = {
+ {
+ .type = "24c01",
+ .addr = 0x40,
+ .dev_name = "cgbc-secure-data-eeprom",
+ .swnode = &cgbc_secure_data_eeprom_node,
+ },
+ {
+ .type = "24c01",
+ .addr = 0x48,
+ .dev_name = "cgbc-bc-eeprom",
+ .swnode = &cgbc_bc_eeprom_node,
+ },
+ {
+ .type = "24c01",
+ .addr = 0x50,
+ .dev_name = "cgbc-user-eeprom",
+ .swnode = &cgbc_user_eeprom_node,
+ },
+ {
+ .type = "24c01",
+ .addr = 0x58,
+ .dev_name = "cgbc-bios-eeprom",
+ .swnode = &cgbc_bios_eeprom_node,
+ },
+ {
+ .type = "24c01",
+ .addr = 0x60,
+ .dev_name = "cgbc-bc-ram",
+ .swnode = &cgbc_bc_ram_node,
+ },
+ {
+ .type = "24c01",
+ .addr = 0x68,
+ .dev_name = "cgbc-user-ram",
+ .swnode = &cgbc_user_ram_node,
+ },
+ {
+ .type = "24c01",
+ .addr = 0x70,
+ .dev_name = "cgbc-bios-ram",
+ .swnode = &cgbc_bios_ram_node,
+ }
+};
+
static const struct cgbc_i2c_platform_data cgbc_i2c_i2c0_pdata = {
.name = "cgbc-i2c0",
.cgbc_bus_id = 0,
@@ -69,6 +196,8 @@ static const struct cgbc_i2c_platform_data cgbc_i2c_i2cv_pdata = {
.name = "cgbc-i2cv",
.cgbc_bus_id = 3,
.fixed_freq = true,
+ .devices = cgbc_i2c_i2cv_board_info,
+ .nb_devices = ARRAY_SIZE(cgbc_i2c_i2cv_board_info),
};
static const struct mfd_cell cgbc_devs[] = {
diff --git a/include/linux/mfd/cgbc.h b/include/linux/mfd/cgbc.h
index 63fdf16fec95..46e8b583bdb8 100644
--- a/include/linux/mfd/cgbc.h
+++ b/include/linux/mfd/cgbc.h
@@ -46,11 +46,15 @@ int cgbc_command(struct cgbc_device_data *cgbc, void *cmd, unsigned int cmd_size
* @name: I2C adapter name
* @cgbc_bus_id: I2C bus ID (from Board Controller point of view)
* @fixed_freq: I2C bus has a fixed frequency
+ * @nb_devices: number of devices to add when the driver is probed
+ * @devices: devices to add
*/
struct cgbc_i2c_platform_data {
const char *name;
int cgbc_bus_id;
bool fixed_freq;
+ int nb_devices;
+ struct i2c_board_info const *devices;
};
#endif /*_LINUX_MFD_CGBC_H_*/
--
2.53.0
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH v8 10/11] i2c: cgbc: Register known I2C devices on the bus
2026-11-30 14:28 [PATCH v8 00/11] Congatec Board Controller: Add storage devices support Thomas Richard (congatec GmbH)
` (8 preceding siblings ...)
2026-11-30 14:28 ` [PATCH v8 09/11] mfd: cgbc: Add virtual storage devices on the virtual I2C bus Thomas Richard (congatec GmbH)
@ 2026-11-30 14:28 ` Thomas Richard (congatec GmbH)
2026-12-02 14:18 ` Andi Shyti
2026-11-30 14:28 ` [PATCH v8 11/11] i2c: cgbc: Fetch the status of a write transfer Thomas Richard (congatec GmbH)
2026-12-02 14:25 ` [PATCH v8 00/11] Congatec Board Controller: Add storage devices support Andi Shyti
11 siblings, 1 reply; 20+ messages in thread
From: Thomas Richard (congatec GmbH) @ 2026-11-30 14:28 UTC (permalink / raw)
To: Lee Jones, Andi Shyti
Cc: Thomas Petazzoni, Werner Gartner, mfd, linux-kernel, linux-i2c,
Thomas Richard (congatec GmbH)
Register any I2C devices defined for the bus at probe time.
Signed-off-by: Thomas Richard (congatec GmbH) <thomas.richard@bootlin.com>
---
drivers/i2c/busses/i2c-cgbc.c | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/drivers/i2c/busses/i2c-cgbc.c b/drivers/i2c/busses/i2c-cgbc.c
index 5b39778cc11d..c936b650a2d7 100644
--- a/drivers/i2c/busses/i2c-cgbc.c
+++ b/drivers/i2c/busses/i2c-cgbc.c
@@ -363,7 +363,8 @@ static int cgbc_i2c_probe(struct platform_device *pdev)
struct cgbc_device_data *cgbc = dev_get_drvdata(dev->parent);
struct cgbc_i2c_platform_data *pdata;
struct cgbc_i2c_data *i2c;
- int ret;
+ struct i2c_client *client;
+ int ret, i;
i2c = devm_kzalloc_obj(dev, *i2c);
if (!i2c)
@@ -392,7 +393,20 @@ static int cgbc_i2c_probe(struct platform_device *pdev)
if (ret)
return dev_err_probe(i2c->dev, ret, "Failed to get I2C bus frequency");
- return i2c_add_numbered_adapter(&i2c->adap);
+ ret = i2c_add_numbered_adapter(&i2c->adap);
+ if (ret)
+ return ret;
+
+ /* Add known devices to the bus */
+ for (i = 0; i < pdata->nb_devices; i++) {
+ client = i2c_new_client_device(&i2c->adap, pdata->devices + i);
+ if (IS_ERR(client)) {
+ i2c_del_adapter(&i2c->adap);
+ return PTR_ERR(client);
+ }
+ }
+
+ return 0;
}
static void cgbc_i2c_remove(struct platform_device *pdev)
--
2.53.0
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH v8 11/11] i2c: cgbc: Fetch the status of a write transfer
2026-11-30 14:28 [PATCH v8 00/11] Congatec Board Controller: Add storage devices support Thomas Richard (congatec GmbH)
` (9 preceding siblings ...)
2026-11-30 14:28 ` [PATCH v8 10/11] i2c: cgbc: Register known I2C devices on the bus Thomas Richard (congatec GmbH)
@ 2026-11-30 14:28 ` Thomas Richard (congatec GmbH)
2026-12-02 14:21 ` Andi Shyti
2026-12-02 14:25 ` [PATCH v8 00/11] Congatec Board Controller: Add storage devices support Andi Shyti
11 siblings, 1 reply; 20+ messages in thread
From: Thomas Richard (congatec GmbH) @ 2026-11-30 14:28 UTC (permalink / raw)
To: Lee Jones, Andi Shyti
Cc: Thomas Petazzoni, Werner Gartner, mfd, linux-kernel, linux-i2c,
Thomas Richard (congatec GmbH),
Markus Haberlander, stable
From: Markus Haberlander <markus.haberlander@rosenberger.com>
A write transfer sends the I2C command to the board controller and
returns without reading the controller's I2C status, while a read polls
the status until the controller is no longer busy. The status of a write
is therefore never fetched:
- the write reports success before the bus transfer has finished, and
an error such as a NAK is only reported by the next transfer;
- the controller keeps the status of the last write pending. On a
conga-PA7 (BIOS PA70R026, board controller CGBCP032), a board reset
with a write status pending does not power the board up again: after
a reboot that follows a write on the general purpose bus, the board
stays off until it is power cycled.
Read the status after a write as well, as the read path does: poll until
the controller is no longer busy, return the error it reports, and treat
any state other than idle as an error.
Tested on a conga-PA7 with v6.18.64 and "i2c: cgbc: Propagate hardware
errors when polling read status": without this patch, a write to an
absent address returns success, the next read fails, and a reboot after
a write does not come back. With it, the write itself fails, the next
transfer succeeds, and 14 reboots, each right after an acknowledged or a
NAKed write, all came back.
The patch and this changelog were drafted with the help of Claude
Opus 5.5 and reviewed and tested by me.
Fixes: 6894f640b8f3 ("i2c: Congatec Board Controller i2c bus driver")
Cc: stable@vger.kernel.org
Signed-off-by: Markus Haberlander <markus.haberlander@rosenberger.com>
Reviewed-by: Thomas Richard (congatec GmbH) <thomas.richard@bootlin.com>
Tested-by: Thomas Richard (congatec GmbH) <thomas.richard@bootlin.com>
[Thomas: Use USEC_PER_SEC]
Signed-off-by: Thomas Richard (congatec GmbH) <thomas.richard@bootlin.com>
---
drivers/i2c/busses/i2c-cgbc.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/drivers/i2c/busses/i2c-cgbc.c b/drivers/i2c/busses/i2c-cgbc.c
index c936b650a2d7..cf4a55506148 100644
--- a/drivers/i2c/busses/i2c-cgbc.c
+++ b/drivers/i2c/busses/i2c-cgbc.c
@@ -254,6 +254,22 @@ static int cgbc_i2c_xfer_msg(struct i2c_adapter *adap)
ret = cgbc_command(cgbc, &cmd, cmd_len, NULL, 0, NULL);
if (ret)
goto err;
+
+ ret = read_poll_timeout(cgbc_i2c_get_status, status,
+ status != CGBC_I2C_STAT_BUSY, 0,
+ USEC_PER_SEC, false, adap);
+ if (ret)
+ goto err;
+
+ if (status < 0) {
+ ret = status;
+ goto err;
+ }
+
+ if (status != CGBC_I2C_STAT_IDL) {
+ ret = -EIO;
+ goto err;
+ }
} else if (i2c->state == CGBC_I2C_STATE_READ) {
xfer.write = 0;
xfer.read = len;
--
2.53.0
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v8 05/11] i2c: cgbc: Use plateform data to get bus ID and adapter name
2026-11-30 14:28 ` [PATCH v8 05/11] i2c: cgbc: Use plateform data to get bus ID and adapter name Thomas Richard (congatec GmbH)
@ 2026-12-02 13:59 ` Andi Shyti
0 siblings, 0 replies; 20+ messages in thread
From: Andi Shyti @ 2026-12-02 13:59 UTC (permalink / raw)
To: Thomas Richard (congatec GmbH)
Cc: Lee Jones, Thomas Petazzoni, Werner Gartner, mfd, linux-kernel,
linux-i2c
Hi Thomas,
On Mon, Nov 30, 2026 at 03:28:13PM +0100, Thomas Richard (congatec GmbH) wrote:
> Obtain the bus ID (from the BC point of view) and adapter name from
> platform data. This allows the specific definitions to be removed, leaving
> only a generic adapter definition.
>
> Signed-off-by: Thomas Richard (congatec GmbH) <thomas.richard@bootlin.com>
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Thanks,
Andi
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v8 07/11] i2c: cgbc: Add support for fixed frequency buses
2026-11-30 14:28 ` [PATCH v8 07/11] i2c: cgbc: Add support for fixed frequency buses Thomas Richard (congatec GmbH)
@ 2026-12-02 14:05 ` Andi Shyti
0 siblings, 0 replies; 20+ messages in thread
From: Andi Shyti @ 2026-12-02 14:05 UTC (permalink / raw)
To: Thomas Richard (congatec GmbH)
Cc: Lee Jones, Thomas Petazzoni, Werner Gartner, mfd, linux-kernel,
linux-i2c
Hi Thomas,
On Mon, Nov 30, 2026 at 03:28:15PM +0100, Thomas Richard (congatec GmbH) wrote:
> Some I2C buses run at a fixed frequency. Add a fixed_freq flag to struct
> cgbc_i2c_platform_data to identify them. But the frequency is still needed
> to compute read_maxtime_us, so split cgbc_i2c_set_frequency() into two
> functions:
> - cgbc_i2c_set_frequency(): sets the bus frequency (skipped for
> fixed-frequency buses).
> - cgbc_i2c_get_frequency(): reads the bus frequency and computes
> read_maxtime_us.
>
> Signed-off-by: Thomas Richard (congatec GmbH) <thomas.richard@bootlin.com>
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Thanks,
Andi
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v8 10/11] i2c: cgbc: Register known I2C devices on the bus
2026-11-30 14:28 ` [PATCH v8 10/11] i2c: cgbc: Register known I2C devices on the bus Thomas Richard (congatec GmbH)
@ 2026-12-02 14:18 ` Andi Shyti
0 siblings, 0 replies; 20+ messages in thread
From: Andi Shyti @ 2026-12-02 14:18 UTC (permalink / raw)
To: Thomas Richard (congatec GmbH)
Cc: Lee Jones, Thomas Petazzoni, Werner Gartner, mfd, linux-kernel,
linux-i2c
Hi Thomas,
On Mon, Nov 30, 2026 at 03:28:18PM +0100, Thomas Richard (congatec GmbH) wrote:
> Register any I2C devices defined for the bus at probe time.
>
> Signed-off-by: Thomas Richard (congatec GmbH) <thomas.richard@bootlin.com>
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Thanks,
Andi
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v8 11/11] i2c: cgbc: Fetch the status of a write transfer
2026-11-30 14:28 ` [PATCH v8 11/11] i2c: cgbc: Fetch the status of a write transfer Thomas Richard (congatec GmbH)
@ 2026-12-02 14:21 ` Andi Shyti
0 siblings, 0 replies; 20+ messages in thread
From: Andi Shyti @ 2026-12-02 14:21 UTC (permalink / raw)
To: Thomas Richard (congatec GmbH)
Cc: Lee Jones, Thomas Petazzoni, Werner Gartner, mfd, linux-kernel,
linux-i2c, Markus Haberlander, stable
Hi Thomas,
On Mon, Nov 30, 2026 at 03:28:19PM +0100, Thomas Richard (congatec GmbH) wrote:
> From: Markus Haberlander <markus.haberlander@rosenberger.com>
>
> A write transfer sends the I2C command to the board controller and
> returns without reading the controller's I2C status, while a read polls
> the status until the controller is no longer busy. The status of a write
> is therefore never fetched:
>
> - the write reports success before the bus transfer has finished, and
> an error such as a NAK is only reported by the next transfer;
> - the controller keeps the status of the last write pending. On a
> conga-PA7 (BIOS PA70R026, board controller CGBCP032), a board reset
> with a write status pending does not power the board up again: after
> a reboot that follows a write on the general purpose bus, the board
> stays off until it is power cycled.
>
> Read the status after a write as well, as the read path does: poll until
> the controller is no longer busy, return the error it reports, and treat
> any state other than idle as an error.
>
> Tested on a conga-PA7 with v6.18.64 and "i2c: cgbc: Propagate hardware
> errors when polling read status": without this patch, a write to an
> absent address returns success, the next read fails, and a reboot after
> a write does not come back. With it, the write itself fails, the next
> transfer succeeds, and 14 reboots, each right after an acknowledged or a
> NAKed write, all came back.
>
> The patch and this changelog were drafted with the help of Claude
> Opus 5.5 and reviewed and tested by me.
>
> Fixes: 6894f640b8f3 ("i2c: Congatec Board Controller i2c bus driver")
> Cc: stable@vger.kernel.org
> Signed-off-by: Markus Haberlander <markus.haberlander@rosenberger.com>
> Reviewed-by: Thomas Richard (congatec GmbH) <thomas.richard@bootlin.com>
> Tested-by: Thomas Richard (congatec GmbH) <thomas.richard@bootlin.com>
> [Thomas: Use USEC_PER_SEC]
> Signed-off-by: Thomas Richard (congatec GmbH) <thomas.richard@bootlin.com>
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Thanks,
Andi
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v8 00/11] Congatec Board Controller: Add storage devices support
2026-11-30 14:28 [PATCH v8 00/11] Congatec Board Controller: Add storage devices support Thomas Richard (congatec GmbH)
` (10 preceding siblings ...)
2026-11-30 14:28 ` [PATCH v8 11/11] i2c: cgbc: Fetch the status of a write transfer Thomas Richard (congatec GmbH)
@ 2026-12-02 14:25 ` Andi Shyti
2026-12-02 14:29 ` Thomas Richard
11 siblings, 1 reply; 20+ messages in thread
From: Andi Shyti @ 2026-12-02 14:25 UTC (permalink / raw)
To: Thomas Richard (congatec GmbH)
Cc: Lee Jones, Thomas Petazzoni, Werner Gartner, mfd, linux-kernel,
linux-i2c, stable, Sashiko, Markus Haberlander
Hi Thomas,
> Lee Jones (1):
> i2c: cgbc: Propagate hardware errors when polling read status
>
> Markus Haberlander (1):
> i2c: cgbc: Fetch the status of a write transfer
>
> Thomas Richard (congatec GmbH) (9):
> mfd: cgbc: Fix use of negative error code as valid session handle
> i2c: cgbc: Use real I2C bus names
> mfd: cgbc: Add I2C platform data
> i2c: cgbc: Use plateform data to get bus ID and adapter name
> mfd: cgbc: Use PLATFORM_DEVID_AUTO for child device registration
> i2c: cgbc: Add support for fixed frequency buses
> mfd: cgbc: Add virtual I2C bus support
> mfd: cgbc: Add virtual storage devices on the virtual I2C bus
> i2c: cgbc: Register known I2C devices on the bus
How are we going to merge this series?
While we agree, can I take patch 2 and 11 through fixes? They
look to me independent from the rest.
Thanks,
Andi
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v8 00/11] Congatec Board Controller: Add storage devices support
2026-12-02 14:25 ` [PATCH v8 00/11] Congatec Board Controller: Add storage devices support Andi Shyti
@ 2026-12-02 14:29 ` Thomas Richard
2026-12-02 15:15 ` Andi Shyti
0 siblings, 1 reply; 20+ messages in thread
From: Thomas Richard @ 2026-12-02 14:29 UTC (permalink / raw)
To: Andi Shyti
Cc: Lee Jones, Thomas Petazzoni, Werner Gartner, mfd, linux-kernel,
linux-i2c, stable, Sashiko, Markus Haberlander
On 12/2/26 3:25 PM, Andi Shyti wrote:
> Hi Thomas,
>
>> Lee Jones (1):
>> i2c: cgbc: Propagate hardware errors when polling read status
>>
>> Markus Haberlander (1):
>> i2c: cgbc: Fetch the status of a write transfer
>>
>> Thomas Richard (congatec GmbH) (9):
>> mfd: cgbc: Fix use of negative error code as valid session handle
>> i2c: cgbc: Use real I2C bus names
>> mfd: cgbc: Add I2C platform data
>> i2c: cgbc: Use plateform data to get bus ID and adapter name
>> mfd: cgbc: Use PLATFORM_DEVID_AUTO for child device registration
>> i2c: cgbc: Add support for fixed frequency buses
>> mfd: cgbc: Add virtual I2C bus support
>> mfd: cgbc: Add virtual storage devices on the virtual I2C bus
>> i2c: cgbc: Register known I2C devices on the bus
>
> How are we going to merge this series?
>
> While we agree, can I take patch 2 and 11 through fixes? They
> look to me independent from the rest.
11 is independent. But patch 5 depends on 2.
The read_poll_timeout which is modified in patch 2 is also modified in
patch 5.
Best Regards,
Thomas
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v8 00/11] Congatec Board Controller: Add storage devices support
2026-12-02 14:29 ` Thomas Richard
@ 2026-12-02 15:15 ` Andi Shyti
2026-12-02 15:30 ` Thomas Richard
0 siblings, 1 reply; 20+ messages in thread
From: Andi Shyti @ 2026-12-02 15:15 UTC (permalink / raw)
To: Thomas Richard
Cc: Lee Jones, Thomas Petazzoni, Werner Gartner, mfd, linux-kernel,
linux-i2c, stable, Sashiko, Markus Haberlander
On Wed, Dec 02, 2026 at 03:29:42PM +0100, Thomas Richard wrote:
> On 12/2/26 3:25 PM, Andi Shyti wrote:
> > Hi Thomas,
> >
> >> Lee Jones (1):
> >> i2c: cgbc: Propagate hardware errors when polling read status
> >>
> >> Markus Haberlander (1):
> >> i2c: cgbc: Fetch the status of a write transfer
> >>
> >> Thomas Richard (congatec GmbH) (9):
> >> mfd: cgbc: Fix use of negative error code as valid session handle
> >> i2c: cgbc: Use real I2C bus names
> >> mfd: cgbc: Add I2C platform data
> >> i2c: cgbc: Use plateform data to get bus ID and adapter name
> >> mfd: cgbc: Use PLATFORM_DEVID_AUTO for child device registration
> >> i2c: cgbc: Add support for fixed frequency buses
> >> mfd: cgbc: Add virtual I2C bus support
> >> mfd: cgbc: Add virtual storage devices on the virtual I2C bus
> >> i2c: cgbc: Register known I2C devices on the bus
> >
> > How are we going to merge this series?
> >
> > While we agree, can I take patch 2 and 11 through fixes? They
> > look to me independent from the rest.
> 11 is independent. But patch 5 depends on 2.
> The read_poll_timeout which is modified in patch 2 is also modified in
> patch 5.
If I take patch 2 now it would be merged in -rc6, so that you, or
whoever will take the patch, will just need to rebase on top of
mainline.
Let me know what's your preference.
Andi
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v8 00/11] Congatec Board Controller: Add storage devices support
2026-12-02 15:15 ` Andi Shyti
@ 2026-12-02 15:30 ` Thomas Richard
0 siblings, 0 replies; 20+ messages in thread
From: Thomas Richard @ 2026-12-02 15:30 UTC (permalink / raw)
To: Andi Shyti
Cc: Lee Jones, Thomas Petazzoni, Werner Gartner, mfd, linux-kernel,
linux-i2c, stable, Sashiko, Markus Haberlander
On 12/2/26 4:15 PM, Andi Shyti wrote:
> On Wed, Dec 02, 2026 at 03:29:42PM +0100, Thomas Richard wrote:
>> On 12/2/26 3:25 PM, Andi Shyti wrote:
>>> Hi Thomas,
>>>
>>>> Lee Jones (1):
>>>> i2c: cgbc: Propagate hardware errors when polling read status
>>>>
>>>> Markus Haberlander (1):
>>>> i2c: cgbc: Fetch the status of a write transfer
>>>>
>>>> Thomas Richard (congatec GmbH) (9):
>>>> mfd: cgbc: Fix use of negative error code as valid session handle
>>>> i2c: cgbc: Use real I2C bus names
>>>> mfd: cgbc: Add I2C platform data
>>>> i2c: cgbc: Use plateform data to get bus ID and adapter name
>>>> mfd: cgbc: Use PLATFORM_DEVID_AUTO for child device registration
>>>> i2c: cgbc: Add support for fixed frequency buses
>>>> mfd: cgbc: Add virtual I2C bus support
>>>> mfd: cgbc: Add virtual storage devices on the virtual I2C bus
>>>> i2c: cgbc: Register known I2C devices on the bus
>>>
>>> How are we going to merge this series?
>>>
>>> While we agree, can I take patch 2 and 11 through fixes? They
>>> look to me independent from the rest.
>> 11 is independent. But patch 5 depends on 2.
>> The read_poll_timeout which is modified in patch 2 is also modified in
>> patch 5.
>
> If I take patch 2 now it would be merged in -rc6, so that you, or
> whoever will take the patch, will just need to rebase on top of
> mainline.
I'm fine with both solutions (you pick 2 and 11, or Lee applies the
whole series). It's up to you Lee.
Best Regards,
Thomas
^ permalink raw reply [flat|nested] 20+ messages in thread
end of thread, other threads:[~2026-12-02 15:30 UTC | newest]
Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-30 14:28 [PATCH v8 00/11] Congatec Board Controller: Add storage devices support Thomas Richard (congatec GmbH)
2026-11-30 14:28 ` [PATCH v8 01/11] mfd: cgbc: Fix use of negative error code as valid session handle Thomas Richard (congatec GmbH)
2026-11-30 14:28 ` [PATCH v8 02/11] i2c: cgbc: Propagate hardware errors when polling read status Thomas Richard (congatec GmbH)
2026-11-30 14:28 ` [PATCH v8 03/11] i2c: cgbc: Use real I2C bus names Thomas Richard (congatec GmbH)
2026-11-30 14:28 ` [PATCH v8 04/11] mfd: cgbc: Add I2C platform data Thomas Richard (congatec GmbH)
2026-11-30 14:28 ` [PATCH v8 05/11] i2c: cgbc: Use plateform data to get bus ID and adapter name Thomas Richard (congatec GmbH)
2026-12-02 13:59 ` Andi Shyti
2026-11-30 14:28 ` [PATCH v8 06/11] mfd: cgbc: Use PLATFORM_DEVID_AUTO for child device registration Thomas Richard (congatec GmbH)
2026-11-30 14:28 ` [PATCH v8 07/11] i2c: cgbc: Add support for fixed frequency buses Thomas Richard (congatec GmbH)
2026-12-02 14:05 ` Andi Shyti
2026-11-30 14:28 ` [PATCH v8 08/11] mfd: cgbc: Add virtual I2C bus support Thomas Richard (congatec GmbH)
2026-11-30 14:28 ` [PATCH v8 09/11] mfd: cgbc: Add virtual storage devices on the virtual I2C bus Thomas Richard (congatec GmbH)
2026-11-30 14:28 ` [PATCH v8 10/11] i2c: cgbc: Register known I2C devices on the bus Thomas Richard (congatec GmbH)
2026-12-02 14:18 ` Andi Shyti
2026-11-30 14:28 ` [PATCH v8 11/11] i2c: cgbc: Fetch the status of a write transfer Thomas Richard (congatec GmbH)
2026-12-02 14:21 ` Andi Shyti
2026-12-02 14:25 ` [PATCH v8 00/11] Congatec Board Controller: Add storage devices support Andi Shyti
2026-12-02 14:29 ` Thomas Richard
2026-12-02 15:15 ` Andi Shyti
2026-12-02 15:30 ` Thomas Richard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®