hc
2024-01-04 1543e317f1da31b75942316931e8f491a8920811
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
/* SPDX-License-Identifier: GPL-2.0 */
/*
 * Rockchip Vehicle driver
 *
 * Copyright (C) 2022 Rockchip Electronics Co., Ltd.
 */
#ifndef __VEHICLE_GPIO_H
#define __VEHICLE_GPIO_H
 
#include "vehicle_cfg.h"
 
struct gpio_detect {
   int gpio;
   int atv_val;
   int val;
   int irq;
   int mirror;
   int num;
   unsigned int debounce_ms;
   struct delayed_work work;
   struct device *dev;
};
/*
 * true : reverse on
 * false : reverse over
 */
bool vehicle_gpio_reverse_check(struct gpio_detect *gpiod);
 
int vehicle_gpio_init(struct gpio_detect *gpiod, const char *ad_name);
 
int vehicle_gpio_deinit(struct gpio_detect *gpiod);
 
#endif