hp206c.c (4b4193256c8d3bc3a5397b5cd9494c2ad386317d) | hp206c.c (240c69e09d3f77673653f56867aba2c69a66264d) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * hp206c.c - HOPERF HP206C precision barometer and altimeter sensor 4 * 5 * Copyright (c) 2016, Intel Corporation. 6 * 7 * (7-bit I2C slave address 0x76) 8 * --- 338 unchanged lines hidden (view full) --- 347}; 348 349static const struct iio_info hp206c_info = { 350 .attrs = &hp206c_attribute_group, 351 .read_raw = hp206c_read_raw, 352 .write_raw = hp206c_write_raw, 353}; 354 | 1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * hp206c.c - HOPERF HP206C precision barometer and altimeter sensor 4 * 5 * Copyright (c) 2016, Intel Corporation. 6 * 7 * (7-bit I2C slave address 0x76) 8 * --- 338 unchanged lines hidden (view full) --- 347}; 348 349static const struct iio_info hp206c_info = { 350 .attrs = &hp206c_attribute_group, 351 .read_raw = hp206c_read_raw, 352 .write_raw = hp206c_write_raw, 353}; 354 |
355static int hp206c_probe(struct i2c_client *client, 356 const struct i2c_device_id *id) | 355static int hp206c_probe(struct i2c_client *client) |
357{ | 356{ |
357 const struct i2c_device_id *id = i2c_client_get_device_id(client); |
|
358 struct iio_dev *indio_dev; 359 struct hp206c_data *data; 360 int ret; 361 362 if (!i2c_check_functionality(client->adapter, 363 I2C_FUNC_SMBUS_BYTE | 364 I2C_FUNC_SMBUS_BYTE_DATA | 365 I2C_FUNC_SMBUS_READ_I2C_BLOCK)) { --- 38 unchanged lines hidden (view full) --- 404static const struct acpi_device_id hp206c_acpi_match[] = { 405 {"HOP206C", 0}, 406 { }, 407}; 408MODULE_DEVICE_TABLE(acpi, hp206c_acpi_match); 409#endif 410 411static struct i2c_driver hp206c_driver = { | 358 struct iio_dev *indio_dev; 359 struct hp206c_data *data; 360 int ret; 361 362 if (!i2c_check_functionality(client->adapter, 363 I2C_FUNC_SMBUS_BYTE | 364 I2C_FUNC_SMBUS_BYTE_DATA | 365 I2C_FUNC_SMBUS_READ_I2C_BLOCK)) { --- 38 unchanged lines hidden (view full) --- 404static const struct acpi_device_id hp206c_acpi_match[] = { 405 {"HOP206C", 0}, 406 { }, 407}; 408MODULE_DEVICE_TABLE(acpi, hp206c_acpi_match); 409#endif 410 411static struct i2c_driver hp206c_driver = { |
412 .probe = hp206c_probe, | 412 .probe_new = hp206c_probe, |
413 .id_table = hp206c_id, 414 .driver = { 415 .name = "hp206c", 416 .acpi_match_table = ACPI_PTR(hp206c_acpi_match), 417 }, 418}; 419 420module_i2c_driver(hp206c_driver); 421 422MODULE_DESCRIPTION("HOPERF HP206C precision barometer and altimeter sensor"); 423MODULE_AUTHOR("Leonard Crestez <leonard.crestez@intel.com>"); 424MODULE_LICENSE("GPL v2"); | 413 .id_table = hp206c_id, 414 .driver = { 415 .name = "hp206c", 416 .acpi_match_table = ACPI_PTR(hp206c_acpi_match), 417 }, 418}; 419 420module_i2c_driver(hp206c_driver); 421 422MODULE_DESCRIPTION("HOPERF HP206C precision barometer and altimeter sensor"); 423MODULE_AUTHOR("Leonard Crestez <leonard.crestez@intel.com>"); 424MODULE_LICENSE("GPL v2"); |