From patchwork Tue Apr 3 19:11:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 894737 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=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="AQHqHecU"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 40FzH55PJdz9ry1 for ; Wed, 4 Apr 2018 05:12:01 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752881AbeDCTMA (ORCPT ); Tue, 3 Apr 2018 15:12:00 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:52660 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752832AbeDCTL7 (ORCPT ); Tue, 3 Apr 2018 15:11:59 -0400 Received: by mail-wm0-f66.google.com with SMTP id g8so11877357wmd.2 for ; Tue, 03 Apr 2018 12:11:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=AppP8z6dkWL5q72ZNDJk3yYKriiWXsDnQuku9G9y8qM=; b=AQHqHecUn4pAoAxyVGDpKV/K7MYjiMfZmS2U9u7POqiNiIDE5fpEAhF6g3DQ7fl7EI mwhg/k/pgXkbrKOwSruGxA5udFrEAPowNtDu/iB1oQyNHV5kcrZxfoPFrqcywAfJWaxC eEdvrdH4yJj7ECd/hnNBM2lGn0sR5FItgxZB0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=AppP8z6dkWL5q72ZNDJk3yYKriiWXsDnQuku9G9y8qM=; b=b6KdFkv4clsVLT1yxTNHWR+mHnCG8FAovwcj5lRNjmkuN4vrK+Bpl5jRnV6LAECJG5 p6V4O8oWNPckT6bAg2CEBb1nU39AyXzP5Ig/hGxxNjaHO/XR8Yn6nX08k59Jort1ljcW 1WGfl1MBa7zsK1G9YMEukJn5eddnp/A9MxC3uqm41NkDWKtL0Kpi/1kgbPMLAjj3s3N2 WcEac4yFqgQ5UUBtBtg4j21CGOe78V6fefW5yAitrDpUzi11rgGgo99PGBlfiT29EjqK 4JoryhgtJHKH5C58dsLASCrH1vyVlv64I4x+h6m7d3C6bL9PuZS4njQSrmHKZUOSGbYN yPbg== X-Gm-Message-State: ALQs6tB8Lc/YkwbXNSOD5n1hUBmyUxNcz8XAHWLvdsQfbEt0jipX7OFw h8ucR9ZrrwY5BBRHodwslfIUPw== X-Google-Smtp-Source: AIpwx49gE9FS0sc9vpyvwk0B4AaPeQK3XjvqXu4mQasxI4EpBY39caAdMvo6XGy4RN0P/um0UBATGQ== X-Received: by 10.28.116.26 with SMTP id p26mr5504687wmc.102.1522782718565; Tue, 03 Apr 2018 12:11:58 -0700 (PDT) Received: from localhost.localdomain ([2a01:e35:3995:5470:200:1aff:fe1b:b328]) by smtp.gmail.com with ESMTPSA id y100sm25120682wmh.2.2018.04.03.12.11.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 Apr 2018 12:11:57 -0700 (PDT) From: Ard Biesheuvel To: wsa@the-dreams.de Cc: linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org, jassisinghbrar@gmail.com, andy.shevchenko@gmail.com, Ard Biesheuvel Subject: [PATCH v7 0/4] add support for Socionext SynQuacer I2C controller Date: Tue, 3 Apr 2018 21:11:47 +0200 Message-Id: <20180403191151.14924-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.15.1 Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org Add a binding and a driver for the I2C IP found in the Socionext SynQuacer SoC, which is essentially a rebranded version of the Fujitsu F_I2C controller. v7; - remove recovery and suspend/resume support for now - add myself as maintainer for this driver - use WARN_ON() in i2c_transfer() sanity check v6: - use i2c_8bit_addr_from_msg() instead of open coding the address generation - switch to generic recovery using minimal helpers to drive the SDA/SCL lines directly - use reinit_completion() and move init_completion() to probe function - replace bus free detection at the end of a transfer with a simple udelay() for 2 clock periods - don't recover on every error - don't call synquacer_i2c_hw_init() from synquacer_i2c_hw_reset(), since it will be always called twice in that case - add patch to sanity check i2c_transfer() arguments in core code (#3) v5: - add Rob's ack to #1 - drop unnecessary 'platform_set_drvdata(pdev, NULL)' in remove path (#2) v4: - clarify binding that only a single interrupt specifier is expected (#1) - check return value of clk_prepare_enable() on probe path (#2) - add Andy's R-b to patch #2 v3: - incorporate more of Andy's review comments (#2), especially regarding the bus speed and clock source handling for ACPI - patch #1 unchanged. v2: - incorporate Andy's review comments (#2) - patch #1 unchanged. Ard Biesheuvel (4): dt-bindings: i2c: add binding for Socionext SynQuacer I2C i2c: add support for Socionext SynQuacer I2C controller i2c: add param sanity check to i2c_transfer() MAINTAINERS: add Ard as Socionext SynQuacer I2C driver maintainer Documentation/devicetree/bindings/i2c/i2c-synquacer.txt | 29 + MAINTAINERS | 6 + drivers/i2c/busses/Kconfig | 10 + drivers/i2c/busses/Makefile | 1 + drivers/i2c/busses/i2c-synquacer.c | 669 ++++++++++++++++++++ drivers/i2c/i2c-core-base.c | 3 + 6 files changed, 718 insertions(+) create mode 100644 Documentation/devicetree/bindings/i2c/i2c-synquacer.txt create mode 100644 drivers/i2c/busses/i2c-synquacer.c