From: Jonathan Cameron <jic23@kernel.org>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] [PATCH v2] hwmon: (iio_hwmon) Add support for humidity sensors
Date: Sat, 18 Oct 2014 11:45:15 +0000 [thread overview]
Message-ID: <544252CB.4000401@kernel.org> (raw)
In-Reply-To: <1412467926-26478-1-git-send-email-linux@roeck-us.net>
On 05/10/14 01:12, Guenter Roeck wrote:
> The iio subsystem supports humidity sensors, so it makes sense
> to support it in the iio-hwmon bridge as well.
>
> Cc: Jonathan Cameron <jic23@kernel.org>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Jonathan Cameron <jic23@kernel.org>
> ---
> v2: Only add humidity sensor support for now.
>
> drivers/hwmon/iio_hwmon.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/hwmon/iio_hwmon.c b/drivers/hwmon/iio_hwmon.c
> index 14c82da..9801756 100644
> --- a/drivers/hwmon/iio_hwmon.c
> +++ b/drivers/hwmon/iio_hwmon.c
> @@ -63,7 +63,7 @@ static int iio_hwmon_probe(struct platform_device *pdev)
> struct iio_hwmon_state *st;
> struct sensor_device_attribute *a;
> int ret, i;
> - int in_i = 1, temp_i = 1, curr_i = 1;
> + int in_i = 1, temp_i = 1, curr_i = 1, humidity_i = 1;
> enum iio_chan_type type;
> struct iio_channel *channels;
> const char *name = "iio_hwmon";
> @@ -123,6 +123,11 @@ static int iio_hwmon_probe(struct platform_device *pdev)
> "curr%d_input",
> curr_i++);
> break;
> + case IIO_HUMIDITYRELATIVE:
> + a->dev_attr.attr.name = kasprintf(GFP_KERNEL,
> + "humidity%d_input",
> + humidity_i++);
> + break;
> default:
> ret = -EINVAL;
> goto error_release_channels;
>
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
next prev parent reply other threads:[~2014-10-18 11:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-05 0:12 [lm-sensors] [PATCH v2] hwmon: (iio_hwmon) Add support for humidity sensors Guenter Roeck
2014-10-18 11:45 ` Jonathan Cameron [this message]
2014-10-18 14:55 ` Guenter Roeck
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=544252CB.4000401@kernel.org \
--to=jic23@kernel.org \
--cc=lm-sensors@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.