/* SPDX-License-Identifier: GPL-2.0 */ /* * Lochnagar internals * * Copyright (c) 2013-2018 Cirrus Logic, Inc. and * Cirrus Logic International Semiconductor Ltd. * * Author: Charles Keepax <[email protected]> */ #include <linux/device.h> #include <linux/mutex.h> #include <linux/regmap.h> #ifndef CIRRUS_LOCHNAGAR_H #define CIRRUS_LOCHNAGAR_H enum lochnagar_type { … }; /** * struct lochnagar - Core data for the Lochnagar audio board driver. * * @type: The type of Lochnagar device connected. * @dev: A pointer to the struct device for the main MFD. * @regmap: The devices main register map. * @analogue_config_lock: Lock used to protect updates in the analogue * configuration as these must not be changed whilst the hardware is processing * the last update. */ struct lochnagar { … }; /* Register Addresses */ #define LOCHNAGAR_SOFTWARE_RESET … #define LOCHNAGAR_FIRMWARE_ID1 … #define LOCHNAGAR_FIRMWARE_ID2 … /* (0x0000) Software Reset */ #define LOCHNAGAR_DEVICE_ID_MASK … #define LOCHNAGAR_DEVICE_ID_SHIFT … #define LOCHNAGAR_REV_ID_MASK … #define LOCHNAGAR_REV_ID_SHIFT … int lochnagar_update_config(struct lochnagar *lochnagar); #endif