| 1 |
/* SPDX-License-Identifier: GPL-2.0+ */ |
| 2 |
/* |
| 3 |
* ADT7316 digital temperature sensor driver supporting ADT7316/7/8 ADT7516/7/9 |
| 4 |
* |
| 5 |
* Copyright 2010 Analog Devices Inc. |
| 6 |
*/ |
| 7 |
|
| 8 |
#ifndef _ADT7316_H_ |
| 9 |
#define _ADT7316_H_ |
| 10 |
|
| 11 |
#include <linux/types.h> |
| 12 |
#include <linux/pm.h> |
| 13 |
|
| 14 |
#define ADT7316_REG_MAX_ADDR 0x3F |
| 15 |
|
| 16 |
struct adt7316_bus { |
| 17 |
void *client; |
| 18 |
int irq; |
| 19 |
int (*read)(void *client, u8 reg, u8 *data); |
| 20 |
int (*write)(void *client, u8 reg, u8 val); |
| 21 |
int (*multi_read)(void *client, u8 first_reg, u8 count, u8 *data); |
| 22 |
int (*multi_write)(void *client, u8 first_reg, u8 count, u8 *data); |
| 23 |
}; |
| 24 |
|
| 25 |
extern const struct dev_pm_ops adt7316_pm_ops; |
| 26 |
|
| 27 |
int adt7316_probe(struct device *dev, struct adt7316_bus *bus, |
| 28 |
const char *name); |
| 29 |
|
| 30 |
#endif |