linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: dron0gus@gmail.com (Gusakov Andrey)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] S3C: increase hwmon channels to 10
Date: Thu, 29 Dec 2011 17:07:16 +0400	[thread overview]
Message-ID: <1325164036-15638-3-git-send-email-dron0gus@gmail.com> (raw)
In-Reply-To: <1325164036-15638-1-git-send-email-dron0gus@gmail.com>

S3C2416/2443 have 10-ch ADC. So increase number of hwmon's channels
to 10.

Signed-off-by: Gusakov Andrey <dron0gus@gmail.com>
---
 arch/arm/plat-samsung/include/plat/hwmon.h |    2 +-
 drivers/hwmon/s3c-hwmon.c                  |    8 ++++++--
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/arch/arm/plat-samsung/include/plat/hwmon.h b/arch/arm/plat-samsung/include/plat/hwmon.h
index c167e44..91d8a13 100644
--- a/arch/arm/plat-samsung/include/plat/hwmon.h
+++ b/arch/arm/plat-samsung/include/plat/hwmon.h
@@ -34,7 +34,7 @@ struct s3c_hwmon_chcfg {
  * @in: One configuration for each possible channel used.
  */
 struct s3c_hwmon_pdata {
-	struct s3c_hwmon_chcfg	*in[8];
+	struct s3c_hwmon_chcfg	*in[10];
 };
 
 /**
diff --git a/drivers/hwmon/s3c-hwmon.c b/drivers/hwmon/s3c-hwmon.c
index f6c26d1..894110d 100644
--- a/drivers/hwmon/s3c-hwmon.c
+++ b/drivers/hwmon/s3c-hwmon.c
@@ -55,7 +55,7 @@ struct s3c_hwmon {
 	struct s3c_adc_client	*client;
 	struct device		*hwmon_dev;
 
-	struct s3c_hwmon_attr	attrs[8];
+	struct s3c_hwmon_attr	attrs[10];
 };
 
 /**
@@ -119,8 +119,10 @@ DEF_ADC_ATTR(4);
 DEF_ADC_ATTR(5);
 DEF_ADC_ATTR(6);
 DEF_ADC_ATTR(7);
+DEF_ADC_ATTR(8);
+DEF_ADC_ATTR(9);
 
-static struct attribute *s3c_hwmon_attrs[9] = {
+static struct attribute *s3c_hwmon_attrs[11] = {
 	&sensor_dev_attr_adc0_raw.dev_attr.attr,
 	&sensor_dev_attr_adc1_raw.dev_attr.attr,
 	&sensor_dev_attr_adc2_raw.dev_attr.attr,
@@ -129,6 +131,8 @@ static struct attribute *s3c_hwmon_attrs[9] = {
 	&sensor_dev_attr_adc5_raw.dev_attr.attr,
 	&sensor_dev_attr_adc6_raw.dev_attr.attr,
 	&sensor_dev_attr_adc7_raw.dev_attr.attr,
+	&sensor_dev_attr_adc8_raw.dev_attr.attr,
+	&sensor_dev_attr_adc9_raw.dev_attr.attr,
 	NULL,
 };
 
-- 
1.7.0.4

  parent reply	other threads:[~2011-12-29 13:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-29 13:07 [PATCH] S3C: fix order of MACH_S3C* checks on GPIO count define Gusakov Andrey
2011-12-29 13:07 ` [PATCH] S3C: enable debuging over UART3 Gusakov Andrey
2011-12-29 13:07 ` Gusakov Andrey [this message]
2012-01-03  9:43 ` [PATCH] S3C: fix order of MACH_S3C* checks on GPIO count define Russell King - ARM Linux

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=1325164036-15638-3-git-send-email-dron0gus@gmail.com \
    --to=dron0gus@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).