blob: 92410b7e76718ca7c7f84b5510353c7f084a818a [file] [log] [blame]
Dhanalakshmi Siddani01e94a32020-02-04 22:16:05 +05301/*
2 * Copyright (C) 2014 NXP Semiconductors, All Rights Reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 */
9
10#ifndef TFA_H_
11#define TFA_H_
12
13/* set the limit for the container file length */
14#define TFA_MAX_CNT_LENGTH (256*1024)
15
16extern struct tfa_device **devs;
17
18/**
19 * tfa error return codes
20 */
21enum tfa_error {
22 tfa_error_ok, /**< no error */
23 tfa_error_device, /**< no response from device */
24 tfa_error_bad_param,/**< parameter no accepted */
25 tfa_error_noclock, /**< required clock not present */
26 tfa_error_timeout, /**< a timeout occurred */
27 tfa_error_dsp, /**< a DSP error was returned */
28 tfa_error_container,/**< no or wrong container file */
29 tfa_error_max /**< impossible value, max enum */
30};
31
32enum Tfa98xx_Error tfa_write_filters(struct tfa_device *tfa, int prof_idx);
33
34struct tfa_device **tfa_devs_create(int count);
35void tfa_devs_destroy(int count);
36
37struct tfa_device **tfa_get_device_struct(void);
38
39int tfa_plop_noise_interrupt(struct tfa_device *tfa, int profile, int vstep);
40void tfa_lp_mode_interrupt(struct tfa_device *tfa);
41
42#endif /* TFA_H_ */