blob: 16b1185c698e904d8e87e61da7bdc9c758e06f63 [file] [log] [blame]
Nandor Han6521e5d2021-06-10 16:56:44 +03001/* SPDX-License-Identifier: GPL-2.0+ */
2/*
3 * Copyright (c) Vaisala Oyj.
4 */
5
6#ifndef REBOOT_MODE_REBOOT_MODE_GPIO_H_
7#define REBOOT_MODE_REBOOT_MODE_GPIO_H_
8
9#include <asm/gpio.h>
10
11/*
12 * In case of initializing the driver statically (using U_BOOT_DEVICE macro),
13 * we can use this struct to declare the pins used.
14 */
15
16#if !CONFIG_IS_ENABLED(OF_CONTROL)
17struct reboot_mode_gpio_config {
18 int gpio_dev_offset;
19 int gpio_offset;
20 int flags;
21};
22#endif
23
24struct reboot_mode_gpio_platdata {
25 struct gpio_desc *gpio_desc;
26#if !CONFIG_IS_ENABLED(OF_CONTROL)
27 struct reboot_mode_gpio_config *gpios_config;
28#endif
29 int gpio_count;
30};
31
32#endif /* REBOOT_MODE_REBOOT_MODE_GPIO_H_ */