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 <ryanmcclelland@meta.com>
This commit is contained in:
Ryan McClelland 2022-10-22 12:30:17 -07:00 committed by Christopher Friedt
parent 428700f709
commit b7dc01cd48
2 changed files with 5 additions and 5 deletions

View file

@ -1925,7 +1925,7 @@ static int mcux_i3c_configure(const struct device *dev,
* *
* Currently, must be the primary controller. * Currently, must be the primary controller.
*/ */
if ((!ctrl_cfg->is_primary) || if ((ctrl_cfg->is_secondary) ||
(ctrl_cfg->scl.i2c == 0U) || (ctrl_cfg->scl.i2c == 0U) ||
(ctrl_cfg->scl.i3c == 0U)) { (ctrl_cfg->scl.i3c == 0U)) {
ret = -EINVAL; ret = -EINVAL;
@ -2038,7 +2038,7 @@ static int mcux_i3c_init(const struct device *dev)
} }
/* Currently can only act as primary controller. */ /* 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. */ /* HDR mode not supported at the moment. */
data->ctrl_config.supported_hdr = 0U; data->ctrl_config.supported_hdr = 0U;

View file

@ -372,10 +372,10 @@ enum i3c_config_type {
*/ */
struct i3c_config_controller { struct i3c_config_controller {
/** /**
* True if the controller is to be the primary controller * True if the controller is to be the secondary controller
* of the bus. False to be the secondary controller. * of the bus. False to be the primary controller.
*/ */
bool is_primary; bool is_secondary;
struct { struct {
/** SCL frequency (in Hz) for I3C transfers. */ /** SCL frequency (in Hz) for I3C transfers. */