WARNING: at drivers/gpio/gpiolib. c: 101 gpio_ensure_requested + 0x5c/0x118 (), gpio0x5c

Source: Internet
Author: User

WARNING: at drivers/gpio/gpiolib. c: 101 gpio_ensure_requested + 0x5c/0x118 (), gpio0x5c

When you use the key program implemented by the input subsystem, the following error is reported every time the key is interrupted:

--- Input_key_handler ---

------------ [Cut here] ------------

WARNING: at drivers/gpio/gpiolib. c: 101 gpio_ensure_requested + 0x5c/0x118 ()

Autorequest GPIO-145

The source code is as follows:

Irqreturn_t input_key_handler (int irqno, void * dev_id) {int value; printk ("--- % s --- \ n", _ FUNCTION __); value = gpio_direction_input (EXYNOS4_GPX1 (1); printk ("--- <DRV> --- % d \ n", value); input_report_key (input_key, KEY_HOME ,! Value); input_sync (input_key); return IRQ_HANDLED ;}

This problem occurs because you did not apply before using gpio_direction_input.

Two solutions:

1. Use gpio_request to apply for gpio before use

2. Change gpio_direction_input to gpio_get_value.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.