From patchwork Thu Nov 2 12:47:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 833336 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-i2c-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3ySPxq3y4nz9sNc for ; Thu, 2 Nov 2017 23:47:43 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754988AbdKBMrl (ORCPT ); Thu, 2 Nov 2017 08:47:41 -0400 Received: from sauhun.de ([88.99.104.3]:33841 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751974AbdKBMrl (ORCPT ); Thu, 2 Nov 2017 08:47:41 -0400 Received: from localhost (p54B33C39.dip0.t-ipconnect.de [84.179.60.57]) by pokefinder.org (Postfix) with ESMTPSA id A928C2C3228; Thu, 2 Nov 2017 13:47:39 +0100 (CET) From: Wolfram Sang To: linux-i2c@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, Yoshihiro Shimoda , Jacopo Mondi , Wolfram Sang Subject: [PATCH RFT 0/5] i2c: sh_mobile: refactor HW init/deinit Date: Thu, 2 Nov 2017 13:47:26 +0100 Message-Id: <20171102124731.10484-1-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.11.0 Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org When clearing the ICE bit, all registers fall back to their defaut value. That allows for some simplifications in the code. Tested on a Renesas Lager board (R-Car H2) doing a bunch of consecutive commands. No spurious interrupts have been observed and the signals look exactly the same when visualized with sigrok. According to the docs, the ICE bit behaviour is the same since the beginning of this driver (sh7722) for the migo-r board. jacopo: can you please test this series while you work on migo-r anyhow? Thank you a ton for that! Looking forward to other comments, as well... Wolfram Sang (5): i2c: sh_mobile: remove redundant initialization i2c: sh_mobile: remove redundant deinitialization i2c: sh_mobile: manually "inline" two short functions i2c: sh_mobile: use direct writes when accessing ICE bit i2c: sh_mobile: shorten exit of xfer routine drivers/i2c/busses/i2c-sh_mobile.c | 50 +++++++++----------------------------- 1 file changed, 12 insertions(+), 38 deletions(-) Tested-by: Jacopo Mondi