hc
2024-11-01 2f529f9b558ca1c1bd74be7437a84e4711743404
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
41
42
43
44
45
46
47
48
49
50
51
/*
 * include/linux/gpio_detection.h
 *
 * Platform data structure for GPIO detection driver
 *
 * This file is licensed under the terms of the GNU General Public
 * License version 2.  This program is licensed "as is" without any
 * warranty of any kind, whether express or implied.
 */
#ifndef __GPIO_DETECTION_H
#define __GPIO_DETECTION_H
 
#define GPIO_EVENT        1
 
/*
 * gpio event
 *  @val: 0 event active, 1 event over
 *  @name: event name
 */
 
struct gpio_event {
   int val;
   const char *name;
};
 
#if IS_ENABLED(CONFIG_GPIO_DET)
 
int gpio_det_register_notifier(struct notifier_block *nb);
int gpio_det_unregister_notifier(struct notifier_block *nb);
int gpio_det_notifier_call_chain(unsigned long val, void *v);
 
#else
 
static inline int gpio_det_register_notifier(struct notifier_block *nb)
{
   return -EINVAL;
};
 
static inline int gpio_det_unregister_notifier(struct notifier_block *nb)
{
   return -EINVAL;
};
 
static inline int gpio_det_notifier_call_chain(unsigned long val, void *v)
{
   return -EINVAL;
};
 
#endif
 
#endif