rfd77402.c (14e77332e74603efab8347c89d3cda447c3b97c9) | rfd77402.c (576eb2b091084425eea6edd36d4407d139387d6d) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * rfd77402.c - Support for RF Digital RFD77402 Time-of-Flight (distance) sensor 4 * 5 * Copyright 2017 Peter Meerwald-Stadler <pmeerw@pmeerw.net> 6 * 7 * 7-bit I2C slave address 0x4c 8 * --- 243 unchanged lines hidden (view full) --- 252 RFD77402_STATUS_STANDBY); 253} 254 255static void rfd77402_disable(void *client) 256{ 257 rfd77402_powerdown(client); 258} 259 | 1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * rfd77402.c - Support for RF Digital RFD77402 Time-of-Flight (distance) sensor 4 * 5 * Copyright 2017 Peter Meerwald-Stadler <pmeerw@pmeerw.net> 6 * 7 * 7-bit I2C slave address 0x4c 8 * --- 243 unchanged lines hidden (view full) --- 252 RFD77402_STATUS_STANDBY); 253} 254 255static void rfd77402_disable(void *client) 256{ 257 rfd77402_powerdown(client); 258} 259 |
260static int rfd77402_probe(struct i2c_client *client, 261 const struct i2c_device_id *id) | 260static int rfd77402_probe(struct i2c_client *client) |
262{ 263 struct rfd77402_data *data; 264 struct iio_dev *indio_dev; 265 int ret; 266 267 ret = i2c_smbus_read_word_data(client, RFD77402_MOD_CHIP_ID); 268 if (ret < 0) 269 return ret; --- 44 unchanged lines hidden (view full) --- 314}; 315MODULE_DEVICE_TABLE(i2c, rfd77402_id); 316 317static struct i2c_driver rfd77402_driver = { 318 .driver = { 319 .name = RFD77402_DRV_NAME, 320 .pm = pm_sleep_ptr(&rfd77402_pm_ops), 321 }, | 261{ 262 struct rfd77402_data *data; 263 struct iio_dev *indio_dev; 264 int ret; 265 266 ret = i2c_smbus_read_word_data(client, RFD77402_MOD_CHIP_ID); 267 if (ret < 0) 268 return ret; --- 44 unchanged lines hidden (view full) --- 313}; 314MODULE_DEVICE_TABLE(i2c, rfd77402_id); 315 316static struct i2c_driver rfd77402_driver = { 317 .driver = { 318 .name = RFD77402_DRV_NAME, 319 .pm = pm_sleep_ptr(&rfd77402_pm_ops), 320 }, |
322 .probe = rfd77402_probe, | 321 .probe_new = rfd77402_probe, |
323 .id_table = rfd77402_id, 324}; 325 326module_i2c_driver(rfd77402_driver); 327 328MODULE_AUTHOR("Peter Meerwald-Stadler <pmeerw@pmeerw.net>"); 329MODULE_DESCRIPTION("RFD77402 Time-of-Flight sensor driver"); 330MODULE_LICENSE("GPL"); | 322 .id_table = rfd77402_id, 323}; 324 325module_i2c_driver(rfd77402_driver); 326 327MODULE_AUTHOR("Peter Meerwald-Stadler <pmeerw@pmeerw.net>"); 328MODULE_DESCRIPTION("RFD77402 Time-of-Flight sensor driver"); 329MODULE_LICENSE("GPL"); |