/* Send ADS7052 Offset calibration request. 
On power-up, the host must provide 24 SCLKs in the first serial transfer to enter the OFFCAL state. During normal operation, the host must provide 64 SCLKs in the serial transfer frame to enter the OFFCAL state.  */
static int ads7052_send_calibration(const struct device *dev, bool power_up)
/* Send ADS7052 Offset calibration request. 
On power-up, the host must provide 24 SCLKs in the first serial transfer to enter the OFFCAL state. During normal operation, the host must provide 64 SCLKs in the serial transfer frame to enter the OFFCAL state.  */
static int ads7052_send_calibration(const struct device *dev, bool power_up)
{
	const struct ads7052_config *config = dev->config;
	int err;
	uint8_t sclks_needed = power_up ? 24 : 64;
	uint8_t num_bytes = sclks_needed / 8;
	uint8_t tx_bytes[8] = {0};
	const struct spi_buf tx_buf = {.buf = tx_bytes, .len = num_bytes};
	const struct spi_buf_set tx = {.buffers = &tx_buf, .count = 1};
	err = spi_write_dt(&config->bus, &tx);
	return err;
}