alistair23-linux/drivers/staging/greybus/Makefile

90 lines
2 KiB
Makefile
Raw Normal View History

2014-08-31 17:17:04 -06:00
greybus-y := core.o \
debugfs.o \
ap.o \
manifest.o \
endo.o \
greybus: add module support Modules in the greybus system sit above the interface, so insert them early in the sysfs tree. We dynamically create them when we have an interface that references a module, as we don't get a "module create" message directly. They also dynamically go away when the last interface associated with a module is removed. Naming scheme for modules/interfaces/bundles/connections is bumped up by one ':', and now looks like the following: /sys/bus/greybus $ tree . ├── devices │   ├── 7 -> ../../../devices/pci0000:00/0000:00:14.0/usb1/1-1/7 │   ├── 7:7 -> ../../../devices/pci0000:00/0000:00:14.0/usb1/1-1/7/7:7 │   ├── 7:7:0 -> ../../../devices/pci0000:00/0000:00:14.0/usb1/1-1/7/7:7/7:7:0 │   └── 7:7:0:1 -> ../../../devices/pci0000:00/0000:00:14.0/usb1/1-1/7/7:7/7:7:0/7:7:0:1 ├── drivers ├── drivers_autoprobe ├── drivers_probe └── uevent 6 directories, 3 files /sys/bus/greybus $ grep . devices/*/uevent devices/7/uevent:DEVTYPE=greybus_module devices/7:7/uevent:DEVTYPE=greybus_interface devices/7:7:0/uevent:DEVTYPE=greybus_bundle devices/7:7:0:1/uevent:DEVTYPE=greybus_connection We still have some "confusion" about interface ids and module ids, which will be cleaned up later when the svc control protocol changes die down, right now we just name a module after the interface as we don't have any modules that have multiple interfaces in our systems. This has been tested with gbsim. Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
2014-12-21 15:10:26 -07:00
module.o \
interface.o \
bundle.o \
connection.o \
protocol.o \
operation.o
gb-phy-y := gpbridge.o \
sdio.o \
uart.o \
pwm.o \
gpio.o \
hid.o \
i2c.o \
spi.o \
greybus: gb-audio: Add integrated greybus audio driver So here's the current greybus audio driver, which I wanted to send out for more serious review and consideration for merging. I've tried to integrate much of the feedback from the last round and most of the hotplug issues that I've found have been resolved. I've tested this via gbsim, and the Android ARA HAL layer seems to work with it. Mark has also successfully played audio with this driver, adding a few hacks to get the codec's i2c connection to probe. Current issues: * Hotplug problem - When gbsim is killed, or the module removed, the greybus driver gets stuck since the android mediaserver process is holding the audio device open. Killing the mediaserver allows things to clean up and allows greybus to accept new gbsim connections. I have a workaround patch to the soc-core.c logic which converts the snd_card_free() call to snd_card_free_when_closed() which allows the greybus connection cleanup to finish. Remaining todos: * Probably need to break apart the mgmt_setup function to integrate better with the constraint logic. I took a really basic stab at this, but more is probably needed. * Figure out how to properly find and tie in the codec's I2C bus-id to the driver. This code requires that the kernel support the following config options, which I've enabled in a separate kernel patch: CONFIG_SND_SIMPLE_CARD CONFIG_SND_SOC_SPDIF CONFIG_SND_SOC_RT5645 I really can't calim to be the sole author of this, since many many fixes and tweaks that have been folded in have come from Mark Greer. His analsysis and debugging is really what has made this dummy-framework driver evolve into an actual audio driver. So much credit and thanks to Mark! Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Mark A. Greer <mgreer@animalcreek.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2015-05-08 13:57:36 -06:00
usb.o \
audio.o \
audio-pcm.o \
audio-dai.o \
audio-gb-cmds.o
# Prefix all modules with gb-
gb-svc-y := svc.o
gb-vibrator-y := vibrator.o
gb-battery-y := battery.o
gb-loopback-y := loopback.o
gb-raw-y := raw.o
gb-es1-y := es1.o
gb-es2-y := es2.o
obj-m += greybus.o
obj-m += gb-svc.o
obj-m += gb-phy.o
obj-m += gb-vibrator.o
obj-m += gb-battery.o
obj-m += gb-loopback.o
obj-m += gb-raw.o
obj-m += gb-es1.o
obj-m += gb-es2.o
KERNELVER ?= $(shell uname -r)
KERNELDIR ?= /lib/modules/$(KERNELVER)/build
INSTALL_MOD_PATH ?= /..
PWD := $(shell pwd)
# kernel config option that shall be enable
CONFIG_OPTIONS_ENABLE := SYSFS SPI USB SND_SOC MMC
# kernel config option that shall be disable
CONFIG_OPTIONS_DISABLE :=
# this only run in kbuild part of the makefile
ifneq ($(KERNELRELEASE),)
$(foreach opt,$(CONFIG_OPTIONS_ENABLE),$(if $(CONFIG_$(opt)),, \
$(error CONFIG_$(opt) is disabled in the kernel configuration and must be enable \
to continue compilation)))
$(foreach opt,$(CONFIG_OPTIONS_DISABLE),$(if $(filter m y, $(CONFIG_$(opt))), \
$(error CONFIG_$(opt) is enabled in the kernel configuration and must be disable \
to continue compilation),))
endif
# add -Wall to try to catch everything we can.
ccFlags-y := -Wall
all: module
module:
$(MAKE) -C $(KERNELDIR) M=$(PWD)
check:
$(MAKE) -C $(KERNELDIR) M=$(PWD) C=2 CF="-D__CHECK_ENDIAN__"
clean:
rm -f *.o *~ core .depend .*.cmd *.ko *.mod.c
rm -f Module.markers Module.symvers modules.order
rm -rf .tmp_versions Modules.symvers
coccicheck:
$(MAKE) -C $(KERNELDIR) M=$(PWD) coccicheck
install: module
mkdir -p $(INSTALL_MOD_PATH)/lib/modules/$(KERNELVER)/kernel/drivers/greybus/
cp -f *.ko $(INSTALL_MOD_PATH)/lib/modules/$(KERNELVER)/kernel/drivers/greybus/
depmod -b $(INSTALL_MOD_PATH) -a $(KERNELVER)