/* Convert raw data to capacitance in picofarad (pF). Requires the previous conversion from raw to frequency.  */
static void fdc2x1x_raw_to_capacitance(const struct device *dev, uint8_t ch, double freq, double *capacitance)
/* Convert raw data to capacitance in picofarad (pF). Requires the previous conversion from raw to frequency.  */
static void fdc2x1x_raw_to_capacitance(const struct device *dev, uint8_t ch, double freq, double *capacitance)
{
	const struct fdc2x1x_config *cfg = dev->config;
	*capacitance = 1 / ((cfg->ch_cfg->inductance / 1000000.0) *
			    pow((2 * PI * freq), 2));
}