drivers: spi_psoc6: initialize all cs gpios during init

In case when we have multiple devices connected to the
one SPI interface the initial state of CS gpios after
MCU reset is floating and it might be low that prevents us from
communicating between particular devices. Fix that by
initializing all provided cs gpios and setting them as inactive.

Signed-off-by: Bartosz Bilas <bartosz.bilas@hotmail.com>
diff --git a/drivers/spi/spi_psoc6.c b/drivers/spi/spi_psoc6.c
index 5f4d4b2..83c96fa 100644
--- a/drivers/spi/spi_psoc6.c
+++ b/drivers/spi/spi_psoc6.c
@@ -253,7 +253,6 @@
 		data->cfg.oversample = spi_psoc6_get_freqdiv(spi_cfg->frequency);
 
 		data->ctx.config = spi_cfg;
-		spi_context_cs_configure(&data->ctx);
 	} else {
 		/* Slave mode is not implemented yet. */
 		return -ENOTSUP;
@@ -367,7 +366,9 @@
 
 static int spi_psoc6_init(const struct device *dev)
 {
+	int err;
 	const struct spi_psoc6_config *config = dev->config;
+	struct spi_psoc6_data *data = dev->data;
 
 	soc_gpio_list_configure(config->pins, config->num_pins);
 
@@ -383,6 +384,11 @@
 	config->irq_config_func(dev);
 #endif
 
+	err = spi_context_cs_configure_all(&data->ctx);
+	if (err < 0) {
+		return err;
+	}
+
 	return spi_psoc6_release(dev, NULL);
 }
 
@@ -406,6 +412,7 @@
 	static struct spi_psoc6_data spi_psoc6_dev_data_##n = {		\
 		SPI_CONTEXT_INIT_LOCK(spi_psoc6_dev_data_##n, ctx),	\
 		SPI_CONTEXT_INIT_SYNC(spi_psoc6_dev_data_##n, ctx),	\
+		SPI_CONTEXT_CS_GPIOS_INITIALIZE(DT_DRV_INST(n), ctx)	\
 	};								\
 	DEVICE_DT_INST_DEFINE(n, &spi_psoc6_init, NULL,			\
 			      &spi_psoc6_dev_data_##n,			\