Page MenuHomeFreeBSD

Update mv_gpio driver to new FreeBSD API
ClosedPublic

Authored by pdk_semihalf.com on Mar 19 2018, 6:13 PM.
Tags
Referenced Files
Unknown Object (File)
Mon, Nov 18, 7:53 PM
Unknown Object (File)
Tue, Oct 29, 10:56 AM
Unknown Object (File)
Oct 18 2024, 4:33 AM
Unknown Object (File)
Oct 7 2024, 4:43 PM
Unknown Object (File)
Oct 4 2024, 4:44 PM
Unknown Object (File)
Oct 4 2024, 9:53 AM
Unknown Object (File)
Oct 1 2024, 1:25 PM
Unknown Object (File)
Sep 29 2024, 9:35 AM

Details

Summary

This patch implements and exports functions described
in gpio_if.m file. It also uses new gpiobus_attach_bus function
instead of adding gpioc and gpiobus as children. It removes
ulgy reading SoC ID and related if..else, so it depends only on
data read from FDT.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

@manu I se you NACKed the patch, but don't see the actual remarks

In D14756#310616, @mw wrote:

@manu I se you NACKed the patch, but don't see the actual remarks

It's automatic by phabricator. @manu has it set up to add himself as a blocking reviewer on dts changes.

@andrew Right, I looked more closely at the icon after posting my comment :)

Hi @manu , do you have any objections to the patch?

Hello Marcin, sorry, I've added a few comments.
I will look more later today.

sys/arm/mv/gpio.c
205 ↗(On Diff #40470)

if (blah == 0)
return (ENXIO);

230 ↗(On Diff #40470)

if (bootverbose)
device_printf(

332 ↗(On Diff #40470)

mtx_destroy and bus_release resource is missing (maybe others)

pdk_semihalf.com updated this revision to Diff 41895.

Fixed all issues pointed by manu

This revision is now accepted and ready to land.Apr 26 2018, 6:36 PM

Thanks.
You might want to add access_32/config_32 in a futur patch too.

This revision was automatically updated to reflect the committed changes.