From patchwork Sun Sep 17 09:38:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 112822 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp2503376qgf; Sun, 17 Sep 2017 02:39:21 -0700 (PDT) X-Received: by 10.98.59.193 with SMTP id w62mr28644817pfj.7.1505641161243; Sun, 17 Sep 2017 02:39:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505641161; cv=none; d=google.com; s=arc-20160816; b=kmLetHkgFNphhH3n+j6KHZcGSm1pUU2yc+fnt4/45FYGyeSwe0XsHGMaAWvJzRRMc0 CNRoeD1orgJAA2A+z13keRAvLzSrEKTCN3uAIzuPGh1r7WFby43g2wqZW8NikYsbaMmx W67udKgHksr8AT+mP9oe4ybKUYWy5B0hcIqYWrLVdN//3VXh7gAEBMKPP74Oqye3X2ZM 7A78ngu60uMPPES2ROoQGLvY5kTpRvb8GiE/u1cewgtrw0CcM+Yu3pT/M34/4kHBPivK QXR2kLtakGHtXbmzu2LFdi3kjk7Zcpi4yFWA9LIpL6a7/dQZzPRWBBepuqZbUvRdk2aJ 5W0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=jnkFVZuCs8tCS72rnGKumg5zfRI8BEYKUCFYpr678Do=; b=GNqqtrgkr+5LQgoerw2OuWiTIJNmJyTURr4sr7cZhB0H7vLhaE7I80IxckaILk2Yev GS9mntaggXmM3blnVB0UH456O2zUz5o9McLzQp2r7MxGXq9wyT2ZDr4RYJfys+VINgFN 0GfWGDY1ZOF+B1iZTQm7boSmeEwh7Q+JBCsbzHWAz0mg5zUkERHuNWna1xuKRrojEqyo TEX3LjDEtRgqRa3lVxY4pV2B7T8vUSM+UmT9TwEoSfIz10k1VQ8hQI+p3pWiUVYK32Kd b6RWd/7GO0iZBdM6ytR2saSnTiCCIOWmz36AGVnR9ditWzvledmZoA4fQeyqPFmOmNp4 30ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PGoh4cd6; spf=pass (google.com: best guess record for domain of linux-i2c-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-i2c-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c10si3077057pfl.6.2017.09.17.02.39.19; Sun, 17 Sep 2017 02:39:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-i2c-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PGoh4cd6; spf=pass (google.com: best guess record for domain of linux-i2c-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-i2c-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750860AbdIQJjS (ORCPT + 3 others); Sun, 17 Sep 2017 05:39:18 -0400 Received: from mail-lf0-f53.google.com ([209.85.215.53]:49960 "EHLO mail-lf0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750803AbdIQJjQ (ORCPT ); Sun, 17 Sep 2017 05:39:16 -0400 Received: by mail-lf0-f53.google.com with SMTP id r17so5618970lff.6 for ; Sun, 17 Sep 2017 02:39:16 -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:mime-version :content-transfer-encoding; bh=jnkFVZuCs8tCS72rnGKumg5zfRI8BEYKUCFYpr678Do=; b=PGoh4cd6Ps6Av8pYMJ4uQr4IHxAEZP5frtqQVt3+aUqL3QB/jliD0DPS1xp5R011r/ 4Gf3vvE9VtvRNVMj1A5xH8/BvMhoJNV+Neh7YeUbDJJ3jN2ZLVOcyTRzp3f7Dh9X83BM q+64DxGd+YVIuW4EdE/87PEJWmQbReqP0x8m4= 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:mime-version :content-transfer-encoding; bh=jnkFVZuCs8tCS72rnGKumg5zfRI8BEYKUCFYpr678Do=; b=Xb97c1LGEukdvvbLzMRLm4HqF0oGymEKOGaN50+fIlRW2hzHvrrkvBsV+xz82i6J6G 20A4r67DJZGqENuONTvP7J3+sPF2REePFByhqRyp3JJJzzUeDo3f7HiAwpjkplzJtech n87ipRYP0TDWs+7dC0ygo7i+tPW0TqqiJnQD/2HQZ3tuzCyagE7fucrSISputHCIZRc3 mVPKaSaETHelT4LwEH3JO8Y01iemONwZHFvDFeFdEtvYhzBlzAFDV0MnO/D+ovtcD4Wj QWAEUbEl65ek4McPKxhq2Dy6ixEODnSrHRHMMLF3JW2I5VaRCF1BIRUmB7Id1WIonYr8 n9ow== X-Gm-Message-State: AHPjjUifIK49x77mIgy7cl2l0uAlPDzFREcl6G9uvipMF45ux2jE+gaZ 0ehrYakrVARRPMwf X-Google-Smtp-Source: AOwi7QCxFP77zq2rHe7EymrvY8tdC5bVPT/OV8/B1/GnedKUbtAIfN2HoqhBm/E1IgP44ExqeG/k3w== X-Received: by 10.25.205.149 with SMTP id d143mr2012195lfg.147.1505641155348; Sun, 17 Sep 2017 02:39:15 -0700 (PDT) Received: from fabina.bredbandsbolaget.se (c-2209e055.014-348-6c756e10.cust.bredbandsbolaget.se. [85.224.9.34]) by smtp.gmail.com with ESMTPSA id t84sm974559lfi.21.2017.09.17.02.39.13 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 17 Sep 2017 02:39:14 -0700 (PDT) From: Linus Walleij To: Wolfram Sang , linux-i2c@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-mips@linux-mips.org, adi-buildroot-devel@lists.sourceforge.net, Geert Uytterhoeven , Linus Walleij Subject: [PATCH 0/7] I2C GPIO to use gpiolibs open drain Date: Sun, 17 Sep 2017 11:38:59 +0200 Message-Id: <20170917093906.16325-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.13.5 MIME-Version: 1.0 Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org This augments the I2C GPIO driver to use open drain emulation or hardware support for open drain from the GPIO driver. This version layers Geert Uytterhoeven's idea to use explicit sda-gpios and scl-gpios for the GPIO lines, and strongly encourage the (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN) flags to be used in all device trees. We have collected ACKs from the ARM SoC maintainers and the MFD maintainer and are looking for testers to try this out. Geert Uytterhoeven (1): dt-bindings: i2c: i2c-gpio: Add support for named gpios Linus Walleij (6): i2c: gpio: Convert to use descriptors gpio: Make it possible for consumers to enforce open drain i2c: gpio: Enforce open drain through gpiolib i2c: gpio: Augment all boardfiles to use open drain i2c: gpio: Local vars in probe i2c: gpio: Add support for named gpios in DT Documentation/devicetree/bindings/i2c/i2c-gpio.txt | 32 +++- arch/arm/mach-ep93xx/core.c | 41 ++-- arch/arm/mach-ep93xx/edb93xx.c | 15 +- arch/arm/mach-ep93xx/include/mach/platform.h | 4 +- arch/arm/mach-ep93xx/simone.c | 12 +- arch/arm/mach-ep93xx/snappercl15.c | 12 +- arch/arm/mach-ep93xx/vision_ep9307.c | 7 +- arch/arm/mach-ixp4xx/avila-setup.c | 17 +- arch/arm/mach-ixp4xx/dsmg600-setup.c | 16 +- arch/arm/mach-ixp4xx/fsg-setup.c | 16 +- arch/arm/mach-ixp4xx/goramo_mlr.c | 24 +-- arch/arm/mach-ixp4xx/ixdp425-setup.c | 16 +- arch/arm/mach-ixp4xx/nas100d-setup.c | 16 +- arch/arm/mach-ixp4xx/nslu2-setup.c | 16 +- arch/arm/mach-ks8695/board-acs5k.c | 15 +- arch/arm/mach-pxa/palmz72.c | 14 +- arch/arm/mach-pxa/viper.c | 27 ++- arch/arm/mach-sa1100/simpad.c | 14 +- arch/blackfin/mach-bf533/boards/blackstamp.c | 19 +- arch/blackfin/mach-bf533/boards/ezkit.c | 18 +- arch/blackfin/mach-bf533/boards/stamp.c | 18 +- arch/blackfin/mach-bf561/boards/ezkit.c | 18 +- arch/mips/alchemy/board-gpr.c | 23 ++- arch/mips/ath79/mach-pb44.c | 16 +- drivers/gpio/gpiolib.c | 13 ++ drivers/i2c/busses/i2c-gpio.c | 213 ++++++++++----------- drivers/mfd/sm501.c | 49 ++--- include/linux/gpio/consumer.h | 6 + include/linux/i2c-gpio.h | 4 - 29 files changed, 423 insertions(+), 288 deletions(-) -- 2.13.5 Tested-by: Geert Uytterhoeven Acked-by: Rob Herring