Dhanalakshmi Siddani | 01e94a3 | 2020-02-04 22:16:05 +0530 | [diff] [blame] | 1 | /* |
| 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 | |
| 16 | extern struct tfa_device **devs; |
| 17 | |
| 18 | /** |
| 19 | * tfa error return codes |
| 20 | */ |
| 21 | enum 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 | |
| 32 | enum Tfa98xx_Error tfa_write_filters(struct tfa_device *tfa, int prof_idx); |
| 33 | |
| 34 | struct tfa_device **tfa_devs_create(int count); |
| 35 | void tfa_devs_destroy(int count); |
| 36 | |
| 37 | struct tfa_device **tfa_get_device_struct(void); |
| 38 | |
| 39 | int tfa_plop_noise_interrupt(struct tfa_device *tfa, int profile, int vstep); |
| 40 | void tfa_lp_mode_interrupt(struct tfa_device *tfa); |
| 41 | |
| 42 | #endif /* TFA_H_ */ |