linux/include/linux/mfd/gsc.h

/* SPDX-License-Identifier: GPL-2.0
 *
 * Copyright (C) 2020 Gateworks Corporation
 */
#ifndef __LINUX_MFD_GSC_H_
#define __LINUX_MFD_GSC_H_

#include <linux/regmap.h>

/* Device Addresses */
#define GSC_MISC
#define GSC_UPDATE
#define GSC_GPIO
#define GSC_HWMON
#define GSC_EEPROM0
#define GSC_EEPROM1
#define GSC_EEPROM2
#define GSC_EEPROM3
#define GSC_RTC

/* Register offsets */
enum {};

/* Bit definitions */
#define GSC_CTRL_0_PB_HARD_RESET
#define GSC_CTRL_0_PB_CLEAR_SECURE_KEY
#define GSC_CTRL_0_PB_SOFT_POWER_DOWN
#define GSC_CTRL_0_PB_BOOT_ALTERNATE
#define GSC_CTRL_0_PERFORM_CRC
#define GSC_CTRL_0_TAMPER_DETECT
#define GSC_CTRL_0_SWITCH_HOLD

#define GSC_CTRL_1_SLEEP_ENABLE
#define GSC_CTRL_1_SLEEP_ACTIVATE
#define GSC_CTRL_1_SLEEP_ADD
#define GSC_CTRL_1_SLEEP_NOWAKEPB
#define GSC_CTRL_1_WDT_TIME
#define GSC_CTRL_1_WDT_ENABLE
#define GSC_CTRL_1_SWITCH_BOOT_ENABLE
#define GSC_CTRL_1_SWITCH_BOOT_CLEAR

#define GSC_IRQ_PB
#define GSC_IRQ_KEY_ERASED
#define GSC_IRQ_EEPROM_WP
#define GSC_IRQ_RESV
#define GSC_IRQ_GPIO
#define GSC_IRQ_TAMPER
#define GSC_IRQ_WDT_TIMEOUT
#define GSC_IRQ_SWITCH_HOLD

int gsc_read(void *context, unsigned int reg, unsigned int *val);
int gsc_write(void *context, unsigned int reg, unsigned int val);

struct gsc_dev {};

#endif /* __LINUX_MFD_GSC_H_ */