da311.c (14e77332e74603efab8347c89d3cda447c3b97c9) da311.c (a9e38f1ecc461c43aa26849394c552e38593ad38)
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * IIO driver for the MiraMEMS DA311 3-axis accelerometer
4 *
5 * Copyright (c) 2016 Hans de Goede <hdegoede@redhat.com>
6 * Copyright (c) 2011-2013 MiraMEMS Sensing Technology Co., Ltd.
7 */
8

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

212 .read_raw = da311_read_raw,
213};
214
215static void da311_disable(void *client)
216{
217 da311_enable(client, false);
218}
219
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * IIO driver for the MiraMEMS DA311 3-axis accelerometer
4 *
5 * Copyright (c) 2016 Hans de Goede <hdegoede@redhat.com>
6 * Copyright (c) 2011-2013 MiraMEMS Sensing Technology Co., Ltd.
7 */
8

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

212 .read_raw = da311_read_raw,
213};
214
215static void da311_disable(void *client)
216{
217 da311_enable(client, false);
218}
219
220static int da311_probe(struct i2c_client *client,
221 const struct i2c_device_id *id)
220static int da311_probe(struct i2c_client *client)
222{
223 int ret;
224 struct iio_dev *indio_dev;
225 struct da311_data *data;
226
227 ret = i2c_smbus_read_byte_data(client, DA311_REG_CHIP_ID);
228 if (ret != DA311_CHIP_ID)
229 return (ret < 0) ? ret : -ENODEV;

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

274};
275MODULE_DEVICE_TABLE(i2c, da311_i2c_id);
276
277static struct i2c_driver da311_driver = {
278 .driver = {
279 .name = "da311",
280 .pm = pm_sleep_ptr(&da311_pm_ops),
281 },
221{
222 int ret;
223 struct iio_dev *indio_dev;
224 struct da311_data *data;
225
226 ret = i2c_smbus_read_byte_data(client, DA311_REG_CHIP_ID);
227 if (ret != DA311_CHIP_ID)
228 return (ret < 0) ? ret : -ENODEV;

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

273};
274MODULE_DEVICE_TABLE(i2c, da311_i2c_id);
275
276static struct i2c_driver da311_driver = {
277 .driver = {
278 .name = "da311",
279 .pm = pm_sleep_ptr(&da311_pm_ops),
280 },
282 .probe = da311_probe,
281 .probe_new = da311_probe,
283 .id_table = da311_i2c_id,
284};
285
286module_i2c_driver(da311_driver);
287
288MODULE_AUTHOR("Hans de Goede <hdegoede@redhat.com>");
289MODULE_DESCRIPTION("MiraMEMS DA311 3-Axis Accelerometer driver");
290MODULE_LICENSE("GPL v2");
282 .id_table = da311_i2c_id,
283};
284
285module_i2c_driver(da311_driver);
286
287MODULE_AUTHOR("Hans de Goede <hdegoede@redhat.com>");
288MODULE_DESCRIPTION("MiraMEMS DA311 3-Axis Accelerometer driver");
289MODULE_LICENSE("GPL v2");