1 /*
2 ** =============================================================================
3 ** Copyright (c) 2016 Texas Instruments Inc.
4 **
5 ** This program is free software; you can redistribute it and/or modify it under
6 ** the terms of the GNU General Public License as published by the Free Software
7 ** Foundation; version 2.
8 **
9 ** This program is distributed in the hope that it will be useful, but WITHOUT
10 ** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 ** FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12 **
13 ** You should have received a copy of the GNU General Public License along with
14 ** this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
15 ** Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 **
17 ** File:
18 ** tas2557-core.h
19 **
20 ** Description:
21 ** header file for tas2557-core.c
22 **
23 ** =============================================================================
24 */
26 #ifndef _TAS2557_CORE_H
27 #define _TAS2557_CORE_H
29 #include "tas2557.h"
31 extern int tas2557_parse_dt(struct device *dev,
32 struct tas2557_priv *pTAS2557);
33 extern void tas2557_enable(struct tas2557_priv *pTAS2557, bool bEnable);
34 extern int tas2557_set_sampling_rate(struct tas2557_priv *pTAS2557,
35 unsigned int nSamplingRate);
36 extern int tas2557_set_config(struct tas2557_priv *pTAS2557, int config);
37 extern void tas2557_load_fs_firmware(struct tas2557_priv *pTAS2557,
38 char *pFileName);
39 extern void tas2557_fw_ready(const struct firmware *pFW, void *pContext);
40 extern int tas2557_set_program(struct tas2557_priv *pTAS2557,
41 unsigned int nProgram);
42 extern int tas2557_set_calibration(struct tas2557_priv *pTAS2557,
43 int nCalibration);
44 extern int tas2557_load_default(struct tas2557_priv *pTAS2557);
45 int tas2557_setChannel(struct tas2557_priv *pTAS2557, int channel);
47 #endif /* _TAS2557_CORE_H */