Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755405AbdCWBKV convert rfc822-to-8bit (ORCPT ); Wed, 22 Mar 2017 21:10:21 -0400 Received: from mout.gmx.net ([212.227.15.19]:60889 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752392AbdCWBKD (ORCPT ); Wed, 22 Mar 2017 21:10:03 -0400 From: Peter =?ISO-8859-1?Q?H=FCwe?= To: Guenter Roeck Cc: linux-hwmon@vger.kernel.org, Jean Delvare , linux-kernel@vger.kernel.org Subject: Re: Conversion of w83627ehf to hwmon_device_register_with_info ? Date: Thu, 23 Mar 2017 02:11:15 +0100 Message-ID: <4092377.1mPM9X2xgo@lamerx> User-Agent: KMail/4.14.10 (Linux/4.10.1; KDE/4.14.24; x86_64; ; ) In-Reply-To: <0163376b-88af-d937-f29b-1d92ac1f87ef@roeck-us.net> References: <201703030133.01363.PeterHuewe@gmx.de> <201703211146.24674.PeterHuewe@gmx.de> <0163376b-88af-d937-f29b-1d92ac1f87ef@roeck-us.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT Content-Type: text/plain; charset="iso-8859-1" X-Provags-ID: V03:K0:ixsuhxiFT94Aewodya34dDPwG6Lq1IRGOgS2boWNdzKekKh96m+ GXQAduTZgesT0sQHRQYPKhAqB7mje5ieuPkFtr2Tn4svBR5KalrTsjtZ+H/arsOlW2iULFH aRhnrDIrRi+LSHdfa9R1IcTt5S7Gwcz1pChsALqSahoDaYtSr1Zuz0Os1BaSNpKoO1rgYdo hjhTaEjlc3HF8hwLXygVg== X-UI-Out-Filterresults: notjunk:1;V01:K0:mEkTRf3jzoY=:E4MqFCLK8bya2mwHUrTM9p DPt75H+z7sdwqqTX5uF7C9jAAoEsN6/04A1sWhehZr4rGpH3bodW2XIoN4v8T3D84hw6GOapt 7dVEHRiNo5KG3Zy3OQh4bgQc90FJ9utCcOUGA9wOt3+sb0mpL9T7IbObp6h0QQwh29acL8Imk FI87pHZYATosLvF2hvQdREJu+Df2D8rVFlo6jUJf2gQPVBh2gf+MjgP24Zzfl4W1aK9O9t1lU Pl10nkFN6o52+CAoc6nRoQeVDdu4cKs4+g9ysSJu0i0W1CmZ2h8V08fTSQYQb9Mt6gFH5leE1 Cb4M/6SLv9sC5kT+0hyjBl6KTehdWdj/DfNSnpnFJIX4zoTObJfpgtWbu8QoujCDD0YMXTbq8 tQS9xgMlQb3VyTMVmMCh5qxd9Yu4UWG0U6tcE9jL9GB6VR0QdqA9YKIC945YqMMK8JNJoifft 23/fkpHUiUjMbvV31CUV8Aa02f/GrI4SFssXJh6m3DOZzVAxFTzQOoOT7lmK1ORdtXKurms9D tdLWvzzm+YQgLP4QWip/JL157eXgA8F75QBsvqU3sT0kcwI3oPkoKwCnwgnZBLglnTfFlZ1kO Rk8Q8jo5XGdHAnivpqMOxKU+DwKr2o8ltG3lZz9CX1iZEvGm7hbORRuqizqsGrL8VRDl/a8Fz bbGReTvbOf//mpk8KuIRbYCCG0I1vaZZ2Kc8D0eSw/0hQVFCfxSNMqjZdcbfJDaJycjKDusTP eQ7N3AUVe4ajYI4sYoL8OQl6Uo9BhtMj/UpnK2Ie+gkppNhByGbF908Hwc/fwx4k3zc700N9+ Y+b83BZ Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3203 Lines: 85 > > It saves about 20k in compiled size, so the savings from reduced > > boilerplate are huge. (and I think it's more readable) > > > >> I would suggest to drop nct6775/nct6776 support to simplify the > >> code when you do that. Maybe as separate commit, though. > > > > Hehe - I'm testing on a nct6776 :) > > I'll look into it once the first conversion has been accepted. > > Wondering - why don't you use the nct6775 driver ? Probably because it got matched by sensors-detect before the nct6775 driver (?) or because I hadn't had it turned on in my kernel config. Both drivers work, but interestingly, they show different values for intrusion1 (and fan alarm). nct6776.c: nct6776-isa-0290 Adapter: ISA adapter Vcore: +1.16 V (min = +0.00 V, max = +1.74 V) in1: +1.85 V (min = +0.00 V, max = +0.00 V) ALARM AVCC: +3.36 V (min = +2.98 V, max = +3.63 V) +3.3V: +3.36 V (min = +2.98 V, max = +3.63 V) in4: +0.26 V (min = +0.00 V, max = +0.00 V) ALARM in5: +1.67 V (min = +0.00 V, max = +0.00 V) ALARM in6: +0.79 V (min = +0.00 V, max = +0.00 V) ALARM 3VSB: +3.44 V (min = +2.98 V, max = +3.63 V) Vbat: +3.26 V (min = +2.70 V, max = +3.63 V) fan1: 0 RPM (min = 0 RPM) fan2: 2106 RPM (min = 0 RPM) fan3: 0 RPM (min = 0 RPM) fan4: 0 RPM (min = 0 RPM) fan5: 0 RPM (min = 0 RPM) SYSTIN: +35.0?C (high = +0.0?C, hyst = +0.0?C) ALARM sensor = thermistor CPUTIN: +44.0?C (high = +80.0?C, hyst = +75.0?C) sensor = thermistor AUXTIN: +43.5?C (high = +80.0?C, hyst = +75.0?C) sensor = thermistor PECI Agent 0: +59.0?C (high = +80.0?C, hyst = +75.0?C) (crit = +105.0?C) PCH_CHIP_TEMP: +0.0?C PCH_CPU_TEMP: +0.0?C PCH_MCH_TEMP: +0.0?C intrusion0: ALARM intrusion1: OK beep_enable: disabled w83627ehf.c: nct6776-isa-0290 Adapter: ISA adapter Vcore: +1.14 V (min = +0.00 V, max = +1.74 V) in1: +1.85 V (min = +0.00 V, max = +0.00 V) ALARM AVCC: +3.36 V (min = +2.98 V, max = +3.63 V) +3.3V: +3.36 V (min = +2.98 V, max = +3.63 V) in4: +0.24 V (min = +0.00 V, max = +0.00 V) ALARM in5: +1.68 V (min = +0.00 V, max = +0.00 V) ALARM 3VSB: +3.44 V (min = +2.98 V, max = +3.63 V) Vbat: +3.26 V (min = +2.70 V, max = +3.63 V) fan1: 0 RPM (min = 0 RPM) ALARM fan2: 2142 RPM (min = 0 RPM) ALARM fan3: 0 RPM (min = 0 RPM) ALARM fan4: 0 RPM (min = 0 RPM) ALARM fan5: 0 RPM (min = 0 RPM) ALARM SYSTIN: +35.0?C (high = +0.0?C, hyst = +0.0?C) ALARM sensor = thermistor CPUTIN: +46.0?C (high = +80.0?C, hyst = +75.0?C) sensor = thermistor AUXTIN: +44.0?C (high = +80.0?C, hyst = +75.0?C) sensor = thermistor PECI Agent 0: +64.0?C cpu0_vid: +0.000 V intrusion0: ALARM intrusion1: ALARM Once the other patches have been accepted I'll work on that conversion/removal of the nct6775 code from the w83627ehf. Peter