blob: 8b8bf2c9c352dac10c35a1a6b58251fda92d702a (
plain)
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
35
36
37
38
39
40
|
/*
* Copyright (C) 2021 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef EXYNOS4412_GPIOS_DATA_H
#define EXYNOS4412_GPIOS_DATA_H
struct gpio_bank_data {
char *name;
uint32_t nr_gpios;
uint32_t offset;
};
struct gpio_register_data {
char *name;
int (*get_value)(uint32_t register_value, int gpio_offset);
char *(*value_str)(int value);
uint32_t offset;
};
int decode_gpio_data(int debug, char *bank, uint32_t gpio_offset,
char* gpio_register_name, uint32_t *virt_addr);
struct gpio_bank_data *get_gpio_bank_data(char *bank);
char *gpio_data_str(char* gpio_register_name, uint32_t register_value);
void print_gpio_banks_data(void);
#endif /* EXYNOS4412_GPIOS_DATA_H */
|