mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-17 01:04:19 +08:00
e27c729219
This is a driver for the ADXL345/346 Three-Axis Digital Accelerometers. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Chris Verges <chrisv@cyberswitching.com> Signed-off-by: Luotao Fu <l.fu@pengutronix.de> Signed-off-by: Barry Song <barry.song@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
31 lines
787 B
C
31 lines
787 B
C
/*
|
|
* ADXL345/346 Three-Axis Digital Accelerometers (I2C/SPI Interface)
|
|
*
|
|
* Enter bugs at http://blackfin.uclinux.org/
|
|
*
|
|
* Copyright (C) 2009 Michael Hennerich, Analog Devices Inc.
|
|
* Licensed under the GPL-2 or later.
|
|
*/
|
|
|
|
#ifndef _ADXL34X_H_
|
|
#define _ADXL34X_H_
|
|
|
|
struct device;
|
|
struct adxl34x;
|
|
|
|
struct adxl34x_bus_ops {
|
|
u16 bustype;
|
|
int (*read)(struct device *, unsigned char);
|
|
int (*read_block)(struct device *, unsigned char, int, void *);
|
|
int (*write)(struct device *, unsigned char, unsigned char);
|
|
};
|
|
|
|
void adxl34x_disable(struct adxl34x *ac);
|
|
void adxl34x_enable(struct adxl34x *ac);
|
|
struct adxl34x *adxl34x_probe(struct device *dev, int irq,
|
|
bool fifo_delay_default,
|
|
const struct adxl34x_bus_ops *bops);
|
|
int adxl34x_remove(struct adxl34x *ac);
|
|
|
|
#endif
|