Hi Linaro,
I am trying to attach interrupt handlers to the push buttons on the arndale board. Your patch adds in dts information on the push buttons
menu { + label = "SW-TACT2"; + gpios = <&gpx1 4 1>; + linux,code = <139>; + gpio-key,wakeup; + };
I assume that <139> is the GPU number in base 10. Is this correct ? Also what is the significance of gpx1 and 4 1 ?
As per my understanding if 139 the GPIO number then it should be mapped to a GPIO register where the state Input/ouput/Interrupt has to be set.
I am not able to find that register in the "Exynos_5_Dual_User_Manaul_Public_REV100-0", All I could find a set of GPXXXX registers but no mapping between <139> and those registers.
Can anyone explain the steps, on how to associate the push button to INT (IRQ)
Thanks in Advance.. -mj
On 17 September 2013 15:52, MJ embd mj.embd@gmail.com wrote:
Hi Linaro,
I am trying to attach interrupt handlers to the push buttons on the arndale board. Your patch adds in dts information on the push buttons
menu {
label = "SW-TACT2";
gpios = <&gpx1 4 1>;
linux,code = <139>;
gpio-key,wakeup;
};
I assume that <139> is the GPU number in base 10. Is this correct ?
No, that is the key code for MENU button, as defined in include/uapi/linux/input.h.
Also what is the significance of gpx1 and 4 1 ?
This tells us that we are using GPX1[4] gpio for this operation.
Thanks tushar for reply.
On 9/17/13, Tushar Behera tushar.behera@linaro.org wrote:
On 17 September 2013 15:52, MJ embd mj.embd@gmail.com wrote:
Hi Linaro,
I am trying to attach interrupt handlers to the push buttons on the arndale board. Your patch adds in dts information on the push buttons
menu {
label = "SW-TACT2";
gpios = <&gpx1 4 1>;
linux,code = <139>;
gpio-key,wakeup;
};
I assume that <139> is the GPU number in base 10. Is this correct ?
No, that is the key code for MENU button, as defined in include/uapi/linux/input.h.
Also what is the significance of gpx1 and 4 1 ?
This tells us that we are using GPX1[4] gpio for this operation.
a) There are 4 GPX1 registers namely GPX1CON, GPX1DAT, GPX1PUD, GPX1DRV. What is the [4] index which you are referring to ?
b) What I understand from your patch is that each SW-TACTn maps to a GPXn, is this correct ?
From the manual if I set 0xf to the GPX1CON [7:4] it will be
configured as interrupt 41, 0xF = EXT_INT41[1] So if I press button TACT2 There would be IRQ 41 interrupt for the core. Is this correct ?
b.2) What does EXT_INT41[1] "[1]" mean ?
c) Is there some app note from samsung/linaro on how to configure the GPIO as interrupt. The public reference manual is not that intuitive
-- Tushar Behera
Thanks and regards, -mj
On 17 September 2013 16:35, MJ embd mj.embd@gmail.com wrote:
menu {
label = "SW-TACT2";
gpios = <&gpx1 4 1>;
linux,code = <139>;
gpio-key,wakeup;
};
I assume that <139> is the GPU number in base 10. Is this correct ?
No, that is the key code for MENU button, as defined in include/uapi/linux/input.h.
Also what is the significance of gpx1 and 4 1 ?
This tells us that we are using GPX1[4] gpio for this operation.
a) There are 4 GPX1 registers namely GPX1CON, GPX1DAT, GPX1PUD, GPX1DRV. What is the [4] index which you are referring to ?
Each GPIO pin has the CON, DAT, PUD and DRV registers for controlling the pin characteristics/behaviour. When I say GPX1[4], you need to check GPX1CON[4], GPX1DAT[4], GPX1PUD[4] and GPX1DRV[4].
b) What I understand from your patch is that each SW-TACTn maps to a GPXn, is this correct ?
The mapping is provided in the Arndale board schematics, which you can download from Insignal's website [1].
[1] http://www.arndaleboard.org/wiki/index.php/Resources
From the manual if I set 0xf to the GPX1CON [7:4] it will be configured as interrupt 41, 0xF = EXT_INT41[1] So if I press button TACT2 There would be IRQ 41 interrupt for the core. Is this correct ?
b.2) What does EXT_INT41[1] "[1]" mean ?
External interrupts are grouped. GPX0 has control for 8 interrupts and GPX1 has another 4. So GPX0[0] is EINT_0 and GPX1[4] should ideally be EINT_12.
c) Is there some app note from samsung/linaro on how to configure the GPIO as interrupt. The public reference manual is not that intuitive
Not much documentation on that. You would need to study Samsung pin-control related code for this.
PS:Adding linux kernel for a larger forum comments
Hi Linaro,
I am trying to attach interrupt handlers to the push buttons on the arndale board. Your patch adds in dts information on the push buttons
menu { + label = "SW-TACT2"; + gpios = <&gpx1 4 1>; + linux,code = <139>; + gpio-key,wakeup; + };
I assume that <139> is the GPU number in base 10. Is this correct ? Also what is the significance of gpx1 and 4 1 ?
As per my understanding if 139 the GPIO number then it should be mapped to a GPIO register where the state Input/ouput/Interrupt has to be set.
I am not able to find that register in the "Exynos_5_Dual_User_Manaul_Public_REV100-0", All I could find a set of GPXXXX registers but no mapping between <139> and those registers.
Can anyone explain the steps, on how to associate the push button to INT (IRQ)
Thanks in Advance..
linaro-kernel@lists.linaro.org