Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * PCM3168A codec driver header
0004  *
0005  * Copyright (C) 2015 Imagination Technologies Ltd.
0006  *
0007  * Author: Damien Horsley <Damien.Horsley@imgtec.com>
0008  */
0009 
0010 #ifndef __PCM3168A_H__
0011 #define __PCM3168A_H__
0012 
0013 extern const struct dev_pm_ops pcm3168a_pm_ops;
0014 extern const struct regmap_config pcm3168a_regmap;
0015 
0016 extern int pcm3168a_probe(struct device *dev, struct regmap *regmap);
0017 extern void pcm3168a_remove(struct device *dev);
0018 
0019 #define PCM3168A_RST_SMODE          0x40
0020 #define PCM3168A_MRST_MASK          0x80
0021 #define PCM3168A_SRST_MASK          0x40
0022 #define PCM3168A_DAC_SRDA_SHIFT         0
0023 #define PCM3168A_DAC_SRDA_MASK          0x3
0024 
0025 #define PCM3168A_DAC_PWR_MST_FMT        0x41
0026 #define PCM3168A_DAC_PSMDA_SHIFT        7
0027 #define PCM3168A_DAC_PSMDA_MASK         0x80
0028 #define PCM3168A_DAC_MSDA_SHIFT         4
0029 #define PCM3168A_DAC_MSDA_MASK          0x70
0030 #define PCM3168A_DAC_FMT_SHIFT          0
0031 #define PCM3168A_DAC_FMT_MASK           0xf
0032 
0033 #define PCM3168A_DAC_OP_FLT         0x42
0034 #define PCM3168A_DAC_OPEDA_SHIFT        4
0035 #define PCM3168A_DAC_OPEDA_MASK         0xf0
0036 #define PCM3168A_DAC_FLT_SHIFT          0
0037 #define PCM3168A_DAC_FLT_MASK           0xf
0038 
0039 #define PCM3168A_DAC_INV            0x43
0040 
0041 #define PCM3168A_DAC_MUTE           0x44
0042 
0043 #define PCM3168A_DAC_ZERO           0x45
0044 
0045 #define PCM3168A_DAC_ATT_DEMP_ZF        0x46
0046 #define PCM3168A_DAC_ATMDDA_MASK        0x80
0047 #define PCM3168A_DAC_ATMDDA_SHIFT       7
0048 #define PCM3168A_DAC_ATSPDA_MASK        0x40
0049 #define PCM3168A_DAC_ATSPDA_SHIFT       6
0050 #define PCM3168A_DAC_DEMP_SHIFT         4
0051 #define PCM3168A_DAC_DEMP_MASK          0x30
0052 #define PCM3168A_DAC_AZRO_SHIFT         1
0053 #define PCM3168A_DAC_AZRO_MASK          0xe
0054 #define PCM3168A_DAC_ZREV_MASK          0x1
0055 #define PCM3168A_DAC_ZREV_SHIFT         0
0056 
0057 #define PCM3168A_DAC_VOL_MASTER         0x47
0058 
0059 #define PCM3168A_DAC_VOL_CHAN_START     0x48
0060 
0061 #define PCM3168A_ADC_SMODE          0x50
0062 #define PCM3168A_ADC_SRAD_SHIFT         0
0063 #define PCM3168A_ADC_SRAD_MASK          0x3
0064 
0065 #define PCM3168A_ADC_MST_FMT            0x51
0066 #define PCM3168A_ADC_MSAD_SHIFT         4
0067 #define PCM3168A_ADC_MSAD_MASK          0x70
0068 #define PCM3168A_ADC_FMTAD_SHIFT        0
0069 #define PCM3168A_ADC_FMTAD_MASK         0x7
0070 
0071 #define PCM3168A_ADC_PWR_HPFB           0x52
0072 #define PCM3168A_ADC_PSVAD_SHIFT        4
0073 #define PCM3168A_ADC_PSVAD_MASK         0x70
0074 #define PCM3168A_ADC_BYP_SHIFT          0
0075 #define PCM3168A_ADC_BYP_MASK           0x7
0076 
0077 #define PCM3168A_ADC_SEAD           0x53
0078 
0079 #define PCM3168A_ADC_INV            0x54
0080 
0081 #define PCM3168A_ADC_MUTE           0x55
0082 
0083 #define PCM3168A_ADC_OV             0x56
0084 
0085 #define PCM3168A_ADC_ATT_OVF            0x57
0086 #define PCM3168A_ADC_ATMDAD_MASK        0x80
0087 #define PCM3168A_ADC_ATMDAD_SHIFT       7
0088 #define PCM3168A_ADC_ATSPAD_MASK        0x40
0089 #define PCM3168A_ADC_ATSPAD_SHIFT       6
0090 #define PCM3168A_ADC_OVFP_MASK          0x1
0091 #define PCM3168A_ADC_OVFP_SHIFT         0
0092 
0093 #define PCM3168A_ADC_VOL_MASTER         0x58
0094 
0095 #define PCM3168A_ADC_VOL_CHAN_START     0x59
0096 
0097 #endif