mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-26 00:40:55 +07:00
6e93e26193
Add SPDX identifier in stm32's files in IIO directory Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com> Acked-by: Fabrice Gasnier <fabrice.gasnier@st.com> Acked-by: Philippe Ombredanne <pombredanne@nexb.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
45 lines
1.4 KiB
C
45 lines
1.4 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* This file is part of STM32 ADC driver
|
|
*
|
|
* Copyright (C) 2016, STMicroelectronics - All Rights Reserved
|
|
* Author: Fabrice Gasnier <fabrice.gasnier@st.com>.
|
|
*
|
|
*/
|
|
|
|
#ifndef __STM32_ADC_H
|
|
#define __STM32_ADC_H
|
|
|
|
/*
|
|
* STM32 - ADC global register map
|
|
* ________________________________________________________
|
|
* | Offset | Register |
|
|
* --------------------------------------------------------
|
|
* | 0x000 | Master ADC1 |
|
|
* --------------------------------------------------------
|
|
* | 0x100 | Slave ADC2 |
|
|
* --------------------------------------------------------
|
|
* | 0x200 | Slave ADC3 |
|
|
* --------------------------------------------------------
|
|
* | 0x300 | Master & Slave common regs |
|
|
* --------------------------------------------------------
|
|
*/
|
|
#define STM32_ADC_MAX_ADCS 3
|
|
#define STM32_ADCX_COMN_OFFSET 0x300
|
|
|
|
/**
|
|
* struct stm32_adc_common - stm32 ADC driver common data (for all instances)
|
|
* @base: control registers base cpu addr
|
|
* @phys_base: control registers base physical addr
|
|
* @rate: clock rate used for analog circuitry
|
|
* @vref_mv: vref voltage (mv)
|
|
*/
|
|
struct stm32_adc_common {
|
|
void __iomem *base;
|
|
phys_addr_t phys_base;
|
|
unsigned long rate;
|
|
int vref_mv;
|
|
};
|
|
|
|
#endif
|