From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 84F42ECDE20 for ; Wed, 11 Sep 2019 08:25:04 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5877F2168B for ; Wed, 11 Sep 2019 08:25:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="N7dCUX4h"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=microchiptechnology.onmicrosoft.com header.i=@microchiptechnology.onmicrosoft.com header.b="etA1hZJK" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5877F2168B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=microchip.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:In-Reply-To:References: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=wsLF01RuMmCuFQwoBULHmrl05wKSUvTUfRbO+p/3NwM=; b=N7dCUX4hA8qB7j 2P87/YY1QsYzmIO2nNLCCIHzURW67hUSKBN2wzuLdN3XfxRx7B4MtJQOsAsYw2/isEQVxtjBTK6jW 8Mmiu4FQz8D9o43kdyu8653H0FJxN5sV4HjA0QliSXmGmZEVzBU57BNts3tc0vNLz4KLwOQjOKmnG mCJ9B3UQQLwlib6bpUCSHct3yFVHlWToKTEo4/mFkKejjb9w9+ZFOQR8Ul3EdY0rE2/spDiJu94Ib SvLPir3Z5bhEm1N5RINiGhF/hLaLPnWwKTXoc5keq92RfYZK5wqS5AQQ72WwxMcHED5D3uiNW2tUr CZ7OkQzJJ6JprJrtwDYw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i7xvx-0004Td-8F; Wed, 11 Sep 2019 08:25:01 +0000 Received: from esa4.microchip.iphmx.com ([68.232.154.123]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i7xvN-0003v4-HG for linux-arm-kernel@lists.infradead.org; Wed, 11 Sep 2019 08:24:26 +0000 Received-SPF: Pass (esa4.microchip.iphmx.com: domain of Eugen.Hristev@microchip.com designates 198.175.253.82 as permitted sender) identity=mailfrom; client-ip=198.175.253.82; receiver=esa4.microchip.iphmx.com; envelope-from="Eugen.Hristev@microchip.com"; x-sender="Eugen.Hristev@microchip.com"; x-conformance=spf_only; x-record-type="v=spf1"; x-record-text="v=spf1 mx a:ushub1.microchip.com a:smtpout.microchip.com a:mx1.microchip.iphmx.com a:mx2.microchip.iphmx.com include:servers.mcsv.net include:mktomail.com include:spf.protection.outlook.com ~all" Received-SPF: None (esa4.microchip.iphmx.com: no sender authenticity information available from domain of postmaster@email.microchip.com) identity=helo; client-ip=198.175.253.82; receiver=esa4.microchip.iphmx.com; envelope-from="Eugen.Hristev@microchip.com"; x-sender="postmaster@email.microchip.com"; x-conformance=spf_only Authentication-Results: esa4.microchip.iphmx.com; spf=Pass smtp.mailfrom=Eugen.Hristev@microchip.com; spf=None smtp.helo=postmaster@email.microchip.com; dkim=pass (signature verified) header.i=@microchiptechnology.onmicrosoft.com; dmarc=pass (p=none dis=none) d=microchip.com IronPort-SDR: CHlb1AQHipyEuxe2l4HIO474e9QMwS3V2kDuNJXNJb1JVTw9PdyHmisPkd9W5Gx6Hp9H/etDte jMhVPodYuefxUIC1JMAC6v1usT7eFDHyrvIg8cMtzp9GvzqS4pYoPaSfvKwduB6ffeIAcerkEE A1cmNEjDD3mtg+X2oZYA9UmhPHSP7ITwxTT6cVh9RtzJC/UncDeJiU3nBygcgeBz4QmJi50fwX laPtKtK/wD2EWHsIIOGDXYJ1NBaVw+4rABfX7WyNUovTi1jg+QuHcN7pICnkDVRtK81BkjIGQp +XQ= X-IronPort-AV: E=Sophos;i="5.64,492,1559545200"; d="scan'208";a="47514808" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa4.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 11 Sep 2019 01:24:24 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 11 Sep 2019 01:24:23 -0700 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (10.10.215.89) by email.microchip.com (10.10.87.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Wed, 11 Sep 2019 01:24:24 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QIV51iuekqUXaaBzYcuo/Testtu7jR0p1JZq0RArGnLQeP1RZUjjrsrNHmf58g1NALLJ4WW037F183icL0BvxD6OZz4OOi4yKDbosEbPMaaYRcyocJq8mJO/2fmHr6MmLTOoIwshmEtCexJu257Xf7TrGZOetcivi78BGJFprkbwaYQqUJb30kfKI3/1fZckU+dJUsprOf6noV9UEGSihFMS/XgwZiYLhk22WH2s/WBTD1P90VVscspAIHoD8gGym3H69LK9K2Jh0qDwHFSRzVo1LqGwUMk7f5RFcsFEBQlQr1Lh+ovt4WxfTV7D8aqY3YuAI1oj4Y3YAzmE4BMUEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9klXs1ltqK+KHZSYDYhMQ3xgbH0lFyld1DpTD+ECdaw=; b=dsBTfczaQCw4LFJB3AcOI67gdar3Xj1d3M5hHODqJ0y/R3o1TKhABIlxggJHRHLAzQHWpG6TKfJoXZYtdL/Iy6ik5oUwT/EFiYqAWMa9l354/AAhQ+jcVHTQToBQdyh/E7YH8O4GJdthhUefPfaSmiab8OqBu43IyvNYaAGkpXy0zwYs26ywYsS6C0MNCY1C2RKCN9OEfbsKF8S1gRggm1ZJTeIUaf1cEjuqOUBCJMiCEtXEmajIq/c/+MI5AE+v8PxjRI96M7EgdcJUF4wwD5jlTKdewB510kDnLJvJTsFlKVGc791ErRpCpp6+8nD0SrZHK3G/3JAg05BZr/k+ew== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microchip.com; dmarc=pass action=none header.from=microchip.com; dkim=pass header.d=microchip.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microchiptechnology.onmicrosoft.com; s=selector2-microchiptechnology-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9klXs1ltqK+KHZSYDYhMQ3xgbH0lFyld1DpTD+ECdaw=; b=etA1hZJKEQtXe25pgpr6gfo+FJ0sibtpYMjKxeZ4P1iKonbNv0ONW5capY28G1b9N5qi6sTv/LUWgQtXr0hqxdcyZueWMzhGfYcOEYd1gVJUWBGBrhffFHxhaFRLqah4yc8BbceVFCOPqEcTHSal1sGN5uYoHLAugSVKtjeyR2A= Received: from DM5PR11MB1242.namprd11.prod.outlook.com (10.168.108.8) by DM5PR11MB1452.namprd11.prod.outlook.com (10.172.36.135) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2241.18; Wed, 11 Sep 2019 08:24:23 +0000 Received: from DM5PR11MB1242.namprd11.prod.outlook.com ([fe80::a141:1974:9668:fbe2]) by DM5PR11MB1242.namprd11.prod.outlook.com ([fe80::a141:1974:9668:fbe2%12]) with mapi id 15.20.2241.018; Wed, 11 Sep 2019 08:24:23 +0000 From: To: , , , , , , , , , Subject: [PATCH v5 3/9] i2c: add support for filters optional properties Thread-Topic: [PATCH v5 3/9] i2c: add support for filters optional properties Thread-Index: AQHVaHpQ2X5g0ID8eka9rBrVOgWzqQ== Date: Wed, 11 Sep 2019 08:24:22 +0000 Message-ID: <1568189911-31641-4-git-send-email-eugen.hristev@microchip.com> References: <1568189911-31641-1-git-send-email-eugen.hristev@microchip.com> In-Reply-To: <1568189911-31641-1-git-send-email-eugen.hristev@microchip.com> Accept-Language: en-US, ro-RO Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: VI1P189CA0008.EURP189.PROD.OUTLOOK.COM (2603:10a6:802:2a::21) To DM5PR11MB1242.namprd11.prod.outlook.com (2603:10b6:3:14::8) x-mailer: git-send-email 2.7.4 x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [94.177.32.156] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 48f96db6-4719-4b00-87a6-08d73691732b x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600166)(711020)(4605104)(1401327)(2017052603328)(7193020); SRVR:DM5PR11MB1452; x-ms-traffictypediagnostic: DM5PR11MB1452: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7691; x-forefront-prvs: 0157DEB61B x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(376002)(39860400002)(396003)(366004)(136003)(189003)(199004)(52116002)(3846002)(2501003)(66556008)(66476007)(66946007)(54906003)(110136005)(478600001)(25786009)(316002)(6436002)(6116002)(76176011)(66066001)(386003)(14454004)(2906002)(102836004)(486006)(476003)(2616005)(11346002)(446003)(6506007)(186003)(26005)(4326008)(8936002)(81166006)(81156014)(7736002)(66446008)(8676002)(5660300002)(50226002)(64756008)(86362001)(2201001)(99286004)(71190400001)(71200400001)(53936002)(36756003)(14444005)(256004)(107886003)(6512007)(305945005)(6486002)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR11MB1452; H:DM5PR11MB1242.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: microchip.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: YVwxQCUsNBAlq7ddpfpxa+LGPhFgUnbWNsb0mcMbCSHKrh9Qr/e1QPSXos0UymxS/rMuYSAjGnXS+cXsXN2ULMH9eIw2G8nYU8OKf05Mcyb0uVEgfDqgY+bdx1w3c/2wRBX+kMGYX5nPpmcpgh9jTXmB+BDhaICgGqst4Mss/9Zt4QCRe63r4ZI73C11CbIEDLlqcyCnDyyOL/N35qEYY5B0zIg4Bmk5WYwOiCqbTaw0GpnF2Y5kWk2SokR8ELcFBsfGGqQZuz7GZ0lhAQUc3cAfa1faHDytMX8URu3lUZatxMunmQTy2ctBF9qJsrrPb+NK/MtvxM+N7toxCpL3ZVMoEnS+eAOlym/oRCB4O8+CnY5Axz6s9q3VQP4gDDnFtNoY5zJcShjlWbU5Tme7mUcigmcVlwJ3imYJlSOn+2Y= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 48f96db6-4719-4b00-87a6-08d73691732b X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Sep 2019 08:24:22.8903 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3f4057f3-b418-4d4e-ba84-d55b4e897d88 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: vLpIeajVpfqhvhsjHTYyCJ3ontjVkgRC711bJwiOTV82mjpMaPDHz3u5RYcNzTdlC1BW7aDBWXOBLdsIwc1IJ93Qr/NzAToUciiuCYtXwzI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR11MB1452 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190911_012425_653667_361D2A23 X-CRM114-Status: UNSURE ( 8.74 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eugen.Hristev@microchip.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Eugen Hristev 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. Signed-off-by: Eugen Hristev --- drivers/i2c/i2c-core-base.c | 6 ++++++ include/linux/i2c.h | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c index 9c440fa..c9fcb16 100644 --- a/drivers/i2c/i2c-core-base.c +++ b/drivers/i2c/i2c-core-base.c @@ -1658,6 +1658,12 @@ void i2c_parse_fw_timings(struct device *dev, struct i2c_timings *t, bool use_de t->sda_fall_ns = t->scl_fall_ns; device_property_read_u32(dev, "i2c-sda-hold-time-ns", &t->sda_hold_ns); + + device_property_read_u32(dev, "i2c-digital-filter-width-ns", + &t->digital_filter_width_ns); + + device_property_read_u32(dev, "i2c-analog-filter-cutoff-frequency", + &t->analog_filter_cutoff_freq_hz); } EXPORT_SYMBOL_GPL(i2c_parse_fw_timings); diff --git a/include/linux/i2c.h b/include/linux/i2c.h index fa5552c..26ce143 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h @@ -575,6 +575,10 @@ struct i2c_lock_operations { * @scl_int_delay_ns: time IP core additionally needs to setup SCL in ns * @sda_fall_ns: time SDA signal takes to fall in ns; t(f) in the I2C specification * @sda_hold_ns: time IP core additionally needs to hold SDA in ns + * @digital_filter_width_ns: width in ns of spikes on i2c lines that the IP core + * digital filter can filter out + * @analog_filter_cutoff_freq_hz: threshold frequency for the low pass IP core + analog filter */ struct i2c_timings { u32 bus_freq_hz; @@ -583,6 +587,8 @@ struct i2c_timings { u32 scl_int_delay_ns; u32 sda_fall_ns; u32 sda_hold_ns; + u32 digital_filter_width_ns; + u32 analog_filter_cutoff_freq_hz; }; /** -- 2.7.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel