All of lore.kernel.org
 help / color / mirror / Atom feed
* + drivers-misc-lis3lv02d-fix-some-comments-specific-to-lis331dlh-driver.patch added to -mm tree
@ 2012-09-24 21:46 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2012-09-24 21:46 UTC (permalink / raw)
  To: mm-commits; +Cc: anilkumar, arnd, broonie, eric.piel, tony


The patch titled
     Subject: drivers/misc/lis3lv02d: fix some comments specific to lis331dlh driver
has been added to the -mm tree.  Its filename is
     drivers-misc-lis3lv02d-fix-some-comments-specific-to-lis331dlh-driver.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: AnilKumar Ch <anilkumar@ti.com>
Subject: drivers/misc/lis3lv02d: fix some comments specific to lis331dlh driver

Fix some minor problems in comments of lis331dlh driver

  * correct comments with respect to 2G sensitivity
  * correct typo lis3331dlh mistake to lis331dlh
  * add comment to say only 2G range is supported
  * change the function name from lis3lv02d_read_16 to
    lis331dlh_read_data.
  * update i2c_device_id table entry to maintaine consistancy
  * update sensor display message

This patch is created based on Eric Piel's review comments on "lis3lv02d:
Add STMicroelectronics lis331dlh digital accelerometer" v2 patch.

Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
Cc: Éric Piel <eric.piel@tremplin-utc.net>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 drivers/misc/lis3lv02d/lis3lv02d.c     |   13 +++++++------
 drivers/misc/lis3lv02d/lis3lv02d.h     |    2 +-
 drivers/misc/lis3lv02d/lis3lv02d_i2c.c |    2 +-
 3 files changed, 9 insertions(+), 8 deletions(-)

diff -puN drivers/misc/lis3lv02d/lis3lv02d.c~drivers-misc-lis3lv02d-fix-some-comments-specific-to-lis331dlh-driver drivers/misc/lis3lv02d/lis3lv02d.c
--- a/drivers/misc/lis3lv02d/lis3lv02d.c~drivers-misc-lis3lv02d-fix-some-comments-specific-to-lis331dlh-driver
+++ a/drivers/misc/lis3lv02d/lis3lv02d.c
@@ -82,9 +82,10 @@
 #define LIS3_SENSITIVITY_8B		(18 * LIS3_ACCURACY)
 
 /*
- * LIS3331DLH spec says 1LSBs corresponds 4G/1024 -> 1LSB is 1000/1024 mG.
- * Sensitivity values for +/-2G, outdata in 12 bits for +/-2G scale. so 4
- * bits adjustment is required
+ * LIS331DLH spec says 1LSBs corresponds 4G/4096 -> 1LSB is 1000/1024 mG.
+ * Below macros defines sensitivity values for +/-2G. Dataout bits for
+ * +/-2G range is 12 bits so 4 bits adjustment must be done to get 12bit
+ * data from 16bit value. Currently this driver supports only 2G range.
  */
 #define LIS3DLH_SENSITIVITY_2G		((LIS3_ACCURACY * 1000) / 1024)
 #define SHIFT_ADJ_2G			4
@@ -145,7 +146,7 @@ static s16 lis3lv02d_read_12(struct lis3
 }
 
 /* 12bits for 2G range, 13 bits for 4G range and 14 bits for 8G range */
-static s16 lis3lv02d_read_16(struct lis3lv02d *lis3, int reg)
+static s16 lis331dlh_read_data(struct lis3lv02d *lis3, int reg)
 {
 	u8 lo, hi;
 	int v;
@@ -1136,8 +1137,8 @@ int lis3lv02d_init_device(struct lis3lv0
 		lis3->scale = LIS3_SENSITIVITY_8B;
 		break;
 	case WAI_3DLH:
-		pr_info("16 bits 3DLH sensor found\n");
-		lis3->read_data = lis3lv02d_read_16;
+		pr_info("16 bits lis331dlh sensor found\n");
+		lis3->read_data = lis331dlh_read_data;
 		lis3->mdps_max_val = 2048; /* 12 bits for 2G */
 		lis3->shift_adj = SHIFT_ADJ_2G;
 		lis3->pwron_delay = LIS3_PWRON_DELAY_WAI_8B;
diff -puN drivers/misc/lis3lv02d/lis3lv02d.h~drivers-misc-lis3lv02d-fix-some-comments-specific-to-lis331dlh-driver drivers/misc/lis3lv02d/lis3lv02d.h
--- a/drivers/misc/lis3lv02d/lis3lv02d.h~drivers-misc-lis3lv02d-fix-some-comments-specific-to-lis331dlh-driver
+++ a/drivers/misc/lis3lv02d/lis3lv02d.h
@@ -104,9 +104,9 @@ enum lis3_who_am_i {
 };
 
 enum lis3_type {
+	LIS3LV02D,
 	LIS3DC,
 	HP3DC,
-	LIS3LV02D,
 	LIS2302D,
 	LIS331DLF,
 	LIS331DLH,
diff -puN drivers/misc/lis3lv02d/lis3lv02d_i2c.c~drivers-misc-lis3lv02d-fix-some-comments-specific-to-lis331dlh-driver drivers/misc/lis3lv02d/lis3lv02d_i2c.c
--- a/drivers/misc/lis3lv02d/lis3lv02d_i2c.c~drivers-misc-lis3lv02d-fix-some-comments-specific-to-lis331dlh-driver
+++ a/drivers/misc/lis3lv02d/lis3lv02d_i2c.c
@@ -257,7 +257,7 @@ static int lis3_i2c_runtime_resume(struc
 #endif /* CONFIG_PM_RUNTIME */
 
 static const struct i2c_device_id lis3lv02d_id[] = {
-	{"lis3lv02d", 0 },
+	{"lis3lv02d", LIS3LV02D},
 	{"lis331dlh", LIS331DLH},
 	{}
 };
_

Patches currently in -mm which might be from anilkumar@ti.com are

linux-next.patch
drivers-misc-lis3lv02d-add-generic-dt-matching-code.patch
drivers-misc-lis3lv02d-lis3lv02d_spic-add-dt-matching-table-passthru-code.patch
drivers-misc-lis3lv02d-remove-lis3lv02d-driver-dt-init.patch
drivers-misc-lis3lv02d-lis3lv02d_spic-add-lis3lv02d-device-tree-init.patch
drivers-misc-lis3lv02d-lis3lv02d_spic-add-lis3lv02d-device-tree-init-fix.patch
drivers-misc-lis3lv02d-lis3lv02d_i2cc-add-lis3lv02d-device-tree-init.patch
drivers-misc-lis3lv02d-lis3lv02d_i2cc-add-lis3lv02d-device-tree-init-fix.patch
drivers-misc-lis3lv02d-fix-some-comments-specific-to-lis331dlh-driver.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-09-24 21:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-24 21:46 + drivers-misc-lis3lv02d-fix-some-comments-specific-to-lis331dlh-driver.patch added to -mm tree akpm

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.