Понедельник, 30 марта 2015, 8:12 +02:00 от Gaetan Hug <ghug@xxxxxxxxx>: > Hello folks, > > I've been using the MAX3107 IC and I had to tweak a bit the driver > code to make things work. We use a crystal connected to the internal > crystal oscillator to generate the clock and the CLKSRC register was not > set properly. When using a crystal both bits alternatively select by > this line of code should be set: > > max310x.c:574 > clksrc = xtal ? MAX310X_CLKSRC_CRYST_BIT : MAX310X_CLKSRC_EXTCLK_BIT; > > The MAX310X_CLKSRC_EXTCLK_BIT is named ClockEnable in the MAX3107 > documentation (http://datasheets.maximintegrated.com/en/ds/MAX3107.pdf). > It actually connects / disconnects the clock signal to the PLL block - > the signal being generated by either the crystal/oscillator pair or by > some other external source. > > As this driver needs to work with other devices that I would rather > not propose a patch. > > I would though be available to do some testing. Hello. MAX310X_CLKSRC_EXTCLK_BIT bit is valid only for MAX3107, this bit is reserved for other ICs, so you can modify the code like as: clksrc = xtal ? MAX310X_CLKSRC_CRYST_BIT : 0; ... ... regmap_write(s->regmap, MAX310X_CLKSRC_REG, clksrc | MAX310X_CLKSRC_EXTCLK_BIT); If such modification will be works fine, please send a patch to this mailing list. Thanks. --- ��.n��������+%������w��{.n�����{��ǫ����{ay�ʇڙ���f���h������_�(�階�ݢj"��������G����?���&��