brintos

brintos / linux-shallow public Read only

0
0
Text · 903 B · d3b415f Raw
39 lines · c
1/* SPDX-License-Identifier: GPL-2.0 */2/*3 * This file is part of STM32 DAC driver4 *5 * Copyright (C) 2017, STMicroelectronics - All Rights Reserved6 * Author: Fabrice Gasnier <fabrice.gasnier@st.com>.7 */8 9#ifndef __STM32_DAC_CORE_H10#define __STM32_DAC_CORE_H11 12#include <linux/regmap.h>13 14/* STM32 DAC registers */15#define STM32_DAC_CR		0x0016#define STM32_DAC_DHR12R1	0x0817#define STM32_DAC_DHR12R2	0x1418#define STM32_DAC_DOR1		0x2C19#define STM32_DAC_DOR2		0x3020 21/* STM32_DAC_CR bit fields */22#define STM32_DAC_CR_EN1		BIT(0)23#define STM32H7_DAC_CR_HFSEL		BIT(15)24#define STM32_DAC_CR_EN2		BIT(16)25 26/**27 * struct stm32_dac_common - stm32 DAC driver common data (for all instances)28 * @regmap: DAC registers shared via regmap29 * @vref_mv: reference voltage (mv)30 * @hfsel: high speed bus clock selected31 */32struct stm32_dac_common {33	struct regmap			*regmap;34	int				vref_mv;35	bool				hfsel;36};37 38#endif39