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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <wv75wb5bif67u3yzbgbmrfg75zseamfvehewwyl4xnm3ecmqrj@5yqkwsrdlfzg>
Date: Wed, 21 Jan 2026 09:27:56 -0800
From: Dmitry Torokhov <dmitry.torokhov@...il.com>
To: Linus Walleij <linusw@...nel.org>
Cc: 756271518@...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

On Wed, Jan 21, 2026 at 12:43:01PM +0100, Linus Walleij wrote:
> 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.)

Right, we do not need a custom driver for that (especially one using
legacy APIs and custom event codes and defining special classes).

Thanks.

-- 
Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ