From b7dc01cd48615b9df08fc0e9a0991ee516c18c8a Mon Sep 17 00:00:00 2001 From: Ryan McClelland Date: Sat, 22 Oct 2022 12:30:17 -0700 Subject: [PATCH] i3c: rename is_primary to is_secondary Rename is_primary to is_secondary. The justification for this is because it is less likely to have something configured to be secondary, and the 0 value would be if it is primary. Signed-off-by: Ryan McClelland --- drivers/i3c/i3c_mcux.c | 4 ++-- include/zephyr/drivers/i3c.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/i3c/i3c_mcux.c b/drivers/i3c/i3c_mcux.c index ce8a04c68e..f3b3d5005c 100644 --- a/drivers/i3c/i3c_mcux.c +++ b/drivers/i3c/i3c_mcux.c @@ -1925,7 +1925,7 @@ static int mcux_i3c_configure(const struct device *dev, * * Currently, must be the primary controller. */ - if ((!ctrl_cfg->is_primary) || + if ((ctrl_cfg->is_secondary) || (ctrl_cfg->scl.i2c == 0U) || (ctrl_cfg->scl.i3c == 0U)) { ret = -EINVAL; @@ -2038,7 +2038,7 @@ static int mcux_i3c_init(const struct device *dev) } /* Currently can only act as primary controller. */ - data->ctrl_config.is_primary = true; + data->ctrl_config.is_secondary = false; /* HDR mode not supported at the moment. */ data->ctrl_config.supported_hdr = 0U; diff --git a/include/zephyr/drivers/i3c.h b/include/zephyr/drivers/i3c.h index d6e6b209c6..2cfff79d82 100644 --- a/include/zephyr/drivers/i3c.h +++ b/include/zephyr/drivers/i3c.h @@ -372,10 +372,10 @@ enum i3c_config_type { */ struct i3c_config_controller { /** - * True if the controller is to be the primary controller - * of the bus. False to be the secondary controller. + * True if the controller is to be the secondary controller + * of the bus. False to be the primary controller. */ - bool is_primary; + bool is_secondary; struct { /** SCL frequency (in Hz) for I3C transfers. */