adxl34x.h 773 B

123456789101112131415161718192021222324252627282930
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. * ADXL345/346 Three-Axis Digital Accelerometers (I2C/SPI Interface)
  4. *
  5. * Enter bugs at http://blackfin.uclinux.org/
  6. *
  7. * Copyright (C) 2009 Michael Hennerich, Analog Devices Inc.
  8. */
  9. #ifndef _ADXL34X_H_
  10. #define _ADXL34X_H_
  11. struct device;
  12. struct adxl34x;
  13. struct adxl34x_bus_ops {
  14. u16 bustype;
  15. int (*read)(struct device *, unsigned char);
  16. int (*read_block)(struct device *, unsigned char, int, void *);
  17. int (*write)(struct device *, unsigned char, unsigned char);
  18. };
  19. struct adxl34x *adxl34x_probe(struct device *dev, int irq,
  20. bool fifo_delay_default,
  21. const struct adxl34x_bus_ops *bops);
  22. extern const struct dev_pm_ops adxl34x_pm;
  23. extern const struct attribute_group *adxl34x_groups[];
  24. #endif