Re: how to request gpiochip line which is only valid as an interrupt?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 12 Jun 2024 10:55:55 +0200
Marek Behún <kabel@xxxxxxxxxx> wrote:

> > Users can still read the value of this pin but won't be able to set
> > direction to output.  
> 
> Users are not supposed to read value of this pin, because it is not a
> GPIO pin. The corresponding bit is not set in gpiochip.valid_mask.
> It is for example impossible to export it in /sys/class/gpio.
> 
> This line is valid only as an IRQ (the
> corresponding bit is set in gpiochip.irq.valid_mask).

I am starting to thing that this might be the problem, that the line is
not valid as GPIO, only as an IRQ. gpiolib seems to be unable to handle
that.

Indeed, the definition of the function
  gpiochip_irqchip_irq_valid()
first checks if the line is valid as gpio:

  static bool gpiochip_irqchip_irq_valid(const struct gpio_chip *gc,
                                         unsigned int offset)
  {
          if (!gpiochip_line_is_valid(gc, offset))
                  return false;
          ...






[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux