Lines Matching +full:off +full:- +full:axis
1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Driver for Freescale's 3-Axis Accelerometer MMA8450
42 static int mma8450_read(struct i2c_client *c, unsigned int off) in mma8450_read() argument
46 ret = i2c_smbus_read_byte_data(c, off); in mma8450_read()
48 dev_err(&c->dev, in mma8450_read()
50 off, ret); in mma8450_read()
55 static int mma8450_write(struct i2c_client *c, unsigned int off, u8 v) in mma8450_write() argument
59 error = i2c_smbus_write_byte_data(c, off, v); in mma8450_write()
61 dev_err(&c->dev, in mma8450_write()
63 off, error); in mma8450_write()
70 static int mma8450_read_block(struct i2c_client *c, unsigned int off, in mma8450_read_block() argument
75 err = i2c_smbus_read_i2c_block_data(c, off, size, buf); in mma8450_read_block()
77 dev_err(&c->dev, in mma8450_read_block()
126 * Sleep mode poll rate - 50Hz in mma8450_open()
127 * System output data rate - 400Hz in mma8450_open()
128 * Full scale selection - Active, +/- 2G in mma8450_open()
154 input = devm_input_allocate_device(&c->dev); in mma8450_probe()
156 return -ENOMEM; in mma8450_probe()
160 input->name = MMA8450_DRV_NAME; in mma8450_probe()
161 input->id.bustype = BUS_I2C; in mma8450_probe()
163 input->open = mma8450_open; in mma8450_probe()
164 input->close = mma8450_close; in mma8450_probe()
166 input_set_abs_params(input, ABS_X, -2048, 2047, 32, 32); in mma8450_probe()
167 input_set_abs_params(input, ABS_Y, -2048, 2047, 32, 32); in mma8450_probe()
168 input_set_abs_params(input, ABS_Z, -2048, 2047, 32, 32); in mma8450_probe()
172 dev_err(&c->dev, "failed to set up polling\n"); in mma8450_probe()
181 dev_err(&c->dev, "failed to register input device\n"); in mma8450_probe()
212 MODULE_DESCRIPTION("MMA8450 3-Axis Accelerometer Driver");