xref: /linux/drivers/hwmon/sch56xx-common.h (revision 3a39d672e7f48b8d6b91a09afa4b55352773b4b5)
11a59d1b8SThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-or-later */
228ff2f7aSHans de Goede /***************************************************************************
3312869ecSHans de Goede  *   Copyright (C) 2010-2012 Hans de Goede <hdegoede@redhat.com>           *
428ff2f7aSHans de Goede  *                                                                         *
528ff2f7aSHans de Goede  ***************************************************************************/
628ff2f7aSHans de Goede 
7312869ecSHans de Goede #include <linux/mutex.h>
8a54fe616SArmin Wolf #include <linux/regmap.h>
9312869ecSHans de Goede 
10312869ecSHans de Goede struct sch56xx_watchdog_data;
11312869ecSHans de Goede 
12a54fe616SArmin Wolf struct regmap *devm_regmap_init_sch56xx(struct device *dev, struct mutex *lock, u16 addr,
13a54fe616SArmin Wolf 					const struct regmap_config *config);
14*10655bb6SArmin Wolf int sch56xx_regmap_read16(struct regmap *map, unsigned int reg, unsigned int *val);
15*10655bb6SArmin Wolf int sch56xx_regmap_write16(struct regmap *map, unsigned int reg, unsigned int val);
16*10655bb6SArmin Wolf 
1728ff2f7aSHans de Goede int sch56xx_read_virtual_reg(u16 addr, u16 reg);
1828ff2f7aSHans de Goede int sch56xx_write_virtual_reg(u16 addr, u16 reg, u8 val);
1928ff2f7aSHans de Goede int sch56xx_read_virtual_reg16(u16 addr, u16 reg);
2028ff2f7aSHans de Goede int sch56xx_read_virtual_reg12(u16 addr, u16 msb_reg, u16 lsn_reg,
2128ff2f7aSHans de Goede 			       int high_nibble);
22312869ecSHans de Goede 
232be5f0d7SArmin Wolf void sch56xx_watchdog_register(struct device *parent, u16 addr, u32 revision,
242be5f0d7SArmin Wolf 			       struct mutex *io_lock, int check_enabled);
25