File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -80,6 +80,7 @@ struct clk_si5341 {
80
80
u8 num_outputs ;
81
81
u8 num_synth ;
82
82
u16 chip_id ;
83
+ bool xaxb_ext_clk ;
83
84
};
84
85
#define to_clk_si5341 (_hw ) container_of(_hw, struct clk_si5341, hw)
85
86
@@ -529,9 +530,11 @@ static int si5341_clk_reparent(struct clk_si5341 *data, u8 index)
529
530
if (err < 0 )
530
531
return err ;
531
532
532
- /* Power up XTAL oscillator and buffer */
533
+ /* Power up XTAL oscillator and buffer, select clock mode */
533
534
err = regmap_update_bits (data -> regmap , SI5341_XAXB_CFG ,
534
- SI5341_XAXB_CFG_PDNB , SI5341_XAXB_CFG_PDNB );
535
+ SI5341_XAXB_CFG_PDNB | SI5341_XAXB_CFG_EXTCLK_EN ,
536
+ SI5341_XAXB_CFG_PDNB | (data -> xaxb_ext_clk ?
537
+ SI5341_XAXB_CFG_EXTCLK_EN : 0 ));
535
538
if (err < 0 )
536
539
return err ;
537
540
}
@@ -1539,6 +1542,8 @@ static int si5341_probe(struct i2c_client *client,
1539
1542
1540
1543
initialization_required = !err ;
1541
1544
}
1545
+ data -> xaxb_ext_clk = of_property_read_bool (client -> dev .of_node ,
1546
+ "silabs,xaxb-ext-clk" );
1542
1547
1543
1548
if (initialization_required ) {
1544
1549
/* Populate the regmap cache in preparation for "cache only" */
You can’t perform that action at this time.
0 commit comments