From: Randy Dunlap <randy.dunlap@oracle.com>
To: fabien.marteau@armadeus.com
Cc: khali@linux-fr.org, guenter.roeck@ericsson.com,
lm-sensors@lm-sensors.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] hwmon: Driver for as1531, Austria-Microsystem Analog to Digital Converter.
Date: Mon, 16 May 2011 08:01:19 -0700 [thread overview]
Message-ID: <20110516080119.e13284b6.randy.dunlap@oracle.com> (raw)
In-Reply-To: <1305553154-18195-2-git-send-email-fabien.marteau@armadeus.com>
On Mon, 16 May 2011 15:39:14 +0200 fabien.marteau@armadeus.com wrote:
> From: Fabien Marteau <fabien.marteau@armadeus.com>
>
>
> Signed-off-by: Fabien Marteau <fabien.marteau@armadeus.com>
> ---
> drivers/hwmon/Kconfig | 10 ++
> drivers/hwmon/Makefile | 1 +
> drivers/hwmon/as1531.c | 297 ++++++++++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 308 insertions(+), 0 deletions(-)
> create mode 100644 drivers/hwmon/as1531.c
>
> diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
> index 50e40db..d2ba655 100644
> --- a/drivers/hwmon/Kconfig
> +++ b/drivers/hwmon/Kconfig
> @@ -104,6 +104,16 @@ config SENSORS_ADCXX
> This driver can also be built as a module. If so, the module
> will be called adcxx.
>
> +config SENSORS_AS1531
> + tristate "Austria Microsystems AS1531 Analog to Digital Converter"
> + depends on SPI_MASTER
> + help
> + If you say yes here you get support for Austria Microsystems AS1531.
> + AS1531 is a 12Â bits Analog to digitals converter with 8 channels
is a 12? bits
what is the character after the "12", please?
Analog to digital converter
> + provided by Austria-Microsystems company.
> + This driver can also be built as a module. If so, the module
> + will be called as1531.
> +
> config SENSORS_ADM1021
> tristate "Analog Devices ADM1021 and compatibles"
> depends on I2C
> +/*----------------------------------------------------------------------*/
> +
> +static int __devinit as1531_probe(struct spi_device *spi)
> +{
> + struct as1531 *adc;
> + int status;
> + int i;
> +
> + adc = kzalloc(sizeof(struct as1531), GFP_KERNEL);
> + if (adc == NULL)
> + return -ENOMEM;
> +
> + mutex_init(&adc->lock);
> + mutex_lock(&adc->lock);
> +
> + dev_set_drvdata(&spi->dev, adc);
> +
> + for (i = 0; i < 11; i++) {
s/11/ARRAY_SIZE(as1531_input)/
> + status = device_create_file(&spi->dev,
> + &as1531_input[i].dev_attr);
> + if (status < 0) {
> + dev_err(&spi->dev, "device_create_file failed.\n");
> + goto out_err;
> + }
> + }
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
next prev parent reply other threads:[~2011-05-16 15:03 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-16 13:39 fabien.marteau
2011-05-16 15:01 ` Randy Dunlap [this message]
2011-05-16 15:39 ` Guenter Roeck
2011-05-17 7:06 ` Fabien Marteau
2011-05-17 9:25 ` Jonathan Cameron
2011-05-17 9:34 ` Jonathan Cameron
2011-05-17 11:59 ` Fabien Marteau
2011-05-17 13:38 ` Guenter Roeck
2011-05-18 13:09 ` Jonathan Cameron
2011-05-18 15:05 ` Jonathan Cameron
-- strict thread matches above, loose matches on Subject: below --
2011-05-16 13:39 fabien.marteau
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=20110516080119.e13284b6.randy.dunlap@oracle.com \
--to=randy.dunlap@oracle.com \
--cc=fabien.marteau@armadeus.com \
--cc=guenter.roeck@ericsson.com \
--cc=khali@linux-fr.org \
--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
Powered by JetHome