public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <guenter.roeck@ericsson.com>
To: dd diasemi <dd.diasemi@gmail.com>
Cc: "lm-sensors@lm-sensors.org" <lm-sensors@lm-sensors.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [lm-sensors] [PATCHv3 6/11] HWMON: HWMON module of DA9052 device driver
Date: Thu, 23 Dec 2010 14:20:27 -0800	[thread overview]
Message-ID: <20101223222027.GA29608@ericsson.com> (raw)
In-Reply-To: <AANLkTin7N2HViUNSez9si7WytPkQAkTiR9NP3iUitbh4@mail.gmail.com>

On Tue, Dec 21, 2010 at 12:52:50PM -0500, dd diasemi wrote:
> HWMON module for DA9052 PMIC device from Dialog Semiconductor.
> 
> Changes made since last submission:
> . removed the DA9052 customized success and error codes
> . changed da9052_manual_read() return type
> 
> Linux Kernel Version: 2.6.34
> 
> Signed-off-by: D. Chen <dchen@diasemi.com>

[ ... ]

> +
> +static DEVICE_ATTR(name, S_IRUGO, da9052_adc_show_name, NULL);
> +static SENSOR_DEVICE_ATTR(read_vddout, S_IRUGO,
> +                               da9052_adc_read_start_stop, NULL,
> +                               DA9052_ADC_VDDOUT);
> +static SENSOR_DEVICE_ATTR(read_ich, S_IRUGO, da9052_adc_read_ich, NULL,
> +                               DA9052_ADC_ICH);
> +static SENSOR_DEVICE_ATTR(read_tbat, S_IRUGO, da9052_adc_read_tbat, NULL,
> +                               DA9052_ADC_TBAT);
> +static SENSOR_DEVICE_ATTR(read_vbat, S_IRUGO, da9052_adc_read_vbat, NULL,
> +                               DA9052_ADC_VBAT);
> +#if (DA9052_ADC_CONF_ADC4 == 1)
> +static SENSOR_DEVICE_ATTR(in4_input, S_IRUGO, da9052_adc_read_start_stop, NULL,
> +                               DA9052_ADC_ADCIN4);
> +#endif
> +#if (DA9052_ADC_CONF_ADC5 == 1)
> +static SENSOR_DEVICE_ATTR(in5_input, S_IRUGO, da9052_adc_read_start_stop, NULL,
> +                               DA9052_ADC_ADCIN5);
> +#endif
> +#if (DA9052_ADC_CONF_ADC6 == 1)
> +static SENSOR_DEVICE_ATTR(in6_input, S_IRUGO, da9052_adc_read_start_stop, NULL,
> +                               DA9052_ADC_ADCIN6);
> +#endif
> +static SENSOR_DEVICE_ATTR(read_tjunc, S_IRUGO, da9052_adc_read_tjunc, NULL,
> +                               DA9052_ADC_TJUNC);
> +static SENSOR_DEVICE_ATTR(read_vbbat, S_IRUGO, da9052_adc_read_vbbat, NULL,
> +                               DA9052_ADC_VBBAT);
> +

Driver doesn't follow hwmon sysfs ABI, with no good reason.
As for the labels, I am not sure if the provided labels reflect chip data 
or the use of the chip on a specific board. The product brief seems to indicate
the latter. If so, defining label attribute files is not appropriate. Labels
can then be assigned through sensors.conf.

The use of ifdefs in the code is excessive. There should be a single Kconfig entry
to enable the driver. Remaining data can be provided with platform data if it is 
mandatory, or sensors not supported on a given board can be configured to be 
ignored via sensors.conf.

Guenter

      parent reply	other threads:[~2010-12-23 22:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-21 17:52 [PATCHv3 6/11] HWMON: HWMON module of DA9052 device driver dd diasemi
2010-12-21 18:01 ` Randy Dunlap
2010-12-23 22:20 ` Guenter Roeck [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101223222027.GA29608@ericsson.com \
    --to=guenter.roeck@ericsson.com \
    --cc=dd.diasemi@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lm-sensors@lm-sensors.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox