/* iis3dhhc_trigger_set - link external trigger to event data ready  */
int iis3dhhc_trigger_set(const struct device *dev, const struct sensor_trigger *trig, sensor_trigger_handler_t handler)
/* iis3dhhc_trigger_set - link external trigger to event data ready  */
int iis3dhhc_trigger_set(const struct device *dev, const struct sensor_trigger *trig, sensor_trigger_handler_t handler)
{
	struct iis3dhhc_data *iis3dhhc = dev->data;
	const struct iis3dhhc_config *config = dev->config;
	int16_t raw[3];
	if (!config->int_gpio.port) {
		return -ENOTSUP;
	}
	if (trig->chan == SENSOR_CHAN_ACCEL_XYZ) {
		iis3dhhc->handler_drdy = handler;
		iis3dhhc->trig_drdy = trig;
		if (handler) {
			iis3dhhc_acceleration_raw_get(iis3dhhc->ctx, raw);
			return iis3dhhc_enable_int(dev, PROPERTY_ENABLE);
		} else {
			return iis3dhhc_enable_int(dev, PROPERTY_DISABLE);
		}
	}
	return -ENOTSUP;
}