1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Header file for hmc5843 driver
6 * Copyright (C) Josef Gajdusek <atx@atx.name>
10 #define HMC5843_CORE_H
12 #include <linux/regmap.h>
13 #include <linux/iio/iio.h>
15 #define HMC5843_CONFIG_REG_A 0x00
16 #define HMC5843_CONFIG_REG_B 0x01
17 #define HMC5843_MODE_REG 0x02
18 #define HMC5843_DATA_OUT_MSB_REGS 0x03
19 #define HMC5843_STATUS_REG 0x09
20 #define HMC5843_ID_REG 0x0a
21 #define HMC5843_ID_END 0x0c
31 * struct hmc5843_data - device specific data
33 * @lock: update and read regmap data
34 * @regmap: hardware access register maps
35 * @variant: describe chip variants
36 * @scan: buffer to pack data for passing to
37 * iio_push_to_buffers_with_timestamp()
42 struct regmap
*regmap
;
43 const struct hmc5843_chip_info
*variant
;
44 struct iio_mount_matrix orientation
;
47 s64 timestamp
__aligned(8);
51 int hmc5843_common_probe(struct device
*dev
, struct regmap
*regmap
,
52 enum hmc5843_ids id
, const char *name
);
53 void hmc5843_common_remove(struct device
*dev
);
55 extern const struct dev_pm_ops hmc5843_pm_ops
;
56 #endif /* HMC5843_CORE_H */