From patchwork Wed Aug 1 13:35:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 10552303 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2D1D513B8 for ; Wed, 1 Aug 2018 13:36:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 165452B447 for ; Wed, 1 Aug 2018 13:36:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0A58D2B4F1; Wed, 1 Aug 2018 13:36:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4DEA02B447 for ; Wed, 1 Aug 2018 13:36:00 +0000 (UTC) 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: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:In-Reply-To:References: List-Owner; bh=T3MirH7FbpVBEdM2R+KPcgo1jFRfqiqtMIVC2UXWa1I=; b=ljl5q/p4mxoJWg pa5bTJdJnrHxTQ6NmAHL+dahR62JarEbIfVa+zkE5xpPiZ+695UQOqWbvkfF7e9Gb/0F+dVFfE4io 4aR6CFtuZ5OrLXOLC4E5zdjO+wpIFofLgM+T7APKFmf8Fykug7QfGVU5fUXyDCKJIHSRo5zO3bgg+ dVh7OSHYNL44sRHGOna1NuRU4eebZh0d1xGCq0EUvAAbCbPV237vnf1IexxpCQo/4SrDl+5eRYRew UjB5f3ox9MaL9GCDXCw5Czcb4+60t1f9MyBNVSsQY+o5gMtiwbjUYEQEJyBmpL/T8JEZEQ5sISoGY kn/5tvCx2VBTgvCydeBQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fkrIB-0006as-30; Wed, 01 Aug 2018 13:35:55 +0000 Received: from esa5.microchip.iphmx.com ([216.71.150.166]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fkrI0-0006NS-GZ for linux-arm-kernel@lists.infradead.org; Wed, 01 Aug 2018 13:35:46 +0000 X-IronPort-AV: E=Sophos;i="5.51,432,1526367600"; d="scan'208";a="15042262" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa5.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 01 Aug 2018 06:35:32 -0700 Received: from localhost.localdomain.com (10.10.76.4) by chn-sv-exch02.mchp-main.com (10.10.76.38) with Microsoft SMTP Server id 14.3.352.0; Wed, 1 Aug 2018 06:35:31 -0700 From: Tudor Ambarus To: , , , , Subject: [PATCH 0/2] i2c: enable buses to save their clock frequency in adapter Date: Wed, 1 Aug 2018 16:35:10 +0300 Message-ID: <20180801133512.12276-1-tudor.ambarus@microchip.com> X-Mailer: git-send-email 2.9.4 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180801_063544_551175_6E3F5945 X-CRM114-Status: UNSURE ( 8.32 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linus.walleij@linaro.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Tudor Ambarus Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The clock-frequency property is not mandatory for the i2c buses. If it's not present in the device tree, the buses __usually__ assume it's 100kHZ (see altera, at91, axxia, etc.). Broadcom uses a 375kHZ default clock-frequency, so the default clock frequency varies from bus to bus. There are i2c clients that need to know the bus clock frequency in order to compute their wake token (see atecc508a i2c client). The clock-frequency value has to be propagated to the i2c clients, otherwise, if they will not find the i2c bus clock frequency in the device tree, they will have to make their own assumption of the clock frequency. Spare the i2c clients of making wrong assumptions of the i2c bus clock frequency and enable the buses to save their clock frequency in adapter. since rfc: - reword commit messages Tudor Ambarus (2): i2c: enable buses to save their clock frequency in adapter i2c: at91: Save the bus clock frequency in adapter drivers/i2c/busses/i2c-at91.c | 1 + include/linux/i2c.h | 1 + 2 files changed, 2 insertions(+)