All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] edt-ft5x06 - cannot see IRQ Qfrom device after DT probe
@ 2014-07-15 17:43 Markus Niebel
  2014-07-16 10:01 ` Simon Budig
  0 siblings, 1 reply; 4+ messages in thread
From: Markus Niebel @ 2014-07-15 17:43 UTC (permalink / raw)
  To: linux-input

Hallo,

working with said tochcontroller we found that the IRQ is not seen in the following scenario:

- bootloader uses pin as an output for some reason 
- pin is configured as GPIO and as INT source via device tree
- driver loads correctly and communicates over I2C
- IRQs not seen by CPU becaus pin is still configured as output

- when adding an int-gpios node to devicetree and parsing this gpio the gpio will be configured as input
- IRQ can be seen by CPU

Question:

- shall we add an int-gpio property to enable gpio pin config as input or

Regards

Markus Niebel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFC] edt-ft5x06 - cannot see IRQ Qfrom device after DT probe
  2014-07-15 17:43 [RFC] edt-ft5x06 - cannot see IRQ Qfrom device after DT probe Markus Niebel
@ 2014-07-16 10:01 ` Simon Budig
  2014-07-22 10:40   ` Markus Niebel
  0 siblings, 1 reply; 4+ messages in thread
From: Simon Budig @ 2014-07-16 10:01 UTC (permalink / raw)
  To: Markus Niebel, linux-input

[-- Attachment #1: Type: text/plain, Size: 630 bytes --]

On 15/07/14 19:43, Markus Niebel wrote:
> - when adding an int-gpios node to devicetree and parsing this gpio the gpio will be configured as input
> - IRQ can be seen by CPU
> 
> Question:
> 
> - shall we add an int-gpio property to enable gpio pin config as input or

Shouldn't it be possible to configure the pin as input directly from the
device tree, indepently from the touch driver section?

Bye,
        Simon

-- 
       Simon Budig                        kernel concepts GmbH
       simon.budig@kernelconcepts.de      Sieghuetter Hauptweg 48
       +49-271-771091-17                  D-57072 Siegen



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 242 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFC] edt-ft5x06 - cannot see IRQ Qfrom device after DT probe
  2014-07-16 10:01 ` Simon Budig
@ 2014-07-22 10:40   ` Markus Niebel
  2014-07-22 13:47     ` Simon Budig
  0 siblings, 1 reply; 4+ messages in thread
From: Markus Niebel @ 2014-07-22 10:40 UTC (permalink / raw)
  To: Simon Budig, linux-input

Am 16.07.2014 12:01, wrote Simon Budig:
> On 15/07/14 19:43, Markus Niebel wrote:
>> - when adding an int-gpios node to devicetree and parsing this gpio the gpio will be configured as input
>> - IRQ can be seen by CPU
>>
>> Question:
>>
>> - shall we add an int-gpio property to enable gpio pin config as input or
> 
> Shouldn't it be possible to configure the pin as input directly from the
> device tree, indepently from the touch driver section?

I don't see, how to do that, maybe I did miss the right point.

I digged through the gpio code. There are drivers (gpio-omap) that make sure, that gpio is configured as
input and others that don't care (gpio-mxc / gpio-mxs).

seeing this I posted "gpio: gpio-mxc: make sure gpio is input when request IRQ" on linux-arm-kernel

Global question is: how can we make sure, that the driver that request the IRQ requests also the GPIO (implicit or like in the old platfrom data days explicit)? But thats beyond input devices and my knowledge. 

Regards

Markus

> 
> Bye,
>         Simon
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFC] edt-ft5x06 - cannot see IRQ Qfrom device after DT probe
  2014-07-22 10:40   ` Markus Niebel
@ 2014-07-22 13:47     ` Simon Budig
  0 siblings, 0 replies; 4+ messages in thread
From: Simon Budig @ 2014-07-22 13:47 UTC (permalink / raw)
  To: Markus Niebel, linux-input

[-- Attachment #1: Type: text/plain, Size: 1893 bytes --]

On 22/07/14 12:40, Markus Niebel wrote:
> Am 16.07.2014 12:01, wrote Simon Budig:
>> On 15/07/14 19:43, Markus Niebel wrote:
>>> - when adding an int-gpios node to devicetree and parsing this 
>>> gpio the gpio will be configured as input - IRQ can be seen by 
>>> CPU
>>> 
>>> Question:
>>> 
>>> - shall we add an int-gpio property to enable gpio pin config as 
>>> input or
>> 
>> Shouldn't it be possible to configure the pin as input directly 
>> from the device tree, indepently from the touch driver section?
> 
> I don't see, how to do that, maybe I did miss the right point.

Try looking at

Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt

There you have the "input-enable" generic property.

> Global question is: how can we make sure, that the driver that 
> request the IRQ requests also the GPIO (implicit or like in the old 
> platfrom data days explicit)? But thats beyond input devices and my 
> knowledge.

The driver does not depend on the IRQ coming from a "real" CPU gpio. It
*could* be an external gpio expander or whatever (whether that is a good
idea is debatable of course). When I submitted the first version of the
driver it had bits in it to configure the pin properly. The feedback
basically was to remove that, because it made some assumptions that you
can map the IRQ to the relevant GPIO, which is not always possible.

I hope that helps.

(But really, your bootloader really should have a *very* good reason to
configure the touch irq pin as output - I have the impression that right
now there are two outputs driving against each other in your setup - not
healthy for the hardware).

Bye,
        Simon

-- 
       Simon Budig                        kernel concepts GmbH
       simon.budig@kernelconcepts.de      Sieghuetter Hauptweg 48
       +49-271-771091-17                  D-57072 Siegen


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-07-22 13:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-15 17:43 [RFC] edt-ft5x06 - cannot see IRQ Qfrom device after DT probe Markus Niebel
2014-07-16 10:01 ` Simon Budig
2014-07-22 10:40   ` Markus Niebel
2014-07-22 13:47     ` Simon Budig

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.