hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/iio/adc/stm32-dfsdm.h
....@@ -243,19 +243,35 @@
243243 };
244244
245245 /**
246
- * struct stm32_dfsdm_filter - structure relative to stm32 FDSDM filter
246
+ * struct stm32_dfsdm_filter_osr - DFSDM filter settings linked to oversampling
247247 * @iosr: integrator oversampling
248248 * @fosr: filter oversampling
249
- * @ford: filter order
249
+ * @rshift: output sample right shift (hardware shift)
250
+ * @lshift: output sample left shift (software shift)
250251 * @res: output sample resolution
252
+ * @bits: output sample resolution in bits
253
+ * @max: output sample maximum positive value
254
+ */
255
+struct stm32_dfsdm_filter_osr {
256
+ unsigned int iosr;
257
+ unsigned int fosr;
258
+ unsigned int rshift;
259
+ unsigned int lshift;
260
+ u64 res;
261
+ u32 bits;
262
+ s32 max;
263
+};
264
+
265
+/**
266
+ * struct stm32_dfsdm_filter - structure relative to stm32 FDSDM filter
267
+ * @ford: filter order
268
+ * @flo: filter oversampling data table indexed by fast mode flag
251269 * @sync_mode: filter synchronized with filter 0
252270 * @fast: filter fast mode
253271 */
254272 struct stm32_dfsdm_filter {
255
- unsigned int iosr;
256
- unsigned int fosr;
257273 enum stm32_dfsdm_sinc_order ford;
258
- u64 res;
274
+ struct stm32_dfsdm_filter_osr flo[2];
259275 unsigned int sync_mode;
260276 unsigned int fast;
261277 };