Lines Matching refs:cal
29 #define CAL_MODULE_NAME "cal"
90 * the CAMERARX instances. Instances of struct cal_dev are named cal through the
107 struct cal_dev *cal;
147 struct cal_dev *cal;
184 #define cal_dbg(level, cal, fmt, arg...) \
187 dev_printk(KERN_DEBUG, (cal)->dev, fmt, ##arg); \
189 #define cal_info(cal, fmt, arg...) \
190 dev_info((cal)->dev, fmt, ##arg)
191 #define cal_err(cal, fmt, arg...) \
192 dev_err((cal)->dev, fmt, ##arg)
195 cal_dbg(level, (ctx)->cal, "ctx%u: " fmt, (ctx)->index, ##arg)
197 cal_info((ctx)->cal, "ctx%u: " fmt, (ctx)->index, ##arg)
199 cal_err((ctx)->cal, "ctx%u: " fmt, (ctx)->index, ##arg)
202 cal_dbg(level, (phy)->cal, "phy%u: " fmt, (phy)->instance, ##arg)
204 cal_info((phy)->cal, "phy%u: " fmt, (phy)->instance, ##arg)
206 cal_err((phy)->cal, "phy%u: " fmt, (phy)->instance, ##arg)
208 static inline u32 cal_read(struct cal_dev *cal, u32 offset)
210 return ioread32(cal->base + offset);
213 static inline void cal_write(struct cal_dev *cal, u32 offset, u32 val)
215 iowrite32(val, cal->base + offset);
218 static __always_inline u32 cal_read_field(struct cal_dev *cal, u32 offset, u32 mask)
220 return FIELD_GET(mask, cal_read(cal, offset));
223 static inline void cal_write_field(struct cal_dev *cal, u32 offset, u32 value,
226 u32 val = cal_read(cal, offset);
230 cal_write(cal, offset, val);
242 void cal_quickdump_regs(struct cal_dev *cal);
252 struct cal_camerarx *cal_camerarx_create(struct cal_dev *cal,