All of lore.kernel.org
 help / color / mirror / Atom feed
* GPIO-Direction issue
@ 2019-12-11 12:50 Kumar Thangavel
  2019-12-12 17:07 ` James Feist
  0 siblings, 1 reply; 3+ messages in thread
From: Kumar Thangavel @ 2019-12-11 12:50 UTC (permalink / raw)
  To: openbmc


[-- Attachment #1.1: Type: text/plain, Size: 1591 bytes --]

Hi All,

        I am using entity manager configuration file(.json) to enable the GPIO pin.
        The gpio node was created in /sys/class/gpio/* using configuration files.
        I set Direction as "Out" in json. But it was not getting changed in /sys/class/gpio/gpio*/Direction. The Direction was still remains as "in".

        Please find the attached logs for your reference.

        Could you please let us know how to set direction of GPIO.

Thanks,
Kumar.
::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.
________________________________

[-- Attachment #1.2: Type: text/html, Size: 4786 bytes --]

[-- Attachment #2: GPIO_log.png --]
[-- Type: image/png, Size: 32834 bytes --]

[-- Attachment #3: GPIO_config.PNG --]
[-- Type: image/png, Size: 3220 bytes --]

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

* Re: GPIO-Direction issue
  2019-12-11 12:50 GPIO-Direction issue Kumar Thangavel
@ 2019-12-12 17:07 ` James Feist
  2019-12-13  7:52   ` Kumar Thangavel
  0 siblings, 1 reply; 3+ messages in thread
From: James Feist @ 2019-12-12 17:07 UTC (permalink / raw)
  To: Kumar Thangavel, openbmc

On 12/11/19 4:50 AM, Kumar Thangavel wrote:
> Hi All,
> 
>          I am using entity manager configuration file(.json) to enable 
> the GPIO pin.
> 
>          The gpio node was created in /sys/class/gpio/* using 
> configuration files.
> 
>          I set Direction as "Out" in json. But it was not getting 
> changed in /sys/class/gpio/gpio*/Direction. The Direction was still 
> remains as "in".

Gpio usage via sysfs is deprecated. We're currently working to remove 
all usages of it ourselves that we have in entity-manager. I would 
suggest using libgpiod to use gpio via character device instead.

https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/tree/bindings/cxx

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

* Re: GPIO-Direction issue
  2019-12-12 17:07 ` James Feist
@ 2019-12-13  7:52   ` Kumar Thangavel
  0 siblings, 0 replies; 3+ messages in thread
From: Kumar Thangavel @ 2019-12-13  7:52 UTC (permalink / raw)
  To: James Feist, openbmc

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

Sure. Thanks for your suggestions.


Thanks,
Kumar.
________________________________
From: James Feist <james.feist@linux.intel.com>
Sent: 12 December 2019 22:37
To: Kumar Thangavel <thangavel.k@hcl.com>; openbmc@lists.ozlabs.org <openbmc@lists.ozlabs.org>
Subject: Re: GPIO-Direction issue

On 12/11/19 4:50 AM, Kumar Thangavel wrote:
> Hi All,
>
>          I am using entity manager configuration file(.json) to enable
> the GPIO pin.
>
>          The gpio node was created in /sys/class/gpio/* using
> configuration files.
>
>          I set Direction as "Out" in json. But it was not getting
> changed in /sys/class/gpio/gpio*/Direction. The Direction was still
> remains as "in".

Gpio usage via sysfs is deprecated. We're currently working to remove
all usages of it ourselves that we have in entity-manager. I would
suggest using libgpiod to use gpio via character device instead.

https://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit.kernel.org%2Fpub%2Fscm%2Flibs%2Flibgpiod%2Flibgpiod.git%2Ftree%2Fbindings%2Fcxx&amp;data=02%7C01%7Cthangavel.k%40hcl.com%7Cbf18dac88ecc4a35bc2508d77f25bb67%7C189de737c93a4f5a8b686f4ca9941912%7C0%7C0%7C637117672349243185&amp;sdata=Jeruefedzy4Bnb%2FIVjn4j1zT4YUhh9KwEH1tB6oNKxQ%3D&amp;reserved=0

::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.
________________________________

[-- Attachment #2: Type: text/html, Size: 4244 bytes --]

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

end of thread, other threads:[~2019-12-13  7:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-11 12:50 GPIO-Direction issue Kumar Thangavel
2019-12-12 17:07 ` James Feist
2019-12-13  7:52   ` Kumar Thangavel

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.