forked from thesofproject/sof
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathiomux.h
More file actions
34 lines (26 loc) · 773 Bytes
/
iomux.h
File metadata and controls
34 lines (26 loc) · 773 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/* SPDX-License-Identifier: BSD-3-Clause
*
* Copyright(c) 2019 Intel Corporation. All rights reserved.
*
* Author: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
*/
#ifndef __SOF_DRIVERS_IOMUX_H__
#define __SOF_DRIVERS_IOMUX_H__
#include <stdint.h>
#define IOMUX_PIN_NUM 32
struct iomux {
uint32_t base;
/* 0 -- unconfigured; > 0 -- configured for function (state - 1) */
uint8_t pin_state[IOMUX_PIN_NUM];
};
struct iomux_pin_config {
unsigned int bit;
uint32_t mask;
uint32_t fn;
};
extern struct iomux iomux_data[];
extern const int n_iomux;
int iomux_configure(struct iomux *iomux, const struct iomux_pin_config *cfg);
struct iomux *iomux_get(unsigned int id);
int iomux_probe(struct iomux *iomux);
#endif /* __SOF_DRIVERS_IOMUX_H__ */