devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* dts: question about how to configure PIO used as i2c irq
@ 2012-10-15  2:53 Bo Shen
       [not found] ` <507B7AC3.7090904-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Bo Shen @ 2012-10-15  2:53 UTC (permalink / raw)
  To: linux-arm-kernel, devicetree-discuss; +Cc: Ferre, Nicolas

Hi All,
   When moving atmel qt1070 linux driver with DT support. The atmel 
qt1070 is an I2C device. I meet the following questions.

   The qt1070 DT node
   --<--------------
   qt1070: keyboard@1b {
         compatible = "atmel,qt1070";
         reg = <0x1b>;
         interrupt-parent = <&pioA>;
         interrupts = <7 0x0>;
   };
   -->--------------

   DT will parse this node and map irq, the i2c_client->irq. This can be 
used directly in atmel qt1070 driver. However, the PIO which used as irq 
need configure as a PIO input. Now, we can not use irq_to_gpio() 
function to convert irq to gpio. So, if we can not configure this gpio.

   If we configure the pio in board-dt.c, I think this is not a good 
place. For example, if the kernel image support multiplatform, while on 
these platform, using different pio for qt1070, so this will cause only 
one platform can use qt1070.

   So, for this question, how should I solve it? Would you please give 
me some advice?

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

* Re: dts: question about how to configure PIO used as i2c irq
       [not found] ` <507B7AC3.7090904-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2012-10-15  5:57   ` Jean-Christophe PLAGNIOL-VILLARD
       [not found]     ` <20121015055720.GQ12801-RQcB7r2h9QmfDR2tN2SG5Ni2O/JbrIOy@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-10-15  5:57 UTC (permalink / raw)
  To: Bo Shen
  Cc: devicetree-discuss,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

On 10:53 Mon 15 Oct     , Bo Shen wrote:
> Hi All,
>   When moving atmel qt1070 linux driver with DT support. The atmel
> qt1070 is an I2C device. I meet the following questions.
> 
>   The qt1070 DT node
>   --<--------------
>   qt1070: keyboard@1b {
>         compatible = "atmel,qt1070";
>         reg = <0x1b>;
>         interrupt-parent = <&pioA>;
>         interrupts = <7 0x0>;
>   };
>   -->--------------
> 
>   DT will parse this node and map irq, the i2c_client->irq. This can
> be used directly in atmel qt1070 driver. However, the PIO which used
> as irq need configure as a PIO input. Now, we can not use
> irq_to_gpio() function to convert irq to gpio. So, if we can not
> configure this gpio.
> 
>   If we configure the pio in board-dt.c, I think this is not a good
> place. For example, if the kernel image support multiplatform, while
> on these platform, using different pio for qt1070, so this will
> cause only one platform can use qt1070.
> 
>   So, for this question, how should I solve it? Would you please
> give me some advice?
I already reply you in private 4 times

you have only 2 choice pass the gpio and manage in c
or configure the gpio as input in the xlate or map of the gpio drivers and the
mux via pinctrl

Best Regards,
J.

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

* Re: dts: question about how to configure PIO used as i2c irq
       [not found]     ` <20121015055720.GQ12801-RQcB7r2h9QmfDR2tN2SG5Ni2O/JbrIOy@public.gmane.org>
@ 2012-10-15  8:07       ` Nicolas Ferre
  2012-10-19  6:56         ` Bo Shen
  0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Ferre @ 2012-10-15  8:07 UTC (permalink / raw)
  To: Jean-Christophe PLAGNIOL-VILLARD
  Cc: devicetree-discuss, Bo Shen,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

On 10/15/2012 07:57 AM, Jean-Christophe PLAGNIOL-VILLARD :
> On 10:53 Mon 15 Oct     , Bo Shen wrote:
>> Hi All,
>>   When moving atmel qt1070 linux driver with DT support. The atmel
>> qt1070 is an I2C device. I meet the following questions.
>>
>>   The qt1070 DT node
>>   --<--------------
>>   qt1070: keyboard@1b {
>>         compatible = "atmel,qt1070";
>>         reg = <0x1b>;
>>         interrupt-parent = <&pioA>;
>>         interrupts = <7 0x0>;
>>   };
>>   -->--------------
>>
>>   DT will parse this node and map irq, the i2c_client->irq. This can
>> be used directly in atmel qt1070 driver. However, the PIO which used
>> as irq need configure as a PIO input. Now, we can not use
>> irq_to_gpio() function to convert irq to gpio. So, if we can not
>> configure this gpio.
>>
>>   If we configure the pio in board-dt.c, I think this is not a good
>> place. For example, if the kernel image support multiplatform, while
>> on these platform, using different pio for qt1070, so this will
>> cause only one platform can use qt1070.
>>
>>   So, for this question, how should I solve it? Would you please
>> give me some advice?
> I already reply you in private 4 times

Yes, but maybe it is because it was not well explained, or not developed
to the proper extend... So, please do not make these remarks: if the
conversation was private, it is not necessary to recall that here. Maybe
Voice is looking for help from someone else?

> you have only 2 choice pass the gpio and manage in c
> or configure the gpio as input in the xlate or map of the gpio drivers and the
> mux via pinctrl

Can you please develop a bit more: which xlate? How to tell the gpio
driver about the map? Can you provide an example?

Bye,
-- 
Nicolas Ferre

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

* Re: dts: question about how to configure PIO used as i2c irq
  2012-10-15  8:07       ` Nicolas Ferre
@ 2012-10-19  6:56         ` Bo Shen
  0 siblings, 0 replies; 4+ messages in thread
From: Bo Shen @ 2012-10-19  6:56 UTC (permalink / raw)
  To: Jean-Christophe PLAGNIOL-VILLARD
  Cc: devicetree-discuss, Nicolas Ferre, linux-arm-kernel

Hi J,

On 10/15/2012 16:07, Nicolas Ferre wrote:
> On 10/15/2012 07:57 AM, Jean-Christophe PLAGNIOL-VILLARD :
>> On 10:53 Mon 15 Oct     , Bo Shen wrote:
>>> Hi All,
>>>    When moving atmel qt1070 linux driver with DT support. The atmel
>>> qt1070 is an I2C device. I meet the following questions.
>>>
>>>    The qt1070 DT node
>>>    --<--------------
>>>    qt1070: keyboard@1b {
>>>          compatible = "atmel,qt1070";
>>>          reg = <0x1b>;
>>>          interrupt-parent = <&pioA>;
>>>          interrupts = <7 0x0>;
>>>    };
>>>    -->--------------
>>>
>>>    DT will parse this node and map irq, the i2c_client->irq. This can
>>> be used directly in atmel qt1070 driver. However, the PIO which used
>>> as irq need configure as a PIO input. Now, we can not use
>>> irq_to_gpio() function to convert irq to gpio. So, if we can not
>>> configure this gpio.
>>>
>>>    If we configure the pio in board-dt.c, I think this is not a good
>>> place. For example, if the kernel image support multiplatform, while
>>> on these platform, using different pio for qt1070, so this will
>>> cause only one platform can use qt1070.
>>>
>>>    So, for this question, how should I solve it? Would you please
>>> give me some advice?
>> I already reply you in private 4 times
>
> Yes, but maybe it is because it was not well explained, or not developed
> to the proper extend... So, please do not make these remarks: if the
> conversation was private, it is not necessary to recall that here. Maybe
> Voice is looking for help from someone else?
>
>> you have only 2 choice pass the gpio and manage in c
>> or configure the gpio as input in the xlate or map of the gpio drivers and the
>> mux via pinctrl
>
> Can you please develop a bit more: which xlate? How to tell the gpio
> driver about the map? Can you provide an example?

Any information for this? Search with google, I don't find any useful 
information.

> Bye,
>

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

end of thread, other threads:[~2012-10-19  6:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-15  2:53 dts: question about how to configure PIO used as i2c irq Bo Shen
     [not found] ` <507B7AC3.7090904-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-10-15  5:57   ` Jean-Christophe PLAGNIOL-VILLARD
     [not found]     ` <20121015055720.GQ12801-RQcB7r2h9QmfDR2tN2SG5Ni2O/JbrIOy@public.gmane.org>
2012-10-15  8:07       ` Nicolas Ferre
2012-10-19  6:56         ` Bo Shen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).