Lines Matching refs:xadc
45 struct xadc { struct
75 int (*read)(struct xadc *, unsigned int, uint16_t *); argument
76 int (*write)(struct xadc *, unsigned int, uint16_t);
79 void (*update_alarm)(struct xadc *, unsigned int);
80 unsigned long (*get_dclk_rate)(struct xadc *);
87 static inline int _xadc_read_adc_reg(struct xadc *xadc, unsigned int reg, in _xadc_read_adc_reg() argument
90 lockdep_assert_held(&xadc->mutex); in _xadc_read_adc_reg()
91 return xadc->ops->read(xadc, reg, val); in _xadc_read_adc_reg()
94 static inline int _xadc_write_adc_reg(struct xadc *xadc, unsigned int reg, in _xadc_write_adc_reg() argument
97 lockdep_assert_held(&xadc->mutex); in _xadc_write_adc_reg()
98 return xadc->ops->write(xadc, reg, val); in _xadc_write_adc_reg()
101 static inline int xadc_read_adc_reg(struct xadc *xadc, unsigned int reg, in xadc_read_adc_reg() argument
106 mutex_lock(&xadc->mutex); in xadc_read_adc_reg()
107 ret = _xadc_read_adc_reg(xadc, reg, val); in xadc_read_adc_reg()
108 mutex_unlock(&xadc->mutex); in xadc_read_adc_reg()
112 static inline int xadc_write_adc_reg(struct xadc *xadc, unsigned int reg, in xadc_write_adc_reg() argument
117 mutex_lock(&xadc->mutex); in xadc_write_adc_reg()
118 ret = _xadc_write_adc_reg(xadc, reg, val); in xadc_write_adc_reg()
119 mutex_unlock(&xadc->mutex); in xadc_write_adc_reg()