[meta-intel] gpio sus configuration as interrupt

Kumar Nagaraj kumarn at hcl.com
Sat May 10 09:03:13 PDT 2014


Darren,
        Some more queries..
Cat /sys/kernel/debug/gpio dump showed few of the gpio pins having direction as in,in-out & few others have blank(directionless).
I tried sysfs commands for changing direction & values for all these gpios.I found that I could only set & get the values successfully of gpios that have direction in-out . For those  gpios that have direction in, I was able to change direction from in to out,but  unable to set the values.Does it imply that gpios configured as direction in are not exported by BIOS?

However I did not experiment using gpiolib APIs & sysfs commands for the gpios that are directionless. I should be able to configure the direction-less gpios using sysfs or gpiolib APIs,correct?

Drivers can export gpios to user space using gpio_export() similarly Iam thinking BIOS firmware should have mechanism for exporting the gpios to drivers.Is this understanding correct?If yes then how do I check that?

Also through diagnostics code(non-os) it was found that the readback of the gpio values  for the gpios that are configured as direction out are not matching with the  initially written value. Does it mean that the gpio value written cannot be readback correctly? please provide detailed clarification

Also can you confirm whether writing to a particular gpio would affect the adjacent gpios


Thanks & Regards,
Kumar


-----Original Message-----
From: Kumar Nagaraj
Sent: Saturday, May 10, 2014 1:20 PM
To: 'Darren Hart'; Chew, Chiau Ee
Cc: meta-intel at yoctoproject.org
Subject: RE: [meta-intel] gpio sus configuration as interrupt

Yes Darren all the interrupts are listed in /proc/interrupts.

-----Original Message-----
From: Darren Hart [mailto:dvhart at linux.intel.com]
Sent: Saturday, May 10, 2014 4:55 AM
To: Kumar Nagaraj; Chew, Chiau Ee
Cc: meta-intel at yoctoproject.org<mailto:meta-intel at yoctoproject.org>
Subject: Re: [meta-intel] gpio sus configuration as interrupt


From:  Kumar Nagaraj <kumarn at hcl.com<mailto:kumarn at hcl.com>>
Date:  Friday, May 9, 2014 at 16:11
To:  Chiau Ee Chew <chiau.ee.chew at intel.com<mailto:chiau.ee.chew at intel.com>>, Darren Hart <dvhart at linux.intel.com<mailto:dvhart at linux.intel.com>>
Cc:  "meta-intel at yoctoproject.org<mailto:meta-intel at yoctoproject.org>" <meta-intel at yoctoproject.org<mailto:meta-intel at yoctoproject.org>>
Subject:  Re: [meta-intel] gpio sus configuration as interrupt


>Chiau,
>                We have a developed custom board using BYT-I processor
>& have assigned GPIO_SUS[0],GPIO_SUS[1]Š.GPIO_SUS[4] to switches or buttons.
>I configured these GPIOs as irqs using
>/mmc/host/sdhc-pci.c as reference.No error returned when configuring
>gpio_to_irq.I  registered a single interrupt handler for all these
>gpios. However my interrupt handler did not get invoked when the
>buttons are pressed. Can you provide the reasons for this?
>
>Following is the  gpio debugfs dump obtained using command cat
>/sys/kernel/debug/gpio
>
>GPIOs     50-65,  i2c/5-00 27,pca9535,can sleep
>GPIOs 82-125, platform/byt_gpio.2,byt_gpio.2
>Gpio-0      in    IO pad-29     offset :0x1d0    mux:0
>Gpio-1      in    IO pad-33     offset :0x210    mux:0
>Gpio-2      in    IO pad-30     offset :0x1e0    mux:0
>Gpio-3      in    IO pad-31     offset :0x1f0    mux:0
>Gpio-4      in    IO pad-32     offset :0x200   mux:0



What is the output of /proc/interrupts. Do you see your interrupts listed there?

--
Darren





::DISCLAIMER::
----------------------------------------------------------------------------------------------------------------------------------------------------

The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.
E-mail transmission is not guaranteed to be secure or error-free as information could be intercepted, corrupted,
lost, destroyed, arrive late or incomplete, or may contain viruses in transmission. The e mail and its contents
(with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates.
Views or opinions, if any, presented in this email are solely those of the author and may not necessarily reflect the
views or opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification,
distribution and / or publication of this message without the prior written consent of authorized representative of
HCL is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately.
Before opening any email and/or attachments, please check them for viruses and other defects.

----------------------------------------------------------------------------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/meta-intel/attachments/20140510/369745b9/attachment.html>


More information about the meta-intel mailing list