Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-or-later */
0002 /*
0003  * ADXL345/346 Three-Axis Digital Accelerometers (I2C/SPI Interface)
0004  *
0005  * Enter bugs at http://blackfin.uclinux.org/
0006  *
0007  * Copyright (C) 2009 Michael Hennerich, Analog Devices Inc.
0008  */
0009 
0010 #ifndef _ADXL34X_H_
0011 #define _ADXL34X_H_
0012 
0013 struct device;
0014 struct adxl34x;
0015 
0016 struct adxl34x_bus_ops {
0017     u16 bustype;
0018     int (*read)(struct device *, unsigned char);
0019     int (*read_block)(struct device *, unsigned char, int, void *);
0020     int (*write)(struct device *, unsigned char, unsigned char);
0021 };
0022 
0023 void adxl34x_suspend(struct adxl34x *ac);
0024 void adxl34x_resume(struct adxl34x *ac);
0025 struct adxl34x *adxl34x_probe(struct device *dev, int irq,
0026                   bool fifo_delay_default,
0027                   const struct adxl34x_bus_ops *bops);
0028 void adxl34x_remove(struct adxl34x *ac);
0029 
0030 #endif