[0904_14] Siano: assemble all components to one kernel module
Quoted 74 lines · Trent Piepho
From: Trent Piepho <[email protected]>
Subject: Re: [PATCH] [0904_14] Siano: assemble all components to one kernel module
To: "Uri Shkolnik" <[email protected]>
Cc: "Mauro Carvalho Chehab" <[email protected]>, [email protected]
Date: Tuesday, April 28, 2009, 9:58 PMQuoted 1 line · Uri Shkolnik
--- On Tue, 4/21/09, Mauro Carvalho Chehab <[email protected]>
Quoted 1 line · wrote:
Quoted 1 line
Quoted 1 line
Quoted 1 line
If the system includes SDIO and OMAP
SPI/SPP, the
Quoted 1 line
Quoted 1 line
module build will discard the USB interface
driver, but the
Quoted 3 lines
Quoted 3 lines
SDIO and the OMAP SPI will be built.
The patch you've provided just merge everything.
If you're
Quoted 2 lines
Quoted 2 lines
proposing a newer
model, you should send a patchset with thecomplete
KbuildQuoted 2 lines
Quoted 2 lines
refactor. For now,
it is better to postpone this patch until wemerge
Quoted 3 lines
Quoted 3 lines
non-kbuild changes.
Quoted 1 line
Can you name another driver that works this
way?
Quoted 2 lines
Quoted 2 lines
It is considered better
Quoted 1 line
to build a new module for a different
interface.
Quoted 2 lines
Quoted 2 lines
That way one can decide
Quoted 1 line
at run time if the interface is needed or
not and only
Quoted 2 lines
Quoted 2 lines
load the module if
Quoted 1 line
needed. If everything is built into one
module
Quoted 2 lines
Quoted 2 lines
then one must decide at
Quoted 1 line
compile time what interfaces to support.
But it
Quoted 2 lines
Quoted 2 lines
is often the case that
Quoted 1 line
kernels are compiled on different systems
than run
Quoted 3 lines
Quoted 3 lines
them.
This model also sounds different to me from what
I've seen
Quoted 8 lines
Quoted 2 lines
so far.
1) PLUTO
Kconfigconfig
DVB_PLUTO2
tristate "Pluto2 cards"
depends onDVB_CORE&& PCI&& I2C
Quoted 1 line
As we can see, it depends on PCI and I2C (and
DVB_CORE, but that is outside the current discussion), which means, that if the target system lacks either PCI or I2C (and many Linux target do not have those) the entire Pluto module will not be built, even if selected.I do not think you understand. This driver is for a device that is access
via a PCI bus. It creates an i2c adapter that is used to control the tuner
chip on the device. The device is not accessed via i2c. What's more, and
this is a key point you are missing, it can not be accessed by PCI *or*
I2C. This is the same with all the other drivers you may have found that
use both PCI and I2C. It's a totally different situation.
Quoted 4 lines
Look at the how the B2C2 flexcop driver works. This hardware is availble
in both PCI and USB versions.
I fully understand it. Note that I gave the two examples that reside near-by the Siano sources in the VL tree, there are multiple other. I didn't dive into the source to see what the drivers do, I only show what the Kconfig(s) tell.
Quoted 9 lines
Quoted 3 lines
config
DVB_TTUSB_BUDGET
tristate "Technotrend/HauppaugeNova-USB devices"
Quoted 1 line
depends on
DVB_CORE&& USB&& I2C && PCI
Quoted 1 line
Support for external USB
adapters designed by Technotrend and
Quoted 1 line
Quoted 8 lines
Quoted 1 line
This module while not be build (even if chosen) on
target system that lacks USB stack (additional to PCI and I2C).
This looks like a mistake. The driver is for a USB device and should not
depend on PCI, but the driver uses the pci dma api.
Same as above
Quoted 24 lines
Quoted 1 line
First, SMS (Siano based device) requires at least one
available bus (either USB, SDIO, SPI/SPP, HIF/Parallel,
TS_I2C, ....), not a combination like the TTUSB. (Note, if multiple buses available, the module can use them simultaneously, for example - two different instances (SDIO and USB) dongles may co-exist on the same system).Quoted 2 lines
There is no reason to prevent some systems which have
only SDIO interface to work if there is no USB and vice versa.
Quoted 2 lines
Only if there are no supported (by SMS) buses at all,
the drive will not be built.
Quoted 2 lines
Second, in order to reduce module size, there is no
need to compile and link to the binary module a bus interface component that will never be used, more than that, if there are no suitable (external) headers, the build process will fail.
Quoted 1 line
So, the
KconfigandMakefileneed to ensure that themodule will be built and function OK on target systems which have full set AND subset of the total supported buses (by SMS).
Quoted 7 lines
The point you are missing is that by compiling all support into one module
you are forcing the supported busses to be chosen at compile time. If
they were separate modules then the supported busses could be loaded
at run time.
You didn't understood me. I don't force any bus to be chosen at compile time. You can select any bus stack you want (USB, SDIO...), independently (as it should be) from the SMS. Those buses use multiple devices, not only the SMS. If, and only if, and certain bus is selected, than the corresponding SMS interface driver adapter is binded.
Quoted 6 lines
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html