Re: [PATCH] uio_pdrv: Unique IRQ Mode

From: Uwe Kleine-König
Date: Thu Jun 05 2008 - 07:34:03 EST


Hello Magnus,

Magnus Damm wrote:
> >> I don't think the board support level is the
> >> proper place for this code.
> >
> > You have to write code there anyway, e.g. code that configures your GPIO
> > as input, makes it generate interrupts and so on. And of course, you
> > have to setup your platform device as well. If you simply add the irq
> > handler, you can use uio_pdrv as-is. And if you _know_ that on your
> > platform the irq is not shared, this might really be a one-liner that
> > simply calls irq_disable. That's OK in board specific code, but not in a
> > generic driver.
>
> Ever heard about system on chip? Not all platform devices need board
> specific setup.
>
> >> The patch contains no board specific code,
> >> and it is independent of both architecture and cpu model.
> >
> > Every platform device driver depends on board support.
>
> Is that so?
This depends on the definition of "board support". I think of it as
"code for that (type of) machine", i.e. everything below arch/. With
that definition really each platform device depends on "board support"
because some code have to create and provide the platform_device.

> I suggest that you have a look at the mfd drivers and think again.
I haven't done that though.

Best regards
Uwe

--
Uwe Kleine-König, Software Engineer
Digi International GmbH Branch Breisach, Küferstrasse 8, 79206 Breisach, Germany
Tax: 315/5781/0242 / VAT: DE153662976 / Reg. Amtsgericht Dortmund HRB 13962
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/