Home
last modified time | relevance | path

Searched refs:xadc (Results 1 – 5 of 5) sorted by relevance

/drivers/iio/adc/
Dxilinx-xadc-core.c123 static void xadc_write_reg(struct xadc *xadc, unsigned int reg, in xadc_write_reg() argument
126 writel(val, xadc->base + reg); in xadc_write_reg()
129 static void xadc_read_reg(struct xadc *xadc, unsigned int reg, in xadc_read_reg() argument
132 *val = readl(xadc->base + reg); in xadc_read_reg()
145 static void xadc_zynq_write_fifo(struct xadc *xadc, uint32_t *cmd, in xadc_zynq_write_fifo() argument
151 xadc_write_reg(xadc, XADC_ZYNQ_REG_CFIFO, cmd[i]); in xadc_zynq_write_fifo()
154 static void xadc_zynq_drain_fifo(struct xadc *xadc) in xadc_zynq_drain_fifo() argument
158 xadc_read_reg(xadc, XADC_ZYNQ_REG_STATUS, &status); in xadc_zynq_drain_fifo()
161 xadc_read_reg(xadc, XADC_ZYNQ_REG_DFIFO, &tmp); in xadc_zynq_drain_fifo()
162 xadc_read_reg(xadc, XADC_ZYNQ_REG_STATUS, &status); in xadc_zynq_drain_fifo()
[all …]
Dxilinx-xadc-events.c117 struct xadc *xadc = iio_priv(indio_dev); in xadc_read_event_config() local
119 return (bool)(xadc->alarm_mask & xadc_get_alarm_mask(chan)); in xadc_read_event_config()
127 struct xadc *xadc = iio_priv(indio_dev); in xadc_write_event_config() local
131 mutex_lock(&xadc->mutex); in xadc_write_event_config()
134 xadc->alarm_mask |= alarm; in xadc_write_event_config()
136 xadc->alarm_mask &= ~alarm; in xadc_write_event_config()
138 xadc->ops->update_alarm(xadc, xadc->alarm_mask); in xadc_write_event_config()
140 ret = _xadc_read_adc_reg(xadc, XADC_REG_CONF1, &cfg); in xadc_write_event_config()
146 cfg &= ~((xadc->alarm_mask & 0xf0) << 4); /* bram, pint, paux, ddr */ in xadc_write_event_config()
147 cfg &= ~((xadc->alarm_mask & 0x08) >> 3); /* ot */ in xadc_write_event_config()
[all …]
Dxilinx-xadc.h44 struct xadc { struct
78 int (*read)(struct xadc *xadc, unsigned int reg, uint16_t *val); argument
79 int (*write)(struct xadc *xadc, unsigned int reg, uint16_t val);
82 void (*update_alarm)(struct xadc *xadc, unsigned int alarm);
83 unsigned long (*get_dclk_rate)(struct xadc *xadc);
92 static inline int _xadc_read_adc_reg(struct xadc *xadc, unsigned int reg, in _xadc_read_adc_reg() argument
95 lockdep_assert_held(&xadc->mutex); in _xadc_read_adc_reg()
96 return xadc->ops->read(xadc, reg, val); in _xadc_read_adc_reg()
99 static inline int _xadc_write_adc_reg(struct xadc *xadc, unsigned int reg, in _xadc_write_adc_reg() argument
102 lockdep_assert_held(&xadc->mutex); in _xadc_write_adc_reg()
[all …]
DMakefile119 xilinx-xadc-y := xilinx-xadc-core.o xilinx-xadc-events.o
120 obj-$(CONFIG_XILINX_XADC) += xilinx-xadc.o
DKconfig1324 xilinx-xadc.