Commit 967b89a7 authored by Ulf Magnusson's avatar Ulf Magnusson Committed by Maureen Helm
Browse files

sensors: lps2hh: Fix misspelled GPIOS_CONTROLLER references



DT_INST_0_ST_LPS22HH_CS_GPIO_CONTROLLER should be
DT_INST_0_ST_LPS22HH_CS_GPIOS_CONTROLLER, which is the name generated by
gen_defines.py.

Discovered while working on unrelated removing of special-casing for
clocks.

Co-authored-by: default avatarArmando Visconti <armando.visconti@st.com>
Signed-off-by: default avatarUlf Magnusson <Ulf.Magnusson@nordicsemi.no>
parent 7fc0486c
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -211,9 +211,9 @@ static const struct lps22hh_config lps22hh_config = {
			       SPI_MODE_CPHA | SPI_WORD_SET(8) |
			       SPI_LINES_SINGLE),
	.spi_conf.slave     = DT_INST_0_ST_LPS22HH_BASE_ADDRESS,
#if defined(DT_INST_0_ST_LPS22HH_CS_GPIO_CONTROLLER)
	.gpio_cs_port	    = DT_INST_0_ST_LPS22HH_CS_GPIO_CONTROLLER,
	.cs_gpio	    = DT_INST_0_ST_LPS22HH_CS_GPIO_PIN,
#if defined(DT_INST_0_ST_LPS22HH_CS_GPIOS_CONTROLLER)
	.gpio_cs_port	    = DT_INST_0_ST_LPS22HH_CS_GPIOS_CONTROLLER,
	.cs_gpio	    = DT_INST_0_ST_LPS22HH_CS_GPIOS_PIN,

	.spi_conf.cs        =  &lps22hh_data.cs_ctrl,
#else
+2 −2
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@ struct lps22hh_config {
	u16_t i2c_slv_addr;
#elif DT_ST_LPS22HH_BUS_SPI
	struct spi_config spi_conf;
#if defined(DT_INST_0_ST_LPS22HH_CS_GPIO_CONTROLLER)
#if defined(DT_INST_0_ST_LPS22HH_CS_GPIOS_CONTROLLER)
	const char *gpio_cs_port;
	u8_t cs_gpio;
#endif
@@ -79,7 +79,7 @@ struct lps22hh_data {
#endif

#endif /* CONFIG_LPS22HH_TRIGGER */
#if defined(DT_INST_0_ST_LPS22HH_CS_GPIO_CONTROLLER)
#if defined(DT_INST_0_ST_LPS22HH_CS_GPIOS_CONTROLLER)
	struct spi_cs_control cs_ctrl;
#endif
};
+1 −1
Original line number Diff line number Diff line
@@ -105,7 +105,7 @@ int lps22hh_spi_init(struct device *dev)
	data->ctx = &data->ctx_spi;
	data->ctx->handle = dev;

#if defined(DT_INST_0_ST_LPS22HH_CS_GPIO_CONTROLLER)
#if defined(DT_INST_0_ST_LPS22HH_CS_GPIOS_CONTROLLER)
	const struct lps22hh_config *cfg = dev->config->config_info;

	/* handle SPI CS thru GPIO if it is the case */