Lines Matching refs:xadc
45 struct xadc { struct
74 int (*read)(struct xadc *, unsigned int, uint16_t *); argument
75 int (*write)(struct xadc *, unsigned int, uint16_t);
78 void (*update_alarm)(struct xadc *, unsigned int);
79 unsigned long (*get_dclk_rate)(struct xadc *);
85 static inline int _xadc_read_adc_reg(struct xadc *xadc, unsigned int reg, in _xadc_read_adc_reg() argument
88 lockdep_assert_held(&xadc->mutex); in _xadc_read_adc_reg()
89 return xadc->ops->read(xadc, reg, val); in _xadc_read_adc_reg()
92 static inline int _xadc_write_adc_reg(struct xadc *xadc, unsigned int reg, in _xadc_write_adc_reg() argument
95 lockdep_assert_held(&xadc->mutex); in _xadc_write_adc_reg()
96 return xadc->ops->write(xadc, reg, val); in _xadc_write_adc_reg()
99 static inline int xadc_read_adc_reg(struct xadc *xadc, unsigned int reg, in xadc_read_adc_reg() argument
104 mutex_lock(&xadc->mutex); in xadc_read_adc_reg()
105 ret = _xadc_read_adc_reg(xadc, reg, val); in xadc_read_adc_reg()
106 mutex_unlock(&xadc->mutex); in xadc_read_adc_reg()
110 static inline int xadc_write_adc_reg(struct xadc *xadc, unsigned int reg, in xadc_write_adc_reg() argument
115 mutex_lock(&xadc->mutex); in xadc_write_adc_reg()
116 ret = _xadc_write_adc_reg(xadc, reg, val); in xadc_write_adc_reg()
117 mutex_unlock(&xadc->mutex); in xadc_write_adc_reg()