History

i2c: add support for filters optional properties

i2c-digital-filter-width-ns: This optional timing property specifies the width of the spikes on the i2c lines (in ns) that can be filtered out by built-in digital filters which are embedded in some i2c controllers. i2c-analog-filter-cutoff-frequency: This optional timing property specifies the cutoff frequency of a low-pass analog filter built-in i2c controllers. This low pass filter is used to filter out high frequency noise on the i2c lines. Specified in Hz. Include these properties in the timings structure and read them as integers.

Eugen Hristev committed 7 years ago

Commit b84dfe11 parent b6442572 files · +12 −0Browse files

Showing the changes to include/linux (1 of 2 files). Show all

Unified · Split

include/linux/i2c.h+6−0
@@ -575,6 +575,10 @@ struct i2c_lock_operations { · 574 unmodified lines
575575 * @scl_int_delay_ns: time IP core additionally needs to setup SCL in ns
576576 * @sda_fall_ns: time SDA signal takes to fall in ns; t(f) in the I2C specification
577577 * @sda_hold_ns: time IP core additionally needs to hold SDA in ns
578+ * @digital_filter_width_ns: width in ns of spikes on i2c lines that the IP core
579+ * digital filter can filter out
580+ * @analog_filter_cutoff_freq_hz: threshold frequency for the low pass IP core
581+ * analog filter
578582 */
579583 struct i2c_timings {
580584 u32 bus_freq_hz;
@@ -583,6 +587,8 @@ struct i2c_timings { · 2 unmodified lines
583587 u32 scl_int_delay_ns;
584588 u32 sda_fall_ns;
585589 u32 sda_hold_ns;
590+ u32 digital_filter_width_ns;
591+ u32 analog_filter_cutoff_freq_hz;
586592 };
587593
588594 /**

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t