mma7660.c (29583dfcd2dd72c766422bd05c16f06c6b1fb356) mma7660.c (76403ea698adffb6661e083545f21e50fef5b3ac)
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Freescale MMA7660FC 3-Axis Accelerometer
4 *
5 * Copyright (c) 2016, Intel Corporation.
6 *
7 * IIO driver for Freescale MMA7660FC; 7-bit I2C address: 0x4c.
8 */

--- 155 unchanged lines hidden (view full) ---

164 return -EINVAL;
165}
166
167static const struct iio_info mma7660_info = {
168 .read_raw = mma7660_read_raw,
169 .attrs = &mma7660_attribute_group,
170};
171
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Freescale MMA7660FC 3-Axis Accelerometer
4 *
5 * Copyright (c) 2016, Intel Corporation.
6 *
7 * IIO driver for Freescale MMA7660FC; 7-bit I2C address: 0x4c.
8 */

--- 155 unchanged lines hidden (view full) ---

164 return -EINVAL;
165}
166
167static const struct iio_info mma7660_info = {
168 .read_raw = mma7660_read_raw,
169 .attrs = &mma7660_attribute_group,
170};
171
172static int mma7660_probe(struct i2c_client *client,
173 const struct i2c_device_id *id)
172static int mma7660_probe(struct i2c_client *client)
174{
175 int ret;
176 struct iio_dev *indio_dev;
177 struct mma7660_data *data;
178
179 indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*data));
180 if (!indio_dev) {
181 dev_err(&client->dev, "iio allocation failed!\n");

--- 80 unchanged lines hidden (view full) ---

262
263static struct i2c_driver mma7660_driver = {
264 .driver = {
265 .name = "mma7660",
266 .pm = pm_sleep_ptr(&mma7660_pm_ops),
267 .of_match_table = mma7660_of_match,
268 .acpi_match_table = mma7660_acpi_id,
269 },
173{
174 int ret;
175 struct iio_dev *indio_dev;
176 struct mma7660_data *data;
177
178 indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*data));
179 if (!indio_dev) {
180 dev_err(&client->dev, "iio allocation failed!\n");

--- 80 unchanged lines hidden (view full) ---

261
262static struct i2c_driver mma7660_driver = {
263 .driver = {
264 .name = "mma7660",
265 .pm = pm_sleep_ptr(&mma7660_pm_ops),
266 .of_match_table = mma7660_of_match,
267 .acpi_match_table = mma7660_acpi_id,
268 },
270 .probe = mma7660_probe,
269 .probe_new = mma7660_probe,
271 .remove = mma7660_remove,
272 .id_table = mma7660_i2c_id,
273};
274
275module_i2c_driver(mma7660_driver);
276
277MODULE_AUTHOR("Constantin Musca <constantin.musca@intel.com>");
278MODULE_DESCRIPTION("Freescale MMA7660FC 3-Axis Accelerometer driver");
279MODULE_LICENSE("GPL v2");
270 .remove = mma7660_remove,
271 .id_table = mma7660_i2c_id,
272};
273
274module_i2c_driver(mma7660_driver);
275
276MODULE_AUTHOR("Constantin Musca <constantin.musca@intel.com>");
277MODULE_DESCRIPTION("Freescale MMA7660FC 3-Axis Accelerometer driver");
278MODULE_LICENSE("GPL v2");