Re: [PATCH 8/9] xshm: Makefile and Kconfig for M7400 Shared Memory Drivers

From: Linus Walleij
Date: Wed Dec 07 2011 - 07:57:17 EST


2011/12/7 Sjur Brændeland <sjur.brandeland@xxxxxxxxxxxxxx>:

Some commit blurb here pls.

> Signed-off-by: Sjur Brændeland <sjur.brandeland@xxxxxxxxxxxxxx>
> ---
(...)
> diff --git a/drivers/xshm/Kconfig b/drivers/xshm/Kconfig
> new file mode 100644
> index 0000000..80daca4
> --- /dev/null
> +++ b/drivers/xshm/Kconfig
> @@ -0,0 +1,17 @@
> +# XSHM gets selected by whoever wants it.
> +config XSHM
> +       depends on CONFIG_C2C
> +       tristate
> +
> +config XSHM_CHR
> +       tristate "Character device for External Shared Memory (XSHM)"
> +       select XSHM
> +       default n
> +       ---help---
> +       Say "Y" to use a character device for the External Shared
> +       Memory (XSHM) IPC mechanism. XSHM is an IPC protocol used to
> +       talk to external device such as modem over a shared memory
> +       (e.g. Chip to Chip).
> +       Only say "M" here if you want to test XSHM and need to load
> +       and unload its module.
> +       If unsure say N.

As mentioned this needs some Kconfig entry to enable the
dummy driver.

This will appear right in the root menu of the driver config,
and I think it is more apropriate to hide this from systems that
do not have xshm, so check for how I did in drivers/pinctrl for
example like this:

config XSHM
bool
depends on EXPERIMENTAL

if XSHM

menu "XSHM drivers and interfaces"
depends on XSHM

... your previous entries here ...

endmenu

endif

This will hide everything until an arch issues
select XSHM in it's say arch/arm/mach-foo/Kconfig.

> diff --git a/drivers/xshm/Makefile b/drivers/xshm/Makefile
> new file mode 100644
> index 0000000..954bd22
> --- /dev/null
> +++ b/drivers/xshm/Makefile
> @@ -0,0 +1,3 @@
> +obj-$(CONFIG_XSHM) += xshm.o
> +xshm-objs := xshm_boot.o xshm_dev.o
> +obj-$(CONFIG_XSHM_CHR) +=  xshm_chr.o

Also include a build rule for the dummy driver here.

Thanks,
Linus Walleij
--
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/