Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * cs42l42.h -- CS42L42 ALSA SoC audio driver DT bindings header
0004  *
0005  * Copyright 2016 Cirrus Logic, Inc.
0006  *
0007  * Author: James Schulman <james.schulman@cirrus.com>
0008  * Author: Brian Austin <brian.austin@cirrus.com>
0009  * Author: Michael White <michael.white@cirrus.com>
0010  */
0011 
0012 #ifndef __DT_CS42L42_H
0013 #define __DT_CS42L42_H
0014 
0015 /* HPOUT Load Capacity */
0016 #define CS42L42_HPOUT_LOAD_1NF      0
0017 #define CS42L42_HPOUT_LOAD_10NF     1
0018 
0019 /* HPOUT Clamp to GND Override */
0020 #define CS42L42_HPOUT_CLAMP_EN      0
0021 #define CS42L42_HPOUT_CLAMP_DIS     1
0022 
0023 /* Tip Sense Inversion */
0024 #define CS42L42_TS_INV_DIS          0
0025 #define CS42L42_TS_INV_EN           1
0026 
0027 /* Tip Sense Debounce */
0028 #define CS42L42_TS_DBNCE_0          0
0029 #define CS42L42_TS_DBNCE_125            1
0030 #define CS42L42_TS_DBNCE_250            2
0031 #define CS42L42_TS_DBNCE_500            3
0032 #define CS42L42_TS_DBNCE_750            4
0033 #define CS42L42_TS_DBNCE_1000           5
0034 #define CS42L42_TS_DBNCE_1250           6
0035 #define CS42L42_TS_DBNCE_1500           7
0036 
0037 /* Button Press Software Debounce Times */
0038 #define CS42L42_BTN_DET_INIT_DBNCE_MIN      0
0039 #define CS42L42_BTN_DET_INIT_DBNCE_DEFAULT  100
0040 #define CS42L42_BTN_DET_INIT_DBNCE_MAX      200
0041 
0042 #define CS42L42_BTN_DET_EVENT_DBNCE_MIN     0
0043 #define CS42L42_BTN_DET_EVENT_DBNCE_DEFAULT 10
0044 #define CS42L42_BTN_DET_EVENT_DBNCE_MAX     20
0045 
0046 /* Button Detect Level Sensitivities */
0047 #define CS42L42_NUM_BIASES      4
0048 
0049 #define CS42L42_HS_DET_LEVEL_15     0x0F
0050 #define CS42L42_HS_DET_LEVEL_8      0x08
0051 #define CS42L42_HS_DET_LEVEL_4      0x04
0052 #define CS42L42_HS_DET_LEVEL_1      0x01
0053 
0054 #define CS42L42_HS_DET_LEVEL_MIN    0
0055 #define CS42L42_HS_DET_LEVEL_MAX    0x3F
0056 
0057 /* HS Bias Ramp Rate */
0058 
0059 #define CS42L42_HSBIAS_RAMP_FAST_RISE_SLOW_FALL     0
0060 #define CS42L42_HSBIAS_RAMP_FAST            1
0061 #define CS42L42_HSBIAS_RAMP_SLOW            2
0062 #define CS42L42_HSBIAS_RAMP_SLOWEST         3
0063 
0064 #define CS42L42_HSBIAS_RAMP_TIME0           10
0065 #define CS42L42_HSBIAS_RAMP_TIME1           40
0066 #define CS42L42_HSBIAS_RAMP_TIME2           90
0067 #define CS42L42_HSBIAS_RAMP_TIME3           170
0068 
0069 #endif /* __DT_CS42L42_H */