Re: Meson I2C driver working

Robert Swindells <[email protected]>
Newsgroups gmane.os.netbsd.ports.arm
Message-ID <[email protected]>
Vincent DEFERT <[email protected]> wrote:
> Now, what's the procedure for submitting it for merge?
> I have added 2 files and modified 2 other files.

I spotted some style things that I think we would want to change before
adding it:

There was some trailing whitespace in the meson_i2c.c file.

We usually tag softc structure members with a common stem, so members of
'struct mesoni2c_softc' would start with 'sc_'.

The comment on the first line and a line after the include of
<sys/cdefs.h> with a __KERNEL_RCSID macro to hold the CVS tag were
missing.

The #define values at the top of the file could be made to line up.

The entry in files.meson for it doesn't define a 'condition', so the
file would always get included whether it was in a kernel config or
not. The GENERIC64 kernel ends up including everything anyway but
some people (like me) still do custom kernels.

Maybe change it to this:

device  mesoniic: i2cbus, i2cexec
attach  mesoniic at fdt with meson_i2c
file    arch/arm/amlogic/meson_i2c.c            meson_i2c

Then change the first argument to the CFATTACH_DECL_NEW to match it:

CFATTACH_DECL_NEW(meson_i2c, sizeof(struct mesoni2c_softc),
    mesoni2c_match, mesoni2c_attach, NULL, NULL);


Did you wire up an EPROM yourself or is it actually on all the odroid-c2
boards?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.