LKML Archive on lore.kernel.org
 help / color / Atom feed
From: Anton Vorontsov <cbouatmailru@gmail.com>
To: MyungJoo Ham <myungjoo.ham@samsung.com>
Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,
	Samuel Ortiz <sameo@linux.intel.com>,
	Grazvydas Ignotas <notasas@gmail.com>,
	kyungmin.park@samsung.com, myungjoo.ham@gmail.com
Subject: Re: [PATCH] Add MAX17042 Fuel Gauge Driver - Initial Release
Date: Fri, 14 Jan 2011 18:15:07 +0300
Message-ID: <20110114151507.GA30831@oksana.dev.rtsoft.ru> (raw)
In-Reply-To: <1294983971-17140-1-git-send-email-myungjoo.ham@samsung.com>

On Fri, Jan 14, 2011 at 02:46:11PM +0900, MyungJoo Ham wrote:
> The MAX17042 is a fuel gauge with an I2C interface for lithium-ion
> betteries. Unlike its predecessor MAX17040, MAX17042 uses 16bit
> registers. Besides, MAX17042 has much more features than MAX17040; e.g.,
> a thermistor, current and current accumulation measurement, battery
> internal resistance estimate, average values of measurement, and others.
> 
> This patch implements a driver for MAX17042.
> In this initial release, we have implemented the most basic features of
> a fuel gauge: measure the battery capacity and voltage.
> 
> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>

Thanks for the patch!

Applied to battery-2.6.git, with some changes.

[...]
> +static const struct i2c_device_id max17042_id[] = {
> +	{ "max17042", 0 },
> +	{ }
> +};
> +MODULE_DEVICE_TABLE(i2c, max17040_id);

Should be max17042_id, otherwise build breaks when enabled as a module:

drivers/power/max17042_battery.c:214: error: ‘__mod_i2c_device_table’ aliased to undefined symbol ‘max17040_id’

Also a few small cosmetic changes were made. Here is the whole
diff:

diff --git a/drivers/power/max17042_battery.c b/drivers/power/max17042_battery.c
index 6e6eeab..c5c8805 100644
--- a/drivers/power/max17042_battery.c
+++ b/drivers/power/max17042_battery.c
@@ -1,5 +1,5 @@
 /*
- * max17042_battery.c - Fuel gauge driver for Maxim 17042 / 8966 / 8997
+ * Fuel gauge driver for Maxim 17042 / 8966 / 8997
  *  Note that Maxim 8966 and 8997 are mfd and this is its subdevice.
  *
  * Copyright (C) 2011 Samsung Electronics
@@ -22,8 +22,10 @@
  * This driver is based on max17040_battery.c
  */
 
+#include <linux/init.h>
 #include <linux/slab.h>
 #include <linux/i2c.h>
+#include <linux/mod_devicetable.h>
 #include <linux/power_supply.h>
 #include <linux/power/max17042_battery.h>
 
@@ -209,8 +211,7 @@ static const struct i2c_device_id max17042_id[] = {
 	{ "max17042", 0 },
 	{ }
 };
-MODULE_DEVICE_TABLE(i2c, max17040_id);
-
+MODULE_DEVICE_TABLE(i2c, max17042_id);
 
 static struct i2c_driver max17042_i2c_driver = {
 	.driver	= {
diff --git a/include/linux/power/max17042_battery.h b/include/linux/power/max17042_battery.h
index 4cc533f..7995deb 100644
--- a/include/linux/power/max17042_battery.h
+++ b/include/linux/power/max17042_battery.h
@@ -1,5 +1,5 @@
 /*
- * max17042_battery.h - Fuel gauge driver for Maxim 17042 / 8966 / 8997
+ * Fuel gauge driver for Maxim 17042 / 8966 / 8997
  *  Note that Maxim 8966 and 8997 are mfd and this is its subdevice.
  *
  * Copyright (C) 2011 Samsung Electronics

      reply index

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-14  5:46 MyungJoo Ham
2011-01-14 15:15 ` Anton Vorontsov [this message]

Reply instructions:

You may reply publically 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=20110114151507.GA30831@oksana.dev.rtsoft.ru \
    --to=cbouatmailru@gmail.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=myungjoo.ham@gmail.com \
    --cc=myungjoo.ham@samsung.com \
    --cc=notasas@gmail.com \
    --cc=sameo@linux.intel.com \
    /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

LKML Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/lkml/0 lkml/git/0.git
	git clone --mirror https://lore.kernel.org/lkml/1 lkml/git/1.git
	git clone --mirror https://lore.kernel.org/lkml/2 lkml/git/2.git
	git clone --mirror https://lore.kernel.org/lkml/3 lkml/git/3.git
	git clone --mirror https://lore.kernel.org/lkml/4 lkml/git/4.git
	git clone --mirror https://lore.kernel.org/lkml/5 lkml/git/5.git
	git clone --mirror https://lore.kernel.org/lkml/6 lkml/git/6.git
	git clone --mirror https://lore.kernel.org/lkml/7 lkml/git/7.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ https://lore.kernel.org/lkml \
		linux-kernel@vger.kernel.org linux-kernel@archiver.kernel.org
	public-inbox-index lkml


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kernel


AGPL code for this site: git clone https://public-inbox.org/ public-inbox