xref: /OK3568_Linux_fs/kernel/drivers/video/rockchip/vehicle/vehicle_gpio.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * Rockchip Vehicle driver
4  *
5  * Copyright (C) 2022 Rockchip Electronics Co., Ltd.
6  */
7 #ifndef __VEHICLE_GPIO_H
8 #define __VEHICLE_GPIO_H
9 
10 #include "vehicle_cfg.h"
11 
12 struct gpio_detect {
13 	int gpio;
14 	int atv_val;
15 	int val;
16 	int irq;
17 	int mirror;
18 	int num;
19 	unsigned int debounce_ms;
20 	struct delayed_work work;
21 	struct device *dev;
22 };
23 /*
24  * true : reverse on
25  * false : reverse over
26  */
27 bool vehicle_gpio_reverse_check(struct gpio_detect *gpiod);
28 
29 int vehicle_gpio_init(struct gpio_detect *gpiod, const char *ad_name);
30 
31 int vehicle_gpio_deinit(struct gpio_detect *gpiod);
32 
33 #endif
34