missinglinkelectronics / libuio

UserspaceIO helper library
GNU Lesser General Public License v2.1
30 stars 28 forks source link

Added search by base address helper function #10

Closed asm2750 closed 6 years ago

asm2750 commented 6 years ago

Fixed commit history and rebased fork to latest commit from Linutronix/libuio.

Prior pull request text: Added a helper function that searches the memory map members of each UIO instance based on a given base address and returns the first UIO info structure that has the matching base address.

Should be helpful for FPGA based and other embedded systems. Most custom peripherals are accessed through a base address already but the device tree that gets generated by tools tend to not use unique names for the field that UIO uses making it hard to know if the correct peripheral is being used.

manut commented 6 years ago

I'm not happy with unsigned long as data type for the base address.

asm2750 commented 6 years ago

I've made the changes. I don't know if I'm squashing my commits correctly though.

asm2750 commented 6 years ago

Looks like it got put into the master. Thank you.

manut commented 6 years ago

You're welcome! I just reworked your commit message and folded the two patches into one and fixed up some tab/whitespace errors. I hope you're fine with that ;)

asm2750 commented 6 years ago

Perfectly fine. I use SVN more than Git so I'm not an expert at it. Do you have any helpful resources on how to fold patches into one using Git? I tried using rebase but I feel like it made more of a mess than it was worth.

manut commented 6 years ago

On Tue, May 08, 2018 at 11:38:15AM -0700, asm2750 wrote:

Perfectly fine. I use SVN more than Git so I'm not an expert at it. Do you have any helpful resources on how to fold patches into one using Git? I tried using rebase but I feel like it made more of a mess than it was worth.

git rebase -i

..interactive is the trick ;)