android_kernel_xiaomi_sm8350/include/soc/swr-wcd.h
Sudheer Papothi 3d1596e2c6 soc: swr-mstr: Add support for platform specific port configuration
Different platforms have different configuration for soundwire
ports. Add support to get the port configuration information
from the machine driver.

Change-Id: If2c006c4d4a43e2a8dc67c076f6d1c0f36eae16b
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2018-12-17 12:16:26 -08:00

45 lines
985 B
C

/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2015, 2017-2018 The Linux Foundation. All rights reserved.
*/
#ifndef _LINUX_SWR_WCD_H
#define _LINUX_SWR_WCD_H
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/device.h>
#include <linux/bitops.h>
enum {
SWR_CH_MAP,
SWR_DEVICE_DOWN,
SWR_DEVICE_UP,
SWR_SUBSYS_RESTART,
SWR_SET_NUM_RX_CH,
SWR_CLK_FREQ,
SWR_DEVICE_SSR_DOWN,
SWR_DEVICE_SSR_UP,
SWR_REGISTER_WAKE_IRQ,
SWR_SET_PORT_MAP,
};
struct swr_mstr_port {
int num_port;
u8 *port;
};
#define MCLK_FREQ 9600000
#define MCLK_FREQ_NATIVE 11289600
#if (IS_ENABLED(CONFIG_SOUNDWIRE_WCD_CTRL) || \
IS_ENABLED(CONFIG_SOUNDWIRE_MSTR_CTRL))
extern int swrm_wcd_notify(struct platform_device *pdev, u32 id, void *data);
#else /* CONFIG_SOUNDWIRE_WCD_CTRL */
static inline int swrm_wcd_notify(struct platform_device *pdev, u32 id,
void *data)
{
return 0;
}
#endif /* CONFIG_SOUNDWIRE_WCD_CTRL */
#endif /* _LINUX_SWR_WCD_H */