Hi Jean, > I've taken a look and the patch looks rather good. However there's > something I am not happy with in the w83792d driver. It's not directly > related to this patch, as the current code in lm_sensors CVS has the > same issue. But as you are working in the same area, maybe you could > fix it. > > The w83792d driver changes the fan clock dividers automatically. I'm > fine with that, however it also lets the user change the divider values > manually. This does not make sense! At the next fan speed reading, > chances are that the driver will change the divider value if it wasn't > optimal anyway. > > So I would like fan_div to be read-only for the user. If you do that, > you'll see that you can simplify the automatic fan div change code, > because you will no more need to convert from divider to register value > (e.g. 8 -> 0x03). Your new "w83792d_set_fan_div" function will take a > register value as its "divisor" parameter rather that a divider value. > > Can you please rework your patch in that direction? I hope I get your idea :) The new patch is attached with this mail, please check. I don't know what kind of attachment type to choose, I have changed it to BINHEX, is it right? Thanks Best regards Yuan Mu begin 666 w83792d_fix_fan_div.patch M+2TM(&QM7W-E;G-O<G,R+F]R:6<O:V5R;F5L+V-H:7!S+W<X,S<Y,F0N8PDR M,# U+3$R+3$R(#$P.C V.C$V+C P,# P,# P," K,#@P, HK*RL@;&U?<V5N M<V]R<S(O:V5R;F5L+V-H:7!S+W<X,S<Y,F0N8PDR,# U+3$R+3$R(#$U.C(Y M.C$Y+C P,# P,# P," K,#@P, I 0" M,S V+#8@*S,P-BPX($! ('-T871I M8R!V;VED('<X,S<Y,F1?=&5M<%]A9&0H<W1R=6-T(&DR8U\*( D)"6EN="!C M=&Q?;F%M92P@:6YT("IN<F5L<U]M86<L(&QO;F<@*G)E<W5L=',I.PH@<W1A M=&EC('9O:60@=S at S-SDR9%]V<FTH<W1R=6-T(&DR8U]C;&EE;G0@*F-L:65N M="P@:6YT(&]P97)A=&EO;BP*( D)"6EN="!C=&Q?;F%M92P@:6YT("IN<F5L M<U]M86<L(&QO;F<@*G)E<W5L=',I.R J+PHK<W1A=&EC('9O:60@=S at S-SDR M9%]S971?9F%N7V1I=BAS=')U8W0@:3)C7V-L:65N=" J8VQI96YT+ HK"0D) M"6EN="!N<BP@=3@@;F5W9&EV*3L*('-T871I8R!V;VED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:79;-5T@/2 H<F5G7V%R<F%Y7W1M<%LR72 ^ M/B T*2 F(#!X,#<["B )"61A=&$M/F9A;E]D:79;-ET@/2!R96=?87)R87E? M=&UP6S-=("8@,'@P-SL*( HK"0EF;W(@*&D@/2 P.R!I(#P at -SL@:2LK*2![ M"BL)"0EI9B H(2AD871A+3YH87-?9F%N("8@*#$@/#P@:2DI*0HK"0D)"6-O M;G1I;G5E.PHK"0D):68@*&1A=&$M/F9A;EMI72 ]/2 P>&9F("8F(&1A=&$M M/F9A;E]D:79;:5T@/" W*0HK"0D)"7<X,S<Y,F1?<V5T7V9A;E]D:78H8VQI M96YT+"!I+" W*3L**PD)"65L<V4@:68@*&1A=&$M/F9A;EMI72 \(#!X-S @ M)B8 at 9&%T82T^9F%N7V1I=EMI72 ^(# I('L**PD)"0EW.#,W.3)D7W-E=%]F M86Y?9&EV*&-L:65N="P@:2P**PD)"0D)"0ED871A+3YF86Y?9&EV6VE=("T@ M,2D["BL)"0E](&5L<V4@:68@*&1A=&$M/F9A;EMI72 ^(#!X9C@@)B8**PD) M"0D)"61A=&$M/F9A;E]D:79;:5T@/" W*2!["BL)"0D)=S at S-SDR9%]S971? M9F%N7V1I=BAC;&EE;G0L(&DL"BL)"0D)"0D)9&%T82T^9F%N7V1I=EMI72 K M(#$I.PHK"0D)?0HK"0E]"BL*( D)+RH at 57!D871E('1H92!496UP97)A='5R M93$@;65A<W5R960@=F%L=64 at 86YD(&QI;6ET<R J+PH@"0ED871A+3YT96UP M,5LP72 ]('<X,S<Y,F1?<F5A9%]V86QU92AC;&EE;G0L(%<X,S<Y,D1?4D5' M7U1%35 Q*3L*( D)9&%T82T^=&5M<#%;,5T@/2!W.#,W.3)D7W)E861?=F%L M=64H8VQI96YT+"!7.#,W.3)$7U)%1U]414U0,5]/5D52*3L*0$ @+3$P,#$L M,3,@*S$P,3 at L,S@@0$ @<W1A=&EC('9O:60@=S at S-SDR9%]I;BAS=')U8W0@ M:3)C7V-L:65N= H@"7T*('T*( HK<W1A=&EC('9O:60@=S at S-SDR9%]S971? M9F%N7V1I=BAS=')U8W0@:3)C7V-L:65N=" J8VQI96YT+"!I;G0@;G(L('4X M(&YE=V1I=BD**WL**PES=')U8W0@=S at S-SDR9%]D871A("ID871A(#T at 8VQI M96YT+3YD871A.PHK"6EN="!M:6X@/2 P.PHK"6EN="!O;&0@/2 P.PHK"74X M('1M<" ](# ["BL**PEN97=D:78@/2!314Y33U)37TQ)34E4*&YE=V1I=BP@ M,"P at -RD["BL**PEI9B H;F5W9&EV(#T](&1A=&$M/F9A;E]D:79;;G)=*2![ M"BL)"7)E='5R;CL**PE]"BL**PEM:6X@/2!&04Y?1E)/35]214<H9&%T82T^ M9F%N7VUI;EMN<ETL($1)5E]&4D]-7U)%1RAD871A+3YF86Y?9&EV6VYR72DI M.PHK"6]L9" ]($9!3E]&4D]-7U)%1RAD871A+3YF86Y;;G)=+"!$259?1E)/ M35]214<H9&%T82T^9F%N7V1I=EMN<ETI*3L**PED871A+3YF86Y?9&EV6VYR M72 ](&YE=V1I=CL**PET;7 @/2!W.#,W.3)D7W)E861?=F%L=64H8VQI96YT M+"!7.#,W.3)$7U)%1U]&04Y?1$E66VYR(#X^(#%=*3L**PET;7 @)CT@*&YR M("8@,2D@/R P>#AF(#H@,'AF.#L**PET;7 @?#T@*&YR("8@,2D@/R H*&YE M=V1I=B \/" T*2 F(#!X-S I(#H@*&YE=V1I=B F(#!X,#<I.PHK"7<X,S<Y M,F1?=W)I=&5?=F%L=64H8VQI96YT+"!7.#,W.3)$7U)%1U]&04Y?1$E66VYR M(#X^(#%=+"!T;7 I.PHK"61A=&$M/F9A;E]M:6Y;;G)=(#T at 1D%.7U1/7U)% M1RAM:6XL($1)5E]&4D]-7U)%1RAD871A+3YF86Y?9&EV6VYR72DI.PHK"61A M=&$M/F9A;EMN<ET@/2!&04Y?5$]?4D5'*&]L9"P at 1$E67T923TU?4D5'*&1A M=&$M/F9A;E]D:79;;G)=*2D["BL)=S at S-SDR9%]W<FET95]V86QU92AC;&EE M;G0L(%<X,S<Y,D1?4D5'7T9!3E]-24Y;;G)=+ HK"0D)"61A=&$M/F9A;E]M M:6Y;;G)=*3L**WT**PH at +RH@<F5A9"]W<FET92!F86X@;65A=7)E9"!V86QU M92!A;F0@;&EM:71S("HO"B!S=&%T:6,@=F]I9"!W.#,W.3)D7V9A;BAS=')U M8W0@:3)C7V-L:65N=" J8VQI96YT+"!I;G0@;W!E<F%T:6]N+"!I;G0 at 8W1L M7VYA;64L"B )"2!I;G0@*FYR96QS7VUA9RP@;&]N9R J<F5S=6QT<RD*('L* M( ES=')U8W0@=S at S-SDR9%]D871A("ID871A(#T at 8VQI96YT+3YD871A.PH@ M"6EN="!N<B ](&-T;%]N86UE("T at 5S@S-SDR1%]365-#5$Q?1D%.,3L*+0EU M."!T;7!?<F5G+"!T;7!?9F%N7V1I=CL*( H@"2\J(')E<W5L=%LP73H@;&]W M(&QI;6ET+"!R97-U;'1;,5TZ(&UE87-U<F5D('9A;'5E("HO"B ):68@*&]P M97)A=&EO;B ]/2!314Y33U)37U!23T-?4D5!3%])3D9/*0I 0" M,3 Q-2PT M-" K,3 U-RPQ,R! 0"!S=&%T:6,@=F]I9"!W.#,W.3)D7V9A;BAS=')U8W0@ M:3)C7V-L:65N"B )96QS92!I9B H;W!E<F%T:6]N(#T](%-%3E-/4E-?4%)/ M0U]214%,7U)%040I('L*( D)=S at S-SDR9%]U<&1A=&5?8VQI96YT*&-L:65N M="D["B )"7)E<W5L='-;,%T@/2!&04Y?1E)/35]214<H9&%T82T^9F%N7VUI M;EMN<ETL"BT)"0D)("!$259?1E)/35]214<H9&%T82T^9F%N7V1I=EMN<ETI M*3L*+0D)+RH at 861J=7-T($9A;B!$:79I<V]R+"!T:&5N(&-H86YG92!24$T@ M*B\*+0D)9&\@>PHM"0D)=S at S-SDR9%]U<&1A=&5?8VQI96YT*&-L:65N="D[ M"BT)"0EI9B H*&1A=&$M/F9A;EMN<ET^,'@U,"D@)B8@*&1A=&$M/F9A;EMN M<ET\,'AF9BDI('L*+0D)"2\J(&]P=&EM86P at 8V%S92X@,'@U,"!A;F0@,'AF M9B!A<F4 at 97AP97)I96YC92!D871A("HO"BT)"0D)<F5S=6QT<ULQ72 ]($9! M3E]&4D]-7U)%1RAD871A+3YF86Y;;G)=+ HM"0D)"0D)1$E67T923TU?4D5' M*&1A=&$M/F9A;E]D:79;;G)=*2D["BT)"0D)8G)E86L[("\J(&=O(&]U="!O M9B!T:&4 at 9&\M=VAI;&4@;&]O<"X@*B\*+0D)"7T at 96QS92!["BT)"0D):68@ M*"@H9&%T82T^9F%N7V1I=EMN<ETI/CTP># W("8F"BT)"0D)"2AD871A+3YF M86Y;;G)=*3T],'AF9BD@?'P*+0D)"0D@(" @*"AD871A+3YF86Y?9&EV6VYR M72D\/3 @)B8*+0D)"0D)*&1A=&$M/F9A;EMN<ETI/#!X-S at I*2!["BT)"0D) M"7)E<W5L='-;,5T@/2 P.PHM"0D)"0EB<F5A:SL*+0D)"0E](&5L<V4@:68@ M*"AD871A+3YF86Y?9&EV6VYR72D\,'@P-R F)@HM"0D)"0D@*&1A=&$M/F9A M;EMN<ETI/3TP>&9F*2!["BT)"0D)"2AD871A+3YF86Y?9&EV6VYR72DK*SL* M+0D)"0D)<F5S=6QT<ULQ72 ]($9!3E]&4D]-7U)%1RAD871A+3YF86Y;;G)= M+ HM"0D)"0D)(" @("!$259?1E)/35]214<H9&%T82T^9F%N7V1I=EMN<ETI M*3L*+0D)"0E](&5L<V4@:68@*"AD871A+3YF86Y?9&EV6VYR72D^," F)@HM M"0D)"0D@("AD871A+3YF86Y;;G)=*3PP>#<X*2!["BT)"0D)"2AD871A+3YF M86Y?9&EV6VYR72DM+3L*+0D)"0D)<F5S=6QT<ULQ72 ]($9!3E]&4D]-7U)% M1RAD871A+3YF86Y;;G)=+ HM"0D)"0D)(" @("!$259?1E)/35]214<H9&%T M82T^9F%N7V1I=EMN<ETI*3L*+0D)"0E]"BT*+0D)"0ET;7!?<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%T82 J9&%T82 ](&-L M:65N="T^9&%T83L*+0EI;G0@:3TP+"!J/3 ["BT)=3@@=&5M<%]R96<],"P@ M:STQ+"!F86Y?9&EV7W)E9STP.PHM"74X('1M<%]F86Y?9&EV.PHK"6EN="!I M(#T@,#L*( H@"6EF("AO<&5R871I;VX@/3T at 4T5.4T]24U]04D]#7U)%04Q? M24Y&3RD*( D)*FYR96QS7VUA9R ](# ["D! ("TQ,3DU+#(W("LQ,C T+#8@ M0$ @<W1A=&EC('9O:60@=S at S-SDR9%]F86Y?9&EV*'-T<G5C="!I,F-?8PH@ M"0D)<F5S=6QT<UMI72 ]($1)5E]&4D]-7U)%1RAD871A+3YF86Y?9&EV6VE= M*3L*( D)?0H@"0DJ;G)E;'-?;6%G(#T at -SL*+0E](&5L<V4@:68@*&]P97)A M=&EO;B ]/2!314Y33U)37U!23T-?4D5!3%]74DE412D@>PHM"0EI9B H*FYR M96QS7VUA9R \(#<I('L*+0D)"7)E='5R;CL*+0D)?0HM"0EF;W(@*&D],#L@ M:3PW.R!I*RLI('L*+0D)"71E;7!?<F5G(#T at 4T5.4T]24U],24U)5"AR97-U M;'1S6VE=+" Q+" Q,C at I.PHM"0D)9F]R("AK/3 L:CTP.R!J/#<[(&HK*RD@ M>PHM"0D)"71E;7!?<F5G(#T@=&5M<%]R96<^/C$["BT)"0D):68@*'1E;7!? M<F5G(#T](# I"BT)"0D)"6)R96%K.PHM"0D)"6LK*SL*+0D)"7T*+0D)"69A M;E]D:79?<F5G(#T@=S at S-SDR9%]R96%D7W9A;'5E*&-L:65N="P*+0D)"0D) M5S at S-SDR1%]214=?1D%.7T1)5EMI+S)=*3L*+0D)"69A;E]D:79?<F5G("8] M("AI)3(@/3T@,"D@/R P>&8X(#H@,'@X9CL*+0D)"71M<%]F86Y?9&EV(#T@ M*&DE,B ]/2 P*2 _("AK)C!X,#<I"BT)"0D)"3H@*"AK/#PT*28P>#<P*3L* M+0D)"7<X,S<Y,F1?=W)I=&5?=F%L=64H8VQI96YT+ HM"0D)"0E7.#,W.3)$ M7U)%1U]&04Y?1$E66VDO,ETL"BT)"0D)"69A;E]D:79?<F5G?'1M<%]F86Y? 49&EV*3L*+0D)?0H@"7T*('T*( H` ` end ===========================================================================================The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Winbond is strictly prohibited; and any information in this email irrelevant to the official business of Winbond shall be deemed as neither given nor endorsed by Winbond. ===========================================================================================If your computer is unable to decode Chinese font, please ignore the following message.It essentially repeats the statement in English given above.???H???????t?????q?l???]???????K?????T, ?????v???o?H?H???w?????H?H???\\????. ?????z???D?Q???w?????H?H???]???????]?b???g???v?????????U???????H??, ???z?i?????o?H?H?????Y?N?H???q?q???P???????A???????H????. ?????z???X?@, ?????????P??. ?S??????, ???????g???v?????????????q?l?????K???T???????O?Q?Y???T????. ?H???P?????q?l???~?L???????e,???o?????????q?l?????????N??.