Use GPIO directory based on actual device tree path #34

Merged
merged 2 commits into from Apr 3, 2015

Conversation

Projects
None yet
6 participants
@VipSaran
Contributor

VipSaran commented Mar 8, 2015

By testing the device tree directory we can detrermine whether to use the "old" /sys/devices/virtual/gpio path or to use the one used after update to kernel 3.18.x: /sys/class/gpio, so both configurations are supported.

@jfriend00

This comment has been minimized.

Show comment
Hide comment
@jfriend00

jfriend00 Mar 8, 2015

This diff changes basic code formatting in ~50 places such that it is next to impossible to find what the functional change were to the code. This would be a much better submission if the diff was only the functional changes.

This diff changes basic code formatting in ~50 places such that it is next to impossible to find what the functional change were to the code. This would be a much better submission if the diff was only the functional changes.

@VipSaran

This comment has been minimized.

Show comment
Hide comment
@VipSaran

VipSaran Mar 8, 2015

Contributor

Fixed with commit VipSaran@2636804 (reverted the whitespace changes).

Contributor

VipSaran commented Mar 8, 2015

Fixed with commit VipSaran@2636804 (reverted the whitespace changes).

@jfriend00

This comment has been minimized.

Show comment
Hide comment
@jfriend00

jfriend00 Mar 8, 2015

Finally found a way to see just the "net" diff: master...VipSaran:master

Finally found a way to see just the "net" diff: master...VipSaran:master

@VipSaran

This comment has been minimized.

Show comment
Hide comment
@VipSaran

VipSaran Mar 8, 2015

Contributor

@jfriend00 you "found the way" becuse I added another commit to the pull request, just as I commented above.

Contributor

VipSaran commented Mar 8, 2015

@jfriend00 you "found the way" becuse I added another commit to the pull request, just as I commented above.

@jfriend00

This comment has been minimized.

Show comment
Hide comment
@jfriend00

jfriend00 Mar 8, 2015

@VipSaran - I know you added another commit. But even then, neither one of your commits made it easy to see the "net" diff so I had to find a way to see a diff between two non-sequential versions on Github. That's what I had to "find". I'm not a github expert so you weren't making it easy to see the meaningful diff which is what I cared about - even with your additional commit. When I found out how to do it, I thought I'd share so others could likewise just click on a link to see what functionally changed.

@VipSaran - I know you added another commit. But even then, neither one of your commits made it easy to see the "net" diff so I had to find a way to see a diff between two non-sequential versions on Github. That's what I had to "find". I'm not a github expert so you weren't making it easy to see the meaningful diff which is what I cared about - even with your additional commit. When I found out how to do it, I thought I'd share so others could likewise just click on a link to see what functionally changed.

@VipSaran

This comment has been minimized.

Show comment
Hide comment
@VipSaran

VipSaran Mar 8, 2015

Contributor

You don't have to be an expert. Just open Pull Request / Files Changed tab and you see the absolute difference between the upstream and the fork:
image

Contributor

VipSaran commented Mar 8, 2015

You don't have to be an expert. Just open Pull Request / Files Changed tab and you see the absolute difference between the upstream and the fork:
image

@lurch

This comment has been minimized.

Show comment
Hide comment
@lurch

lurch Mar 21, 2015

AFAIK you shouldn't ever need to use /sys/devices/virtual/gpio and you should always just use /sys/class/gpio, regardless of whether DeviceTree is being used or not?
As raspberrypi/linux#791 (comment) explains.

lurch commented Mar 21, 2015

AFAIK you shouldn't ever need to use /sys/devices/virtual/gpio and you should always just use /sys/class/gpio, regardless of whether DeviceTree is being used or not?
As raspberrypi/linux#791 (comment) explains.

@bestander

This comment has been minimized.

Show comment
Hide comment
@bestander

bestander Mar 25, 2015

👍 can this be merged please?

👍 can this be merged please?

@jsavko

This comment has been minimized.

Show comment
Hide comment
@jsavko

jsavko Mar 25, 2015

This patch also makes it work with the Raspberry Pi 2 B. I was testing it last night.

jsavko commented Mar 25, 2015

This patch also makes it work with the Raspberry Pi 2 B. I was testing it last night.

rakeshpai added a commit that referenced this pull request Apr 3, 2015

Merge pull request #34 from VipSaran/master
Use GPIO directory based on actual device tree path

@rakeshpai rakeshpai merged commit c007832 into rakeshpai:master Apr 3, 2015

@rakeshpai

This comment has been minimized.

Show comment
Hide comment
@rakeshpai

rakeshpai Apr 3, 2015

Owner

Published to npm as 0.0.7. Thanks, @VipSaran @jfriend00 @jsavko.

Owner

rakeshpai commented Apr 3, 2015

Published to npm as 0.0.7. Thanks, @VipSaran @jfriend00 @jsavko.

@VipSaran

This comment has been minimized.

Show comment
Hide comment
@VipSaran

VipSaran Apr 3, 2015

Contributor

Thanks @rakeshpai

Contributor

VipSaran commented Apr 3, 2015

Thanks @rakeshpai

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment