1
0
Fork 0
alistair23-linux/drivers/staging/greybus/Makefile

148 lines
3.8 KiB
Makefile
Raw Normal View History

2014-08-31 17:17:04 -06:00
greybus-y := core.o \
debugfs.o \
hd.o \
manifest.o \
module.o \
interface.o \
bundle.o \
connection.o \
control.o \
svc.o \
svc_watchdog.o \
greybus: timesync: Add timesync core driver This patch adds the core timesync functionality. 0. arche-platform.c/arche-apb-ctrl.c Modifies the platform layer to hook the incoming TIME_SYNC signal up to the timesync strobe IRQ handler. If the arche-platform driver can't satisfy the request for the wake-detect line, it will return -EAGAIN and the calling work-queue must reschedule the attempt to get exclusive access to the wake-detect pin logic. A private data field is added to the arche-platform driver to enable passing of a timesync pointer to the ISR responsible for synchronizing time. 1. timesync.c A new file added which contains all of the logic associated with sending greybus commands to SVC, APBx or Interfaces to enable, disable and disseminate timing information. 2. timesync_platform.c Any platform/arch specific code goes into timesync_platform.c. Originally the idea was to keep the x86 and ARM arch dependencies in a timesync_platform_arch.c file - however with further refinement that's currently not necessary however just-in-case it becomes necessary to resuscitate arch or platform specific methods for accessing timer resources that access shouldn't be part of the core timesync.c logic and so for the moment we access these timer resources through a thin access layer in timesync_platform.c. Expect this to go away long term ideally. Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Acked-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-06-05 07:03:26 -06:00
operation.o \
timesync.o \
timesync_platform.o
gb-gbphy-y := gbphy.o
# Prefix all modules with gb-
gb-vibrator-y := vibrator.o
gb-power-supply-y := power_supply.o
gb-log-y := log.o
gb-loopback-y := loopback.o
gb-light-y := light.o
gb-raw-y := raw.o
gb-hid-y := hid.o
gb-es2-y := es2.o
gb-arche-y := arche-platform.o arche-apb-ctrl.o
gb-audio-module-y := audio_module.o audio_topology.o
gb-audio-codec-y := audio_codec.o
gb-audio-gb-y := audio_gb.o
gb-audio-apbridgea-y := audio_apbridgea.o
greybus: audio: Add Audio Manager This is a simple module that keeps a list of connected GB audio modules. Whenever a device is attached, an appropriate uevent is sent to userspace: UDEV [4941.803215] add /kernel/gb_audio_manager/0 (gb_audio_manager) ACTION=add CPORT=99 DEVICES=0x10 DEVPATH=/kernel/gb_audio_manager/0 NAME=naim PID=64 SEQNUM=1828 SLOT=2 SUBSYSTEM=gb_audio_manager USEC_INITIALIZED=802416 VID=128 And whenever removed: UDEV [4941.836588] remove /kernel/gb_audio_manager/0 (gb_audio_manager) ACTION=remove DEVPATH=/kernel/gb_audio_manager/0 SEQNUM=1833 SUBSYSTEM=gb_audio_manager USEC_INITIALIZED=835681 The API consists of functions for adding, removing and inspecting added device module descriptions (struct gb_audio_module): int gb_audio_manager_add(struct gb_audio_module_descriptor *desc); int gb_audio_manager_remove(int id); int gb_audio_manager_remove_all(void); struct gb_audio_module* gb_audio_manager_get_module(int id); void gb_audio_manager_put_module(struct gb_audio_module *module); int gb_audio_manager_dump_module(int id); void gb_audio_manager_dump_all(void); Devices can be inspected through sysfs in /sys/kernel/gb_audio_manager/{id}/* If GB_AUDIO_MANAGER_SYSFS is exported as 'true', managing devices can be done via the SYSFS as well. For instance: echo name=naim slot=2 vid=128 pid=64 cport=99 devices=0x10 > /sys/kernel/gb_audio_manager/add echo all > /sys/kernel/gb_audio_manager/dump echo 2 > /sys/kernel/gb_audio_manager/dump echo 2 > /sys/kernel/gb_audio_manager/remove Signed-off-by: Svetlin Ankov <ankov_svetlin@projectara.com> Signed-off-by: Mark Greer <mgreer@animalcreek.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-01-13 14:07:48 -07:00
gb-audio-manager-y += audio_manager.o
gb-audio-manager-y += audio_manager_module.o
gb-bootrom-y := bootrom.o
gb-camera-y := camera.o
gb-firmware-y := fw-core.o fw-download.o fw-management.o authentication.o
gb-spilib-y := spilib.o
gb-sdio-y := sdio.o
gb-uart-y := uart.o
gb-pwm-y := pwm.o
gb-gpio-y := gpio.o
gb-i2c-y := i2c.o
gb-usb-y := usb.o
gb-spi-y := spi.o
obj-m += greybus.o
obj-m += gb-gbphy.o
obj-m += gb-vibrator.o
obj-m += gb-power-supply.o
obj-m += gb-log.o
obj-m += gb-loopback.o
obj-m += gb-light.o
obj-m += gb-hid.o
obj-m += gb-raw.o
obj-m += gb-es2.o
ifeq ($(CONFIG_USB_HSIC_USB3613),y)
obj-m += gb-arche.o
endif
ifeq ($(CONFIG_ARCH_MSM8994),y)
obj-m += gb-audio-codec.o
obj-m += gb-audio-module.o
obj-m += gb-camera.o
endif
obj-m += gb-audio-gb.o
obj-m += gb-audio-apbridgea.o
greybus: audio: Add Audio Manager This is a simple module that keeps a list of connected GB audio modules. Whenever a device is attached, an appropriate uevent is sent to userspace: UDEV [4941.803215] add /kernel/gb_audio_manager/0 (gb_audio_manager) ACTION=add CPORT=99 DEVICES=0x10 DEVPATH=/kernel/gb_audio_manager/0 NAME=naim PID=64 SEQNUM=1828 SLOT=2 SUBSYSTEM=gb_audio_manager USEC_INITIALIZED=802416 VID=128 And whenever removed: UDEV [4941.836588] remove /kernel/gb_audio_manager/0 (gb_audio_manager) ACTION=remove DEVPATH=/kernel/gb_audio_manager/0 SEQNUM=1833 SUBSYSTEM=gb_audio_manager USEC_INITIALIZED=835681 The API consists of functions for adding, removing and inspecting added device module descriptions (struct gb_audio_module): int gb_audio_manager_add(struct gb_audio_module_descriptor *desc); int gb_audio_manager_remove(int id); int gb_audio_manager_remove_all(void); struct gb_audio_module* gb_audio_manager_get_module(int id); void gb_audio_manager_put_module(struct gb_audio_module *module); int gb_audio_manager_dump_module(int id); void gb_audio_manager_dump_all(void); Devices can be inspected through sysfs in /sys/kernel/gb_audio_manager/{id}/* If GB_AUDIO_MANAGER_SYSFS is exported as 'true', managing devices can be done via the SYSFS as well. For instance: echo name=naim slot=2 vid=128 pid=64 cport=99 devices=0x10 > /sys/kernel/gb_audio_manager/add echo all > /sys/kernel/gb_audio_manager/dump echo 2 > /sys/kernel/gb_audio_manager/dump echo 2 > /sys/kernel/gb_audio_manager/remove Signed-off-by: Svetlin Ankov <ankov_svetlin@projectara.com> Signed-off-by: Mark Greer <mgreer@animalcreek.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-01-13 14:07:48 -07:00
obj-m += gb-audio-manager.o
obj-m += gb-bootrom.o
obj-m += gb-firmware.o
obj-m += gb-spilib.o
obj-m += gb-sdio.o
obj-m += gb-uart.o
obj-m += gb-pwm.o
obj-m += gb-gpio.o
obj-m += gb-i2c.o
obj-m += gb-usb.o
obj-m += gb-spi.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 := POWER_SUPPLY PWM SYSFS SPI USB SND_SOC MMC LEDS_CLASS INPUT
# kernel config option that shall be disable
CONFIG_OPTIONS_DISABLE :=
# this only run in kbuild part of the makefile
ifneq ($(KERNELRELEASE),)
# This function returns the argument version if current kernel version is minor
# than the passed version, return 1 if equal or the current kernel version if it
# is greater than argument version.
kvers_cmp=$(shell [ "$(KERNELVERSION)" = "$(1)" ] && echo 1 || printf "$(1)\n$(KERNELVERSION)" | sort -V | tail -1)
ifneq ($(call kvers_cmp,"3.19.0"),3.19.0)
CONFIG_OPTIONS_ENABLE += LEDS_CLASS_FLASH
endif
ifneq ($(call kvers_cmp,"4.2.0"),4.2.0)
CONFIG_OPTIONS_ENABLE += V4L2_FLASH_LED_CLASS
endif
$(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
# needed for trace events
ccflags-y += -I$(src)
greybus: audio: Add Audio Manager This is a simple module that keeps a list of connected GB audio modules. Whenever a device is attached, an appropriate uevent is sent to userspace: UDEV [4941.803215] add /kernel/gb_audio_manager/0 (gb_audio_manager) ACTION=add CPORT=99 DEVICES=0x10 DEVPATH=/kernel/gb_audio_manager/0 NAME=naim PID=64 SEQNUM=1828 SLOT=2 SUBSYSTEM=gb_audio_manager USEC_INITIALIZED=802416 VID=128 And whenever removed: UDEV [4941.836588] remove /kernel/gb_audio_manager/0 (gb_audio_manager) ACTION=remove DEVPATH=/kernel/gb_audio_manager/0 SEQNUM=1833 SUBSYSTEM=gb_audio_manager USEC_INITIALIZED=835681 The API consists of functions for adding, removing and inspecting added device module descriptions (struct gb_audio_module): int gb_audio_manager_add(struct gb_audio_module_descriptor *desc); int gb_audio_manager_remove(int id); int gb_audio_manager_remove_all(void); struct gb_audio_module* gb_audio_manager_get_module(int id); void gb_audio_manager_put_module(struct gb_audio_module *module); int gb_audio_manager_dump_module(int id); void gb_audio_manager_dump_all(void); Devices can be inspected through sysfs in /sys/kernel/gb_audio_manager/{id}/* If GB_AUDIO_MANAGER_SYSFS is exported as 'true', managing devices can be done via the SYSFS as well. For instance: echo name=naim slot=2 vid=128 pid=64 cport=99 devices=0x10 > /sys/kernel/gb_audio_manager/add echo all > /sys/kernel/gb_audio_manager/dump echo 2 > /sys/kernel/gb_audio_manager/dump echo 2 > /sys/kernel/gb_audio_manager/remove Signed-off-by: Svetlin Ankov <ankov_svetlin@projectara.com> Signed-off-by: Mark Greer <mgreer@animalcreek.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2016-01-13 14:07:48 -07:00
GB_AUDIO_MANAGER_SYSFS ?= true
ifeq ($(GB_AUDIO_MANAGER_SYSFS),true)
gb-audio-manager-y += audio_manager_sysfs.o
ccflags-y += -DGB_AUDIO_MANAGER_SYSFS
endif
all: module
tools::
$(MAKE) -C tools KERNELDIR=$(realpath $(KERNELDIR))
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
$(MAKE) -C tools clean
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)