mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-16 16:54:20 +08:00
40be06463e
The I2C and SPI PM callbacks were identical (though wrapped in some bouncing out to the bus specific container of the struct device and then back again to get the drvdata). As such rather than just moving these to SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() take the opportunity to unify the struct dev_pm_ops and use the new EXPORT_SIMPLE_DEV_PM_OPS() macro so that we can drop the unused suspend and resume callbacks as well as the structure if !CONFIG_PM_SLEEP without needing to mark the callbacks __maybe_unused. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Cc: Michael Hennerich <michael.hennerich@analog.com> Link: https://lore.kernel.org/r/20230114171620.42891-9-jic23@kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
31 lines
759 B
C
31 lines
759 B
C
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
/*
|
|
* ADXL345/346 Three-Axis Digital Accelerometers (I2C/SPI Interface)
|
|
*
|
|
* Enter bugs at http://blackfin.uclinux.org/
|
|
*
|
|
* Copyright (C) 2009 Michael Hennerich, Analog Devices Inc.
|
|
*/
|
|
|
|
#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);
|
|
};
|
|
|
|
struct adxl34x *adxl34x_probe(struct device *dev, int irq,
|
|
bool fifo_delay_default,
|
|
const struct adxl34x_bus_ops *bops);
|
|
void adxl34x_remove(struct adxl34x *ac);
|
|
|
|
extern const struct dev_pm_ops adxl34x_pm;
|
|
|
|
#endif
|