lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <tencent_83CBDD726353E21FBD648E831600C078F205@qq.com>
Date: Mon, 10 Mar 2025 10:40:29 +0800
From: hanyuan <hanyuan-z@...com>
Cc: netdev@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] net: enc28j60: support getting irq number from gpio
 phandle in the device tree

Hi Andrew, 

> My understanding is that you should not need most of this. The IRQ
> core will handle converting a GPIO to an interrupt, if you just list
> is as an interrupt source in the normal way.

> You say:
>
> > Additionally, it is necessary for platforms that do not support pin
> > configuration and properties via the device tree.
>
> Are you talking about ACPI?

Thanks for your review. Let me explain them.

I understand that specifying the interrupt as:

    interrupts = <&gpio2 23 IRQ_TYPE_LEVEL_LOW>;

would also work, and the IRQ subsystem will properly handle the
conversion during the SPI probe. However, my problem is that the
GPIO pin itself needs to be explicitly requested and configured a
an input before it can be used as an IRQ pin.

My embedded platform has limited support, it only provides a
hard-coded pin control driver and does not support configuring
pinctrl properties in the device tree. So, there is no generic
way to request the pin and set its direction via device tree bindings.

I noticed that some existing NIC drivers solve this issue by specifying
`irq-gpios` in the device tree, which ensures that the GPIO is properly
initialized before being converted to an IRQ.

That was my motivation for these patches.

And my changes are not related to ACPI in any way—they are mainly
focused on device tree handling.

Thanks,  
Hanyuan Zhao


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ