/* Read filter and post-filter options from the device.  */
static int32_t ad7124_8pmdz_flt_logic_get(struct ad7124_8pmdz_dev *dev, int8_t *flt_opt, int8_t *post_flt_opt)
/* Read filter and post-filter options from the device.  */
static int32_t ad7124_8pmdz_flt_logic_get(struct ad7124_8pmdz_dev *dev, int8_t *flt_opt, int8_t *post_flt_opt)
{
	struct ad7124_st_reg *reg_map;
	int32_t ret;
	reg_map = dev->ad7124_handler->regs;
	ret = ad7124_read_register(dev->ad7124_handler,
				   &reg_map[AD7124_Filter_0]);
	if (ret != SUCCESS)
		return FAILURE;
	*flt_opt = (reg_map[AD7124_Filter_0].value &
		    AD7124_FILT_REG_FILTER(7)) >> 21;
	*post_flt_opt = (reg_map[AD7124_Filter_0].value &
			 AD7124_FILT_REG_POST_FILTER(7)) >> 17;
	return SUCCESS;
}