| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * tmp007.c - Support for TI TMP007 IR thermopile sensor with integrated math engine |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (c) 2017 Manivannan Sadhasivam <manivannanece23@gmail.com> |
|---|
| 5 | | - * |
|---|
| 6 | | - * This file is subject to the terms and conditions of version 2 of |
|---|
| 7 | | - * the GNU General Public License. See the file COPYING in the main |
|---|
| 8 | | - * directory of this archive for more details. |
|---|
| 9 | 6 | * |
|---|
| 10 | 7 | * Driver for the Texas Instruments I2C 16-bit IR thermopile sensor |
|---|
| 11 | 8 | * |
|---|
| .. | .. |
|---|
| 15 | 12 | * 1. This driver assumes that the sensor has been calibrated beforehand |
|---|
| 16 | 13 | * 2. Limit threshold events are enabled at the start |
|---|
| 17 | 14 | * 3. Operating mode: INT |
|---|
| 18 | | - * |
|---|
| 19 | 15 | */ |
|---|
| 20 | 16 | |
|---|
| 21 | 17 | #include <linux/err.h> |
|---|
| .. | .. |
|---|
| 24 | 20 | #include <linux/module.h> |
|---|
| 25 | 21 | #include <linux/pm.h> |
|---|
| 26 | 22 | #include <linux/bitops.h> |
|---|
| 27 | | -#include <linux/of.h> |
|---|
| 23 | +#include <linux/mod_devicetable.h> |
|---|
| 28 | 24 | #include <linux/irq.h> |
|---|
| 29 | 25 | #include <linux/interrupt.h> |
|---|
| 30 | 26 | |
|---|
| .. | .. |
|---|
| 467 | 463 | data->client = client; |
|---|
| 468 | 464 | mutex_init(&data->lock); |
|---|
| 469 | 465 | |
|---|
| 470 | | - indio_dev->dev.parent = &client->dev; |
|---|
| 471 | 466 | indio_dev->name = "tmp007"; |
|---|
| 472 | 467 | indio_dev->modes = INDIO_DIRECT_MODE; |
|---|
| 473 | 468 | indio_dev->info = &tmp007_info; |
|---|
| .. | .. |
|---|
| 583 | 578 | static struct i2c_driver tmp007_driver = { |
|---|
| 584 | 579 | .driver = { |
|---|
| 585 | 580 | .name = "tmp007", |
|---|
| 586 | | - .of_match_table = of_match_ptr(tmp007_of_match), |
|---|
| 581 | + .of_match_table = tmp007_of_match, |
|---|
| 587 | 582 | .pm = &tmp007_pm_ops, |
|---|
| 588 | 583 | }, |
|---|
| 589 | 584 | .probe = tmp007_probe, |
|---|