From mboxrd@z Thu Jan 1 00:00:00 1970 From: khali@linux-fr.org (Jean Delvare) Date: Thu, 19 May 2005 06:24:06 +0000 Subject: LM83 driver Message-Id: <20030721110328.26d6bfb1.khali@linux-fr.org> List-Id: References: <20030703194558.60bc8955.khali@linux-fr.org> In-Reply-To: <20030703194558.60bc8955.khali@linux-fr.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: lm-sensors@vger.kernel.org > > Hm, how do I know who's calling me then? Using ctl_name and the > > LM83_SYSCTL_* constants defined earlier? I don't exactly see the > > interest yet. Though the functions are similar, most of the code > > really depend on the sensor, so I don't think we'll win in clarity > > nor code size. But maybe it's just me. Where could I look at a > > similar situation in our code? > > See w83781d_pwm() in w83781d.c which uses subtraction to convert the > SYSCTL number to PWM number, and the W83781D_REG_PWM macro which > indexes into a static array of register numbers. OK, I've done that. Looks better for sure, thanks for the tip. -- Jean Delvare http://www.ensicaen.ismra.fr/~delvare/