|
25 | 25 | #define RS9_REG_SS_AMP_0V7 0x1
|
26 | 26 | #define RS9_REG_SS_AMP_0V8 0x2
|
27 | 27 | #define RS9_REG_SS_AMP_0V9 0x3
|
| 28 | +#define RS9_REG_SS_AMP_DEFAULT RS9_REG_SS_AMP_0V8 |
28 | 29 | #define RS9_REG_SS_AMP_MASK 0x3
|
29 | 30 | #define RS9_REG_SS_SSC_100 0
|
30 | 31 | #define RS9_REG_SS_SSC_M025 (1 << 3)
|
31 | 32 | #define RS9_REG_SS_SSC_M050 (3 << 3)
|
| 33 | +#define RS9_REG_SS_SSC_DEFAULT RS9_REG_SS_SSC_100 |
32 | 34 | #define RS9_REG_SS_SSC_MASK (3 << 3)
|
33 | 35 | #define RS9_REG_SS_SSC_LOCK BIT(5)
|
34 | 36 | #define RS9_REG_SR 0x2
|
@@ -205,8 +207,8 @@ static int rs9_get_common_config(struct rs9_driver_data *rs9)
|
205 | 207 | int ret;
|
206 | 208 |
|
207 | 209 | /* Set defaults */
|
208 |
| - rs9->pll_amplitude = RS9_REG_SS_AMP_0V7; |
209 |
| - rs9->pll_ssc = RS9_REG_SS_SSC_100; |
| 210 | + rs9->pll_amplitude = RS9_REG_SS_AMP_DEFAULT; |
| 211 | + rs9->pll_ssc = RS9_REG_SS_SSC_DEFAULT; |
210 | 212 |
|
211 | 213 | /* Output clock amplitude */
|
212 | 214 | ret = of_property_read_u32(np, "renesas,out-amplitude-microvolt",
|
@@ -247,13 +249,13 @@ static void rs9_update_config(struct rs9_driver_data *rs9)
|
247 | 249 | int i;
|
248 | 250 |
|
249 | 251 | /* If amplitude is non-default, update it. */
|
250 |
| - if (rs9->pll_amplitude != RS9_REG_SS_AMP_0V7) { |
| 252 | + if (rs9->pll_amplitude != RS9_REG_SS_AMP_DEFAULT) { |
251 | 253 | regmap_update_bits(rs9->regmap, RS9_REG_SS, RS9_REG_SS_AMP_MASK,
|
252 | 254 | rs9->pll_amplitude);
|
253 | 255 | }
|
254 | 256 |
|
255 | 257 | /* If SSC is non-default, update it. */
|
256 |
| - if (rs9->pll_ssc != RS9_REG_SS_SSC_100) { |
| 258 | + if (rs9->pll_ssc != RS9_REG_SS_SSC_DEFAULT) { |
257 | 259 | regmap_update_bits(rs9->regmap, RS9_REG_SS, RS9_REG_SS_SSC_MASK,
|
258 | 260 | rs9->pll_ssc);
|
259 | 261 | }
|
|
0 commit comments