diff mbox

[v3] input/misc: new ADXL345/346 driver

Message ID 544AC56F16B56944AEC3BD4E3D5917712E66DFF76E@LIMKCMBX1.ad.analog.com (mailing list archive)
State New, archived
Headers show

Commit Message

Hennerich, Michael July 1, 2010, 9:15 a.m. UTC
None
diff mbox

Patch

diff --git a/drivers/input/misc/adxl34x-i2c.c b/drivers/input/misc/adxl34x-i2c.c
index b1b8df3..0779724 100644
--- a/drivers/input/misc/adxl34x-i2c.c
+++ b/drivers/input/misc/adxl34x-i2c.c
@@ -58,14 +58,14 @@  static int adxl34x_i2c_read_block(struct device *dev,
        return 0;
 }

-static const struct adxl34x_bus_ops adx134x_smbus_bops = {
+static const struct adxl34x_bus_ops adxl34x_smbus_bops = {
        .bustype        = BUS_I2C,
        .write          = adxl34x_smbus_write,
        .read           = adxl34x_smbus_read,
        .read_block     = adxl34x_smbus_read_block,
 };

-static const struct adxl34x_bus_ops adx134x_i2c_bops = {
+static const struct adxl34x_bus_ops adxl34x_i2c_bops = {
        .bustype        = BUS_I2C,
        .write          = adxl34x_smbus_write,
        .read           = adxl34x_smbus_read,
@@ -88,7 +88,7 @@  static int __devinit adxl34x_i2c_probe(struct i2c_client *client,
        ac = adxl34x_probe(&client->dev, client->irq, false,
                           i2c_check_functionality(client->adapter,
                                                   I2C_FUNC_SMBUS_READ_I2C_BLOCK) ?
-                               &adx134x_smbus_bops : &adx134x_i2c_bops);
+                               &adxl34x_smbus_bops : &adxl34x_i2c_bops);
        if (IS_ERR(ac))
                return PTR_ERR(ac);

diff --git a/drivers/input/misc/adxl34x.c b/drivers/input/misc/adxl34x.c
index 2706ea0..756f4d0 100644
--- a/drivers/input/misc/adxl34x.c
+++ b/drivers/input/misc/adxl34x.c
@@ -514,6 +514,7 @@  static ssize_t adxl34x_calibrate_store(struct device *dev,
        ac->hwcal.y -= (ac->saved.y / 4);
        ac->swcal.y = ac->saved.y % 4;

+       ac->hwcal.z -= (ac->saved.z / 4);
        ac->swcal.z = ac->saved.z % 4;

        AC_WRITE(ac, OFSX, (s8) ac->hwcal.x);
@@ -724,7 +725,7 @@  struct adxl34x *adxl34x_probe(struct device *dev, int irq,
        pdata = &ac->pdata;

        ac->input = input_dev;
-       ac->disabled = true;
+       ac->disabled = false;
        ac->dev = dev;
        ac->irq = irq;
        ac->bops = bops;