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]
Date:	Tue, 17 May 2016 21:13:55 +0200
From:	Benjamin Tissoires <benjamin.tissoires@...hat.com>
To:	Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc:	Bastien Nocera <hadess@...ess.net>, linux-input@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] Input - surface3_spi: add new driver for the Surface 3

On May 17 2016 or thereabouts, Dmitry Torokhov wrote:
> Hi Benjamin,
> 
> On Tue, May 17, 2016 at 12:16:19PM +0200, Benjamin Tissoires wrote:
> > This is a basic driver for the Surface 3. I am not so sure it will work
> > with any firmwares as most values are encoded, but given that I only have
> > access to my current device with its firmware and I don't have the
> > datasheet, it should be OK for now.
> > 
> > The Surface Pen is not supported (if it is supposed to be). I'll work on
> > this when I get one.
> > 
> > Signed-off-by: Benjamin Tissoires <benjamin.tissoires@...hat.com>
> > ---
> > Changes in v2:
> > 
> > - module renamed from ntrig_spi to surface3_spi
> > - took into account Dmitry's remarks
> > - kept the retrieval of the GPIO as mandatory as otherwise the device fails to work
> > 
> > Changes in v3:
> > 
> > - asm include put at the end
> > - used proper types in struct surfacae3_ts_data_finger
> > - dropped temps in surface3_spi_report_touch()
> > - inlined surface3_spi_request_irq()
> > - detect IRQ type (falling/rising) depending on the gpiod active low parameter
> 
> I do not think that this should be done in the driver. The device either
> has interrupt descriptor or GpioInt decriptor in DSDT and SPI core/ACPI
> should do the right thing and configure GPIO as input and set interrupt
> polarity accordingly, so when you do request_threaded_irq() you only
> need to specify IRQF_ONESHOT.
> 
> See drivers/spi/spi.c - in case there is no interrupt specified we call
> acpi_dev_gpio_irq_get(). Do you see it called in your case? Or your DSDT
> has interrupt for the touchscreen device and acpi_spi_add_resource() and
> acpi_dev_resource_interrupt() are called? You need to trace it and
> figure out if there is an issue there with setting up interrupt
> properly.

Looks like I need to push further the tests. From what I can see, using
just IRQF_ONESHOT is not sufficient enough and I need to add the trigger
falling manually (thus this way of doing).

I'll keep digging.

Cheers,
Benjamin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ