From dda967139955461583377820fef340949effc195 Mon Sep 17 00:00:00 2001 From: Eugen Hristev Date: Wed, 11 Sep 2019 08:24:34 +0000 Subject: i2c: at91: add support for analog filtering Add support for analog filtering for i2c lines. The sama5d2 and sam9x60 support this feature. Signed-off-by: Eugen Hristev Acked-by: Ludovic Desroches Reviewed-by: Peter Rosin Signed-off-by: Wolfram Sang --- drivers/i2c/busses/i2c-at91.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/i2c/busses/i2c-at91.h') diff --git a/drivers/i2c/busses/i2c-at91.h b/drivers/i2c/busses/i2c-at91.h index d7cf01e32282..977a67bc0f88 100644 --- a/drivers/i2c/busses/i2c-at91.h +++ b/drivers/i2c/busses/i2c-at91.h @@ -86,6 +86,7 @@ #define AT91_TWI_FILTR 0x0044 #define AT91_TWI_FILTR_FILT BIT(0) +#define AT91_TWI_FILTR_PADFEN BIT(1) #define AT91_TWI_FILTR_THRES(v) ((v) << 8) #define AT91_TWI_FILTR_THRES_MAX 7 #define AT91_TWI_FILTR_THRES_MASK GENMASK(10, 8) @@ -116,6 +117,7 @@ struct at91_twi_pdata { bool has_hold_field; bool has_dig_filtr; bool has_adv_dig_filtr; + bool has_ana_filtr; struct at_dma_slave dma_slave; }; @@ -154,6 +156,7 @@ struct at91_twi_dev { struct i2c_client *slave; #endif bool enable_dig_filt; + bool enable_ana_filt; u32 filter_width; }; -- cgit v1.2.3