Skip to content

Commit 70d97e0

Browse files
committed
Revert "gpio: expose pull-up/pull-down line flags to userspace"
This reverts commit 8c550e9. This was prematurely applied and we need to back it out to merge a better version of the development track for this feature. Signed-off-by: Linus Walleij <[email protected]>
1 parent 2f4133b commit 70d97e0

File tree

2 files changed

+0
-16
lines changed

2 files changed

+0
-16
lines changed

drivers/gpio/gpiolib.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -422,8 +422,6 @@ struct linehandle_state {
422422
(GPIOHANDLE_REQUEST_INPUT | \
423423
GPIOHANDLE_REQUEST_OUTPUT | \
424424
GPIOHANDLE_REQUEST_ACTIVE_LOW | \
425-
GPIOHANDLE_REQUEST_PULL_UP | \
426-
GPIOHANDLE_REQUEST_PULL_DOWN | \
427425
GPIOHANDLE_REQUEST_OPEN_DRAIN | \
428426
GPIOHANDLE_REQUEST_OPEN_SOURCE)
429427

@@ -595,10 +593,6 @@ static int linehandle_create(struct gpio_device *gdev, void __user *ip)
595593
set_bit(FLAG_OPEN_DRAIN, &desc->flags);
596594
if (lflags & GPIOHANDLE_REQUEST_OPEN_SOURCE)
597595
set_bit(FLAG_OPEN_SOURCE, &desc->flags);
598-
if (lflags & GPIOHANDLE_REQUEST_PULL_DOWN)
599-
set_bit(FLAG_PULL_DOWN, &desc->flags);
600-
if (lflags & GPIOHANDLE_REQUEST_PULL_UP)
601-
set_bit(FLAG_PULL_UP, &desc->flags);
602596

603597
ret = gpiod_set_transitory(desc, false);
604598
if (ret < 0)
@@ -1098,10 +1092,6 @@ static long gpio_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
10981092
if (test_bit(FLAG_OPEN_SOURCE, &desc->flags))
10991093
lineinfo.flags |= (GPIOLINE_FLAG_OPEN_SOURCE |
11001094
GPIOLINE_FLAG_IS_OUT);
1101-
if (test_bit(FLAG_PULL_DOWN, &desc->flags))
1102-
lineinfo.flags |= GPIOLINE_FLAG_PULL_DOWN;
1103-
if (test_bit(FLAG_PULL_UP, &desc->flags))
1104-
lineinfo.flags |= GPIOLINE_FLAG_PULL_UP;
11051095

11061096
if (copy_to_user(ip, &lineinfo, sizeof(lineinfo)))
11071097
return -EFAULT;
@@ -2795,8 +2785,6 @@ static bool gpiod_free_commit(struct gpio_desc *desc)
27952785
clear_bit(FLAG_REQUESTED, &desc->flags);
27962786
clear_bit(FLAG_OPEN_DRAIN, &desc->flags);
27972787
clear_bit(FLAG_OPEN_SOURCE, &desc->flags);
2798-
clear_bit(FLAG_PULL_UP, &desc->flags);
2799-
clear_bit(FLAG_PULL_DOWN, &desc->flags);
28002788
clear_bit(FLAG_IS_HOGGED, &desc->flags);
28012789
ret = true;
28022790
}

include/uapi/linux/gpio.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ struct gpiochip_info {
3333
#define GPIOLINE_FLAG_ACTIVE_LOW (1UL << 2)
3434
#define GPIOLINE_FLAG_OPEN_DRAIN (1UL << 3)
3535
#define GPIOLINE_FLAG_OPEN_SOURCE (1UL << 4)
36-
#define GPIOLINE_FLAG_PULL_UP (1UL << 5)
37-
#define GPIOLINE_FLAG_PULL_DOWN (1UL << 6)
3836

3937
/**
4038
* struct gpioline_info - Information about a certain GPIO line
@@ -64,8 +62,6 @@ struct gpioline_info {
6462
#define GPIOHANDLE_REQUEST_ACTIVE_LOW (1UL << 2)
6563
#define GPIOHANDLE_REQUEST_OPEN_DRAIN (1UL << 3)
6664
#define GPIOHANDLE_REQUEST_OPEN_SOURCE (1UL << 4)
67-
#define GPIOHANDLE_REQUEST_PULL_UP (1UL << 5)
68-
#define GPIOHANDLE_REQUEST_PULL_DOWN (1UL << 6)
6965

7066
/**
7167
* struct gpiohandle_request - Information about a GPIO handle request

0 commit comments

Comments
 (0)