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] [day] [month] [year] [list]
Date:   Mon, 28 Oct 2019 13:05:15 +0000
From:   Jonathan Cameron <jonathan.cameron@...wei.com>
To:     Dmitry Torokhov <dmitry.torokhov@...il.com>
CC:     Jakub Ladman <ladmanj@...ny.cz>, Rob Herring <robh+dt@...nel.org>,
        "Mark Rutland" <mark.rutland@....com>,
        <linux-input@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <linux-hwmon@...r.kernel.org>, <linux-i2c@...r.kernel.org>,
        <devicetree@...r.kernel.org>, <linux-iio@...r.kernel.org>
Subject: Re: [PATCH][RESEND] New driver for TLV493D-A1B6 I2C chip, input and
 hwmon class device.

On Fri, 18 Oct 2019 13:56:37 -0700
Dmitry Torokhov <dmitry.torokhov@...il.com> wrote:

> Hi Jakub,
> 
> On Fri, Oct 18, 2019 at 10:10:19PM +0200, Jakub Ladman wrote:
> > Dear maintainers.
> > 
> > As a linux-patch newbie i made some mistakes in my first attempt to send
> > this patch.
> > This patch contains a new driver for i2c connected chip, Infineon
> > TLV493D-A1B6.
> > The chip is 3D hall-effect sensor with thermometer.
> > 
> > This particular driver senses magnetic field rotation in X/Y plane with 1
> > degree resolution and +/- 1 degree error.
> > 
> > Input device is created for the angle sensing part.
> > Hwmon device is created for the thermometer part.
> > 
> > Input device axis must be configured by device-tree. There are also optional
> > parameters regarding absolute/relative mode switching, minimum step in
> > relative mode, filtering and thermometer calibration.
> > 
> > We are using that device as high reliability rotary encoder.  
> 
> I wonder if IIO subsystem that support s magnetometers and temperature
> sensors would not be a better hone for this.
> 
> CC-ing Jonathan.
> 
Hi Jakub, Dmitry,

Sorry for slow reply, was on vacation.

Anyhow, from a quick glance at the datasheet this looks like a fairly standard
magnetometer, be it one designed for use with an associated magnet, rather than
intended for use to measure the earths magnetic field (compass type chips).

These devices only become an 'input device' once the relative positioning relative
to the magnet is known.  We should probably figure out a way to represent that
in DT etc for devices where it is known.  Whether we then do a bridge to input
using that info in kernel or pass it all up to userspace to deal with is a
separate issue, that position information needs to be described first.  My suspicion
is that it would be hard to handle the maths in kernel, but I've not tried
working it out!

So this would fit in IIO, even if the eventual 'use case' is classic input
(I'm guessing a rotary dial).

We have a driver for a part with similar support undergoing revisions at the
moment:

https://www.azoteq.com/images/stories/pdf/iqs624_datasheet.pdf

There might be other hall effect devices like this in IIO, I can't recall but
I certainly have one in my todo pile.

+CC linux-iio

Thanks,

Jonathan


> Also, your mailer mangled your patch pretty badly, please consider using
> git send-email next time.


> 
> Thanks.
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ