Loading include/soc/wcd-spi-ac.h 0 → 100644 +44 −0 Original line number Diff line number Diff line /* Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and * only version 2 as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ #ifndef __WCD_SPI_AC_H__ #define __WCD_SPI_AC_H__ #include <linux/types.h> #include <linux/bitops.h> enum wcd_spi_acc_req { WCD_SPI_ACCESS_REQUEST, WCD_SPI_ACCESS_RELEASE, WCD_SPI_ACCESS_MAX, }; #define WCD_SPI_AC_DATA_TRANSFER BIT(0) #define WCD_SPI_AC_CONCURRENCY BIT(1) #define WCD_SPI_AC_REMOTE_DOWN BIT(2) #define WCD_SPI_AC_SVC_OFFLINE BIT(3) #define WCD_SPI_AC_UNINITIALIZED BIT(4) #if IS_ENABLED(CONFIG_WCD_SPI_AC) int wcd_spi_access_ctl(struct device *dev, enum wcd_spi_acc_req req, u32 reason); #else int wcd_spi_access_ctl(struct device *dev, enum wcd_spi_acc_req req, u32 reason) { return 0; } #endif /* end of CONFIG_WCD_SPI_AC */ #endif /* end of __WCD_SPI_AC_H__ */ soc/Kbuild +8 −0 Original line number Diff line number Diff line Loading @@ -101,6 +101,11 @@ ifdef CONFIG_SND_EVENT SND_EVENT_OBJS += snd_event.o endif ifdef CONFIG_WCD_SPI_AC WCD_SPI_ACC_CTL_OBJS += wcd-spi-ac.o WCD_SPI_ACC_CTL_OBJS += wcd_spi_ctl_v01.o endif LINUX_INC += -Iinclude/linux INCS += $(COMMON_INC) \ Loading Loading @@ -159,5 +164,8 @@ obj-$(CONFIG_SOUNDWIRE_WCD_CTRL) += swr_ctrl_dlkm.o obj-$(CONFIG_SOUNDWIRE_MSTR_CTRL) += swr_ctrl_dlkm.o swr_ctrl_dlkm-y := $(SWR_CTRL_OBJS) obj-$(CONFIG_WCD_SPI_AC) += wcd_spi_acc_ctl_dlkm.o wcd_spi_acc_ctl_dlkm-y := $(WCD_SPI_ACC_CTL_OBJS) # inject some build related information DEFINES += -DBUILD_TIMESTAMP=\"$(shell date -u +'%Y-%m-%dT%H:%M:%SZ')\" Loading
include/soc/wcd-spi-ac.h 0 → 100644 +44 −0 Original line number Diff line number Diff line /* Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and * only version 2 as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ #ifndef __WCD_SPI_AC_H__ #define __WCD_SPI_AC_H__ #include <linux/types.h> #include <linux/bitops.h> enum wcd_spi_acc_req { WCD_SPI_ACCESS_REQUEST, WCD_SPI_ACCESS_RELEASE, WCD_SPI_ACCESS_MAX, }; #define WCD_SPI_AC_DATA_TRANSFER BIT(0) #define WCD_SPI_AC_CONCURRENCY BIT(1) #define WCD_SPI_AC_REMOTE_DOWN BIT(2) #define WCD_SPI_AC_SVC_OFFLINE BIT(3) #define WCD_SPI_AC_UNINITIALIZED BIT(4) #if IS_ENABLED(CONFIG_WCD_SPI_AC) int wcd_spi_access_ctl(struct device *dev, enum wcd_spi_acc_req req, u32 reason); #else int wcd_spi_access_ctl(struct device *dev, enum wcd_spi_acc_req req, u32 reason) { return 0; } #endif /* end of CONFIG_WCD_SPI_AC */ #endif /* end of __WCD_SPI_AC_H__ */
soc/Kbuild +8 −0 Original line number Diff line number Diff line Loading @@ -101,6 +101,11 @@ ifdef CONFIG_SND_EVENT SND_EVENT_OBJS += snd_event.o endif ifdef CONFIG_WCD_SPI_AC WCD_SPI_ACC_CTL_OBJS += wcd-spi-ac.o WCD_SPI_ACC_CTL_OBJS += wcd_spi_ctl_v01.o endif LINUX_INC += -Iinclude/linux INCS += $(COMMON_INC) \ Loading Loading @@ -159,5 +164,8 @@ obj-$(CONFIG_SOUNDWIRE_WCD_CTRL) += swr_ctrl_dlkm.o obj-$(CONFIG_SOUNDWIRE_MSTR_CTRL) += swr_ctrl_dlkm.o swr_ctrl_dlkm-y := $(SWR_CTRL_OBJS) obj-$(CONFIG_WCD_SPI_AC) += wcd_spi_acc_ctl_dlkm.o wcd_spi_acc_ctl_dlkm-y := $(WCD_SPI_ACC_CTL_OBJS) # inject some build related information DEFINES += -DBUILD_TIMESTAMP=\"$(shell date -u +'%Y-%m-%dT%H:%M:%SZ')\"