9.8
  *   	ˆl–Ü4ý( ©³( 	Å€fàB¦-ÿ¿ƒ@_†I|¥�+ÄÃ 	a    	/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (C) 2007-2009 ST-Ericsson AB
 *
 * ABX500 core access functions.
 * The abx500 interface is used for the Analog Baseband chips.
 *
 * Author: Mattias Wallin <mattias.wallin@stericsson.com>
 * Author: Mattias Nilsson <mattias.i.nilsson@stericsson.com>
 * Author: Bengt Jonsson <bengt.g.jonsson@stericsson.com>
 * Author: Rickard Andersson <rickard.andersson@stericsson.com>
 */

#include <linux/regulator/machine.h>

struct device;

#ifndef MFD_ABX500_H
#define MFD_ABX500_H

/**
 * struct abx500_init_setting
 * Initial value of the registers for driver to use during setup.
 */
struct abx500_init_settings {
	u8 bank;
	u8 reg;
	u8 setting;
};

int abx500_set_register_interruptible(struct device *dev, u8 bank, u8 reg,
	u8 value);
int abx500_get_register_interruptible(struct device *dev, u8 bank, u8 reg,
	u8 *value);
int abx500_get_register_page_interruptible(struct device *dev, u8 bank,
	u8 first_reg, u8 *regvals, u8 numregs);
int abx500_set_register_page_interruptible(struct device *dev, u8 bank,
	u8 first_reg, u8 *regvals, u8 numregs);
/**
 * abx500_mask_and_set_register_inerruptible() - Modifies selected bits of a
 *	target register
 *
 * @dev: The AB sub device.
 * @bank: The i2c bank number.
 * @bitmask: The bit mask to use.
 * @bitvalues: The new bit values.
 *
 * Updates the value of an AB register:
 * value -> ((value & ~bitmask) | (bitvalues & bitmask))
 */
int abx500_mask_and_set_register_interruptible(struct device *dev, u8 bank,
	u8 reg, u8 bitmask, u8 bitvalues);
int abx500_get_chip_id(struct device *dev);
int abx500_event_registers_startup_state_get(struct device *dev, u8 *event);
int abx500_startup_irq_enabled(struct device *dev, unsigned int irq);

struct abx500_ops {
	int (*get_chip_id) (struct device *);
	int (*get_register) (struct device *, u8, u8, u8 *);
	int (*set_register) (struct device *, u8, u8, u8);
	int (*get_register_page) (struct device *, u8, u8, u8 *, u8);
	int (*set_register_page) (struct device *, u8, u8, u8 *, u8);
	int (*mask_and_set_register) (struct device *, u8, u8, u8, u8);
	int (*event_registers_startup_state_get) (struct device *, u8 *);
	int (*startup_irq_enabled) (struct device *, unsigned int);
	void (*dump_all_banks) (struct device *);
};

int abx500_register_ops(struct device *core_dev, struct abx500_ops *ops);
void abx500_remove_ops(struct device *dev);
#endif
      ˆl–ßi~”Je¶…8 �q¦î	•1hßÁ0ÅÄ     ˆÀÁƒe¶›¿ÅÄ Ù    /* SPDX-License-Identifier: GPL-2.0 */
/*
 * Khadas System control Microcontroller Register map
 *
 * Copyright (C) 2020 BayLibre SAS
 *
 * Author(s): Neil Armstrong <narmstrong@baylibre.com>
 */

#ifndef MFD_KHADAS_MCU_H
#define MFD_KHADAS_MCU_H

#define KHADAS_MCU_PASSWD_VEN_0_REG		0x00 /* RO */
#define KHADAS_MCU_PASSWD_VEN_1_REG		0x01 /* RO */
#define KHADAS_MCU_PASSWD_VEN_2_REG		0x02 /* RO */
#define KHADAS_MCU_PASSWD_VEN_3_REG		0x03 /* RO */
#define KHADAS_MCU_PASSWD_VEN_4_REG		0x04 /* RO */
#define KHADAS_MCU_PASSWD_VEN_5_REG		0x05 /* RO */
#define KHADAS_MCU_MAC_0_REG			0x06 /* RO */
#define KHADAS_MCU_MAC_1_REG			0x07 /* RO */
#define KHADAS_MCU_MAC_2_REG			0x08 /* RO */
#define KHADAS_MCU_MAC_3_REG			0x09 /* RO */
#define KHADAS_MCU_MAC_4_REG			0x0a /* RO */
#define KHADAS_MCU_MAC_5_REG			0x0b /* RO */
#define KHADAS_MCU_USID_0_REG			0x0c /* RO */
#define KHADAS_MCU_USID_1_REG			0x0d /* RO */
#define KHADAS_MCU_USID_2_REG			0x0e /* RO */
#define KHADAS_MCU_USID_3_REG			0x0f /* RO */
#define KHADAS_MCU_USID_4_REG			0x10 /* RO */
#define KHADAS_MCU_USID_5_REG			0x11 /* RO */
#define KHADAS_MCU_VERSION_0_REG		0x12 /* RO */
#define KHADAS_MCU_VERSION_1_REG		0x13 /* RO */
#define KHADAS_MCU_DEVICE_NO_0_REG		0x14 /* RO */
#define KHADAS_MCU_DEVICE_NO_1_REG		0x15 /* RO */
#define KHADAS_MCU_FACTORY_TEST_REG		0x16 /* R */
#define KHADAS_MCU_BOOT_MODE_REG		0x20 /* RW */
#define KHADAS_MCU_BOOT_EN_WOL_REG		0x21 /* RW */
#define KHADAS_MCU_BOOT_EN_RTC_REG		0x22 /* RW */
#define KHADAS_MCU_BOOT_EN_EXP_REG		0x23 /* RW */
#define KHADAS_M