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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAD++jLnSXPhqnTie9U03B7mn2x9ogUpABBLFwbt9dgtzdb3yNQ@mail.gmail.com>
Date: Wed, 21 Jan 2026 12:43:01 +0100
From: Linus Walleij <linusw@...nel.org>
To: 756271518@...com
Cc: dmitry.torokhov@...il.com, brgl@...nel.org, linux-kernel@...r.kernel.org, 
	linux-input@...r.kernel.org, linux-gpio@...r.kernel.org
Subject: Re: [PATCH] Add common hall sensor drivers

Hi Xuchen,

thanks for your patch!

On Wed, Jan 21, 2026 at 9:59 AM <756271518@...com> wrote:

> From: xuchen <756271518@...com>
>
> This patch adds support for common hall sensor ICs used in Qualcomm
> reference designs. The driver handles both rising and falling edges
> to detect magnetic field changes.
>
> Signed-off-by: xuchen <756271518@...com>

Why are you going to such lengths to create this driver?

What people do is usually just create a GPIO "key" input
for the hall sensor, for example:

        gpio_keys {
                compatible = "gpio-keys";
                #address-cells = <1>;
                #size-cells = <0>;
                vdd-supply = <&ab8500_ldo_aux1_reg>;
                pinctrl-names = "default";
                pinctrl-0 = <&hall_tvk_mode>;

                button@145 {
                        /* Hall sensor */
                        gpios = <&gpio4 17 GPIO_ACTIVE_HIGH>;
                        linux,code = <0>; /* SW_LID */
                        label = "HED54XXU11 Hall Effect Sensor";
                };
        };

This turns the GPIO line into a "lid switch" which is what you want,
and already supports regulators and pin control out of the box if
you need them too. (The VDD and pin control properties are optional.)

Yours,
Linus Walleij

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ