[PATCH 3/4] plat-s5p: Add platform support for MIPI-CSI2 devices
Marek Szyprowski
m.szyprowski at samsung.com
Fri Dec 3 04:59:07 EST 2010
Hello,
On Friday, December 03, 2010 2:37 AM Jassi Brar wrote:
> On Fri, Dec 3, 2010 at 2:39 AM, Sylwester Nawrocki
<snip>
> > I agree explicit indices are not really needed. I just followed the style of
> > all other resource definitions already there.
> > I am not quite sure what is the preference of the maintainer, I guess they want
> > all devices to follow same style for consistence.
>
> And that style has its origin because explicit indices are as because
> they stress the fact that
> drivers expect a particular resource at a particular index (when we
> have more than 1
> resource of a type).
> IMO we should use some macro shared between platform devices and their drivers.
> Something like -
> static struct resource s5p_csis_resource[] = {
> [PA_CSIS] = {
> .start = S5P_PA_CSIS0,
> .end = S5P_PA_CSIS0 + SZ_4K - 1,
> .flags = IORESOURCE_MEM,
> },
> [IRQ_CSIS] = {
> .start = IRQ_MIPICSI0,
> .end = IRQ_MIPICSI0,
> .flags = IORESOURCE_IRQ,
> }
> };
This looks like a huge over-engineering for me, especially for the simple device
that has only one register area and interrupt.
Best regards
--
Marek Szyprowski
Samsung Poland R&D Center
More information about the linux-arm-kernel
mailing list