Re: [PATCH] enhanced i2c driver for MPC8xx/MPC8260 CPM ...
From: Murray Jensen <hidden>
Date: 2002-06-01 02:28:34
On Fri, 31 May 2002 07:47:25 -0700, Tom Rini [off-list ref] writes:
quoted
I think the file that includes <linux/i2c-algo-cpm.h> is expected to include commproc.h, or cpm_8260.h, as required. What is the policy on these things? Should every include file include all headers it needs? Anyone?IMHO, a header file should only include other things which the header itself needs. eg if you do 'u8 foo;' in foo.h, add #include <asm/types.h>
OK, but should it include *all* headers it needs? If so, then the existing <linux/i2c-algo-8xx.h> should include both <asm/8xx_immap.h> and <asm/commproc.h> since it uses the types "i2c8xx_t" and "cpm8xx_t".
Anything the C file needs itself, it should include, and for the sake of being explicit (and it's good for multi-arch drivers) if the C code does 'u8 bar;' it should do #include <asm/types.h> too.
Agreed.
quoted
Should we take this discussion off the list now? Cheers!Nah..
I was referring to the discussion about the combined 8xx/8260 i2c driver I posted. I agree - the above should stay on the list. Cheers! Murray... ** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/