Commit 8fa46d2a authored by Lucas Russo's avatar Lucas Russo

sm_io/chips/*: use new SMPR API for pluggable operations

Now, we pass the pointer to the operation
we want to use it, instead of the enum.
parent ad4d4456
......@@ -62,7 +62,7 @@ smch_24aa64_t * smch_24aa64_new (smio_t *parent, uint64_t base, uint32_t addr,
smch_24aa64_t *self = (smch_24aa64_t *) zmalloc (sizeof *self);
ASSERT_ALLOC(self, err_self_alloc);
self->i2c = smpr_new (SMCH_24AA64_NAME, parent, SMPR_I2C, verbose);
self->i2c = smpr_new (SMCH_24AA64_NAME, parent, &smpr_proto_ops_i2c, verbose);
ASSERT_ALLOC(self->i2c, err_i2c_alloc);
/* Initalize the I2C protocol */
......
......@@ -65,7 +65,7 @@ smch_ad9510_t * smch_ad9510_new (smio_t *parent, uint64_t base, uint32_t ss,
smch_ad9510_t *self = (smch_ad9510_t *) zmalloc (sizeof *self);
ASSERT_ALLOC(self, err_self_alloc);
self->spi = smpr_new (SMCH_AD9510_NAME, parent, SMPR_SPI, verbose);
self->spi = smpr_new (SMCH_AD9510_NAME, parent, &smpr_proto_ops_spi, verbose);
ASSERT_ALLOC(self->spi, err_spi_alloc);
/* Initalize the SPI protocol */
......
......@@ -58,7 +58,7 @@ smch_isla216p_t * smch_isla216p_new (smio_t *parent, uint64_t base, uint32_t ss,
smch_isla216p_t *self = (smch_isla216p_t *) zmalloc (sizeof *self);
ASSERT_ALLOC(self, err_self_alloc);
self->spi = smpr_new (SMCH_ISLA216P_NAME, parent, SMPR_SPI, verbose);
self->spi = smpr_new (SMCH_ISLA216P_NAME, parent, &smpr_proto_ops_spi, verbose);
ASSERT_ALLOC(self->spi, err_spi_alloc);
/* Initalize the SPI protocol */
......
......@@ -52,7 +52,7 @@ smch_pca9547_t * smch_pca9547_new (smio_t *parent, uint64_t base, uint32_t addr,
smch_pca9547_t *self = (smch_pca9547_t *) zmalloc (sizeof *self);
ASSERT_ALLOC(self, err_self_alloc);
self->i2c = smpr_new (SMCH_PCA9547_NAME, parent, SMPR_I2C, verbose);
self->i2c = smpr_new (SMCH_PCA9547_NAME, parent, &smpr_proto_ops_i2c, verbose);
ASSERT_ALLOC(self->i2c, err_i2c_alloc);
/* Initalize the I2C protocol */
......
......@@ -54,7 +54,7 @@ smch_rffe_t * smch_rffe_new (smio_t *parent, int verbose)
smch_rffe_t *self = (smch_rffe_t *) zmalloc (sizeof *self);
ASSERT_ALLOC(self, err_self_alloc);
self->bsmp = smpr_new (SMCH_RFFE_NAME, parent, SMPR_BSMP, verbose);
self->bsmp = smpr_new (SMCH_RFFE_NAME, parent, &smpr_proto_ops_bsmp, verbose);
ASSERT_ALLOC(self->bsmp, err_bsmp_alloc);
/* Initalize the BSMP protocol */
......
......@@ -85,7 +85,7 @@ smch_si57x_t * smch_si57x_new (smio_t *parent, uint64_t base, uint32_t addr,
smch_si57x_t *self = (smch_si57x_t *) zmalloc (sizeof *self);
ASSERT_ALLOC(self, err_self_alloc);
self->i2c = smpr_new (SMCH_SI57X_NAME, parent, SMPR_I2C, verbose);
self->i2c = smpr_new (SMCH_SI57X_NAME, parent, &smpr_proto_ops_i2c, verbose);
ASSERT_ALLOC(self->i2c, err_i2c_alloc);
/* Initalize the I2C protocol */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment