From patchwork Fri Jun 29 06:35:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 936628 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-gpio-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="ZC5+nTf5"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 41H6NR2jrZz9s0w for ; Fri, 29 Jun 2018 16:35:51 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752617AbeF2Gft (ORCPT ); Fri, 29 Jun 2018 02:35:49 -0400 Received: from mail-lf0-f67.google.com ([209.85.215.67]:43690 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751283AbeF2Gft (ORCPT ); Fri, 29 Jun 2018 02:35:49 -0400 Received: by mail-lf0-f67.google.com with SMTP id m12-v6so5418952lfc.10 for ; Thu, 28 Jun 2018 23:35:48 -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=wb5eNOC3rHpWBhz3Mm/LLW2mycBt/lFIfvICTW05KHc=; b=ZC5+nTf5aZXNleSP8PBYrbbN/mkd8nD9mp2Kvo6OsFasvIQIhvU3qDUC4nhwfbhiNk ndDXKS8RfA82PR9x9pSmFEk3a8ayWscUaEngWvMZ3dIVfzp0SVv7VWmqEffmmX95x9zS UoCb4L8Ps2C3BVH00VMpEV2n1Wdv95jf0cjYA= 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=wb5eNOC3rHpWBhz3Mm/LLW2mycBt/lFIfvICTW05KHc=; b=NJ+ZPXaWYObp0Ok89I28jESrqBoePP0B5F0bLpBgrz/tuzuAx2eqOLQGIwX1IiUp1k rbjnBaPTZFT74tox8xqNoxO7MhWEhO/EwlEbuQXwhpqtKcNe2R0+2HT8n0wWR0Xgk6pH yfBHhS+OAZ0/ev9EBfdwgDlvN9gguZjq/uxwa5iRCnD3BAQBIiqMszaGRR+KHbXrcXMw hGdpzTRBl+qrg0VyxdbbtHEy/Ncgqee+WQ+FJzrBWezjKkh9qWKSsJCzjc43PNIOKufi 8cLIS7/ohDhIcSqHdBT/9BR7Eg2MeOuhB+Wby+lsE3x9Hl50EXP32uK9nbpzkQrq8TTz AHXw== X-Gm-Message-State: APt69E1BMx72bC9R+LdCFZEUiNJoQtfdQ3z0xZKcRdLRO4lLjt9F9X7N PZnaVD+DXa5nyClg3JHJoruZDlXyiAY= X-Google-Smtp-Source: AAOMgpfpiF7vSBsLC5Rc4MoD3jlvNBZMobIMyCX2InNhORCmyPu15zuVN8LStA/+u9+CkGs0urL3eA== X-Received: by 2002:a19:1604:: with SMTP id m4-v6mr9220568lfi.120.1530254147760; Thu, 28 Jun 2018 23:35:47 -0700 (PDT) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id v2-v6sm1382162ljj.71.2018.06.28.23.35.45 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 28 Jun 2018 23:35:46 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org Cc: Linus Walleij Subject: [PATCH 01/18] gpio: rc5t583: Include the right header Date: Fri, 29 Jun 2018 08:35:27 +0200 Message-Id: <20180629063544.3826-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.17.0 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org This is a GPIO driver, include only . Signed-off-by: Linus Walleij --- drivers/gpio/gpio-rc5t583.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/gpio-rc5t583.c b/drivers/gpio/gpio-rc5t583.c index 3b4dc1a9a68d..a499c633a6c5 100644 --- a/drivers/gpio/gpio-rc5t583.c +++ b/drivers/gpio/gpio-rc5t583.c @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include struct rc5t583_gpio { From patchwork Fri Jun 29 06:35:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 936629 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-gpio-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="N22R0hU9"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 41H6NS6J1jz9s19 for ; Fri, 29 Jun 2018 16:35:52 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753044AbeF2Gfw (ORCPT ); Fri, 29 Jun 2018 02:35:52 -0400 Received: from mail-lf0-f66.google.com ([209.85.215.66]:38960 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751283AbeF2Gfv (ORCPT ); Fri, 29 Jun 2018 02:35:51 -0400 Received: by mail-lf0-f66.google.com with SMTP id q6-v6so5973720lfh.6 for ; Thu, 28 Jun 2018 23:35:51 -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:in-reply-to:references; bh=3SqCJwXjVJAJvGuY76VJmMZmzt85RcuDgOaSdWt1a5E=; b=N22R0hU9tWK/BoOCCRM94W8e/vAmAo9WE4QMRlszyjd48nOS8US+JJ4yMY+Ek1nejC ih1rnJKxzT/4uoVGRmeo6oXCnM4zzNaMOZQAvlnS3HEy7j2gNIOdwUQn/FYWktbmCObR a9mUtkZKm2KUGSLZtV+knXZIf5yqBHCE8Grps= 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:in-reply-to :references; bh=3SqCJwXjVJAJvGuY76VJmMZmzt85RcuDgOaSdWt1a5E=; b=Ka+6px8MYioKC4Ylq7CYTH7VcYVIbquUvJluupwrPz0VepF5F/Yiyjmo4TIeDCHCMI mH6rW8MkCEG28EknQllWXGxWs8981FVcmmAktsMsWam5wbWXzslGOgMjBkFUCItBl8XP gNPnlAcBQww3X8TuMcmu/h4JWcgXb3Q6/cllA57Eq/LlcuOJqHjWbJA+CL7DE3Gwh+st se5EhxX3U97BJt2VyDVS6Y80stZHctkB818i0+f6qtj9/WNe6l4t4fnwsuTC0v8cFrC3 M4OKGnS/3I5KToeCPg8QJf9AQe9AxOTHvGtw+JzFKJ6zsLLxwST4R+8+oDg32n7GjhiQ UJ2g== X-Gm-Message-State: APt69E0By8+h8o42jHCsB86dETOMb1XBfHxwSsYat0swJOL6xX0AmaSr d9IsfD4uCAh4t7MsRxGGBofBeB3GkLw= X-Google-Smtp-Source: AAOMgpef2Y/Ph6CO6Vb1dSewlmUwBxtZxLAvoFMmAYVjVFdU7bb6/w2plGdGGChR5s+gBmCVEtPbcQ== X-Received: by 2002:a19:d245:: with SMTP id j66-v6mr9241514lfg.139.1530254150304; Thu, 28 Jun 2018 23:35:50 -0700 (PDT) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id v2-v6sm1382162ljj.71.2018.06.28.23.35.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 28 Jun 2018 23:35:49 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org Cc: Linus Walleij Subject: [PATCH 02/18] gpio: rcar: Include the right header Date: Fri, 29 Jun 2018 08:35:28 +0200 Message-Id: <20180629063544.3826-2-linus.walleij@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180629063544.3826-1-linus.walleij@linaro.org> References: <20180629063544.3826-1-linus.walleij@linaro.org> Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org This is a GPIO driver, include only . Signed-off-by: Linus Walleij --- drivers/gpio/gpio-rcar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/gpio-rcar.c b/drivers/gpio/gpio-rcar.c index 350390c0b290..2c9a4fc92dc6 100644 --- a/drivers/gpio/gpio-rcar.c +++ b/drivers/gpio/gpio-rcar.c @@ -15,7 +15,7 @@ */ #include -#include +#include #include #include #include From patchwork Fri Jun 29 06:35:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 936630 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-gpio-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="eBZ4NRgD"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 41H6NY4N9Bz9s0w for ; Fri, 29 Jun 2018 16:35:57 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753166AbeF2Gf5 (ORCPT ); Fri, 29 Jun 2018 02:35:57 -0400 Received: from mail-lf0-f67.google.com ([209.85.215.67]:40703 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751283AbeF2Gf4 (ORCPT ); Fri, 29 Jun 2018 02:35:56 -0400 Received: by mail-lf0-f67.google.com with SMTP id y200-v6so392542lfd.7 for ; Thu, 28 Jun 2018 23:35:55 -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:in-reply-to:references; bh=Xwc3xQl+szWxQLWmpfPHbAxlIKeRo7nTIU7/52F6Xto=; b=eBZ4NRgDyqMok6B8kPHtQvgneQdD/JQWz2Vgwy1ehxT+dXoVJwql+h+rspQOMjo00Z DRiV75setP7iZbtvkTZ/4umF85T8N4iWTxjdGyatJXCa6YiIVU+KyIKeJayUvkkY4IBo Oec6kOUk2q24abbJrQLEeJOFIwFGUyV3d0QHA= 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:in-reply-to :references; bh=Xwc3xQl+szWxQLWmpfPHbAxlIKeRo7nTIU7/52F6Xto=; b=poUuyGaYBfvleCJoMy0zxx8iIuN3yMsvLdpxgs+pmaQP5+z310j5zWqZ4heIR21m4P GGuwpRDTGwkIRqD0q0Nyc4Je9b0aKgSc+260uYBW1hE5qk6aSF648adY/wwcLb0ZAc6x Awg8uIuPOe0G2tZqguw99iM3lkF/gO61ifLdQBdRxmdMmHjpZknTkI4rNu0SrpR9pShf OVl+x4k8bsc3PxwGYR5xOsJLSNk58U68MxkzzL5SUUiOwDfCdV0wz6iVdFtK4dbfLn0l b4+pjiXCLmYrl/TNku4oiT4laN7uR8iDZ/zCLhbV77HPCiAv3J4r8ch7ZluYm/HbCl26 y30w== X-Gm-Message-State: APt69E0zmGufkO3PiGEvO2FXRh4Z/j60V2CUddCVwOTcY/9RwxSAJq3y 3M7aZGwPqAsecdIOKcMl4q62Dog7A94= X-Google-Smtp-Source: AAOMgpfrFy3OLIoUO6wrjS2PYCus5fz/bWH4v07FxWFSaL4IXZIaxGT+1+TrIpw5kpu7vwrICfJmHQ== X-Received: by 2002:a19:ef0c:: with SMTP id n12-v6mr8710110lfh.48.1530254154752; Thu, 28 Jun 2018 23:35:54 -0700 (PDT) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id v2-v6sm1382162ljj.71.2018.06.28.23.35.53 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 28 Jun 2018 23:35:53 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org Cc: Linus Walleij Subject: [PATCH 03/18] gpio: rdc321x: Include the right header Date: Fri, 29 Jun 2018 08:35:29 +0200 Message-Id: <20180629063544.3826-3-linus.walleij@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180629063544.3826-1-linus.walleij@linaro.org> References: <20180629063544.3826-1-linus.walleij@linaro.org> Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org This is a GPIO driver, include only . Signed-off-by: Linus Walleij --- drivers/gpio/gpio-rdc321x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/gpio-rdc321x.c b/drivers/gpio/gpio-rdc321x.c index cbf0f9e6465b..2938217566d3 100644 --- a/drivers/gpio/gpio-rdc321x.c +++ b/drivers/gpio/gpio-rdc321x.c @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include From patchwork Fri Jun 29 06:35:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 936631 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-gpio-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="BYbEzOTx"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 41H6Nb512xz9s19 for ; Fri, 29 Jun 2018 16:35:59 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751283AbeF2Gf7 (ORCPT ); Fri, 29 Jun 2018 02:35:59 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:33760 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753169AbeF2Gf6 (ORCPT ); Fri, 29 Jun 2018 02:35:58 -0400 Received: by mail-lj1-f196.google.com with SMTP id t21-v6so6418249lji.0 for ; Thu, 28 Jun 2018 23:35:57 -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:in-reply-to:references; bh=33XF4Unv0QZHnn66ZpeEtDrAXsdPn/fRP1iUKx9ek0Y=; b=BYbEzOTxCdniOF66bXaKEczLf/HDSIhZgn5hdSPI4x3BMDBsviFQUhAPf30/WPgjtN 1bE6ACV9c2YxExW/uO99rC/FJ5B84fJRZdJ37TOssDkXljvZG/k60Zzw+gIsWIP/qNoY gg8S1enhVrMvJKJEd3WXxM4MrQTuoMbHNKW9Q= 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:in-reply-to :references; bh=33XF4Unv0QZHnn66ZpeEtDrAXsdPn/fRP1iUKx9ek0Y=; b=TEdO9VhUKew88uG9zb86RgF7cdbp/GJQYCj60XN/n8nnZ12p7YsbOtF+99CJLaxbpu fr/+cjuI1+ExzxgRjoaerMMtsTZQLNa0g9EKXev6Fts3F6uieCidXTHf8KBhsl4wa2LE p31mUQ9vu89cl7k2HQC4bFW9FuszC4yzHshqzb+w1CjbLo3kRB9un1IQidmh6pO1LMiN J+R82vdDuug4xk7CnXytf1ZRFRrWf9UJavUkhrvKzDtR7zI7YzJ/9Dl8AFBqXw5GSW5H kYYA5quws83JQYg5cAu3QGlTiwWKTaBabRu8fvIilJbX8tSrBFvjX+xRPEMKf0lsrKps jX8g== X-Gm-Message-State: APt69E0+fkl0esm70rc0QIp/A0QfULL7hOkn49Su5TAYs662eoRl07ck wl1a8Ja64ScQhmwaCEFbOsh1CacMDSg= X-Google-Smtp-Source: AAOMgperONrvZHMoRpOYsF0FaEQlfqq5At0z9PxgmRXie3nlS5LJURDUh/55Jg2pPUO7OXcszTKi8A== X-Received: by 2002:a2e:8051:: with SMTP id p17-v6mr8972176ljg.22.1530254156835; Thu, 28 Jun 2018 23:35:56 -0700 (PDT) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id v2-v6sm1382162ljj.71.2018.06.28.23.35.55 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 28 Jun 2018 23:35:56 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org Cc: Linus Walleij Subject: [PATCH 04/18] gpio: sa1100: Include the right header Date: Fri, 29 Jun 2018 08:35:30 +0200 Message-Id: <20180629063544.3826-4-linus.walleij@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180629063544.3826-1-linus.walleij@linaro.org> References: <20180629063544.3826-1-linus.walleij@linaro.org> Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org This is a GPIO driver, include only . Signed-off-by: Linus Walleij --- drivers/gpio/gpio-sa1100.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/gpio-sa1100.c b/drivers/gpio/gpio-sa1100.c index 249f433aa62d..986eb3b231ac 100644 --- a/drivers/gpio/gpio-sa1100.c +++ b/drivers/gpio/gpio-sa1100.c @@ -7,7 +7,7 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ -#include +#include #include #include #include From patchwork Fri Jun 29 06:35:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 936632 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-gpio-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="e9KZGDIG"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 41H6Nf1H68z9s0w for ; Fri, 29 Jun 2018 16:36:01 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753178AbeF2GgB (ORCPT ); Fri, 29 Jun 2018 02:36:01 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:38104 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753169AbeF2GgA (ORCPT ); Fri, 29 Jun 2018 02:36:00 -0400 Received: by mail-lj1-f194.google.com with SMTP id v15-v6so6418086ljk.5 for ; Thu, 28 Jun 2018 23:36:00 -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:in-reply-to:references; bh=VfvvT/tAU1bGPOP+fYqbuA4cslFj0sIJsUZFPREJ5XQ=; b=e9KZGDIGcD/HMkupxHOzB4nnH26/a+icr8f1EhgRoCtrHXJJFfVcek+fCl9ZN8uX/p F+mwAQRTa6zE0wCj/y2CNtQoM4cIhS9tPHaLaP1HuG3dgirfQQOoPDwlWMoT353xbblP rJ1Tlo9rbksJQ/i5swmWuLtwNX2OoLPR/fC+0= 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:in-reply-to :references; bh=VfvvT/tAU1bGPOP+fYqbuA4cslFj0sIJsUZFPREJ5XQ=; b=gQPiX2ecyOvN6ycovw3WSz+pcjaX5kLaX7TNk40rwIK7I4OJEaPrl7L5nNHJODCr5i kJKQ0J1w6E+PsfXTJr4RVEIbyQOU8pjM6DNAqzFHV4eBLqBSDhfdVxIkIri44U5CcU9g FYCq6suNYH+f3KI0zJVLP80kdPGaKshy0NdzA+2OpKHyKcdiKiubEWoxNtwm/693PdPo TGz8Xi/dVplje6MZ5AuGfPgnpcHd/7oRoSNhCK2v4NbOYrqCS2VSWTJ6MJF3RjGzcOME yinsIGC3d0knE/7yyAdXCt4rpgVLLs72h19bcpfqZeuDKluaBVm3tamtl9QgwBge7KKR E/cQ== X-Gm-Message-State: APt69E3iQFgflz0woD682KAy40lA+AVMBnQuJLRW9QE+ZpukJJJtkUwM Q1RJJ6xT8P9g78n9QzWKmXr4XerhheM= X-Google-Smtp-Source: AAOMgpdwOkzc43SrcW6I6IxuTEwHGkJt9wBlX7AM6i822sU7H/g8JetkanF+481EY4z3NLZ9+y5vIg== X-Received: by 2002:a2e:500d:: with SMTP id e13-v6mr8740415ljb.70.1530254159290; Thu, 28 Jun 2018 23:35:59 -0700 (PDT) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id v2-v6sm1382162ljj.71.2018.06.28.23.35.57 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 28 Jun 2018 23:35:58 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org Cc: Linus Walleij , Denis Turischev , Daniel Krueger , Mika Westerberg Subject: [PATCH 05/18] gpio: sch: Include the right header Date: Fri, 29 Jun 2018 08:35:31 +0200 Message-Id: <20180629063544.3826-5-linus.walleij@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180629063544.3826-1-linus.walleij@linaro.org> References: <20180629063544.3826-1-linus.walleij@linaro.org> Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org This is a GPIO driver, include only . Cc: Denis Turischev Cc: Daniel Krueger Cc: Mika Westerberg Signed-off-by: Linus Walleij Acked-by: Mika Westerberg --- drivers/gpio/gpio-sch.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpio/gpio-sch.c b/drivers/gpio/gpio-sch.c index 545004445846..26e9b1cd2c78 100644 --- a/drivers/gpio/gpio-sch.c +++ b/drivers/gpio/gpio-sch.c @@ -26,8 +26,7 @@ #include #include #include - -#include +#include #define GEN 0x00 #define GIO 0x04 From patchwork Fri Jun 29 06:35:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 936633 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-gpio-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="h6+PlJUP"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 41H6Nh5fy1z9s0w for ; Fri, 29 Jun 2018 16:36:04 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753169AbeF2GgE (ORCPT ); Fri, 29 Jun 2018 02:36:04 -0400 Received: from mail-lf0-f65.google.com ([209.85.215.65]:43706 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753210AbeF2GgD (ORCPT ); Fri, 29 Jun 2018 02:36:03 -0400 Received: by mail-lf0-f65.google.com with SMTP id m12-v6so5419448lfc.10 for ; Thu, 28 Jun 2018 23:36:03 -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:in-reply-to:references; bh=j2pYjLQi68s+yyqoJk4GQv/JRe3AfQdKvQR0jKalUT8=; b=h6+PlJUPzR4tO1DEgj24GK9ZqzEhAecCEdpoa+MS4eO2x1M/0p4ozc3zjfXxJWCHLM 1S1S3cnPOwXlFBPEefS3cgvx2L+tl2Dv3Mu7TFg+4vamWn2eRsj//R3HR9N5w9t2PxYL jCg1hihfF2V3g6oA2YZzomcbG/tMduVkbIEf4= 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:in-reply-to :references; bh=j2pYjLQi68s+yyqoJk4GQv/JRe3AfQdKvQR0jKalUT8=; b=lwNHNyBmnzqqV4I6GHXrIO2+rXs7aU0Z4jXUro9tp/n2KE5xO02ZSt4/17CcSPE5bz gq1CjWyA5YUvlHb6o/l+js4vYOL3oZLcjU9iWfXES66TenA6U+wWAg7zfZ7iqmHYE9RW R99Jvdh6XAhz4JebkOl4GHtuUOht6wy26jBLzxycSFJ+G1fvNU1sivTZEBn0WQNIcPB3 vn3IFM5CMQ+0jf0g4xP1bv/FJptxTqewtd6X3Uq9kS+3L9r/vHN0cpYMucgvrzp3525O 1TynvC8LziLFsNVI8R0hepWe2nyTjMdtBIRhyWt5Lk/dG+ZOGOf5TtBlUKa0WiVcANeO ZcRg== X-Gm-Message-State: APt69E06SiWdUC8ZiFHdT+0jrTu7iI9l+Cuq9GjOAlvd5EBs8s3QVS/I 3vMOgg1VPOKj31z9h5nja9SPAItw6t0= X-Google-Smtp-Source: AAOMgpey/52gMRizJzmNWzDsmiFmlLK2DnTmabTEGD7n1xUhZGlQWyRdLMQJylrLSgABQeTrRtQa9g== X-Received: by 2002:a19:c004:: with SMTP id q4-v6mr8648835lff.16.1530254162023; Thu, 28 Jun 2018 23:36:02 -0700 (PDT) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id v2-v6sm1382162ljj.71.2018.06.28.23.36.00 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 28 Jun 2018 23:36:00 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org Cc: Linus Walleij , Denis Turischev , Daniel Krueger , Mika Westerberg Subject: [PATCH 06/18] gpio: sch: Implement .get_direction() Date: Fri, 29 Jun 2018 08:35:32 +0200 Message-Id: <20180629063544.3826-6-linus.walleij@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180629063544.3826-1-linus.walleij@linaro.org> References: <20180629063544.3826-1-linus.walleij@linaro.org> Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org It's pretty simple to implement the .get_direction() for this chip, so let's just do it. Cc: Denis Turischev Cc: Daniel Krueger Cc: Mika Westerberg Signed-off-by: Linus Walleij Acked-by: Mika Westerberg --- drivers/gpio/gpio-sch.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/gpio/gpio-sch.c b/drivers/gpio/gpio-sch.c index 26e9b1cd2c78..e9878f6ede67 100644 --- a/drivers/gpio/gpio-sch.c +++ b/drivers/gpio/gpio-sch.c @@ -137,6 +137,13 @@ static int sch_gpio_direction_out(struct gpio_chip *gc, unsigned gpio_num, return 0; } +static int sch_gpio_get_direction(struct gpio_chip *gc, unsigned gpio_num) +{ + struct sch_gpio *sch = gpiochip_get_data(gc); + + return sch_gpio_reg_get(sch, gpio_num, GIO); +} + static const struct gpio_chip sch_gpio_chip = { .label = "sch_gpio", .owner = THIS_MODULE, @@ -144,6 +151,7 @@ static const struct gpio_chip sch_gpio_chip = { .get = sch_gpio_get, .direction_output = sch_gpio_direction_out, .set = sch_gpio_set, + .get_direction = sch_gpio_get_direction, }; static int sch_gpio_probe(struct platform_device *pdev) From patchwork Fri Jun 29 06:35:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 936634 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-gpio-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="Kx7J1yiL"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 41H6Nk5vmvz9s0w for ; Fri, 29 Jun 2018 16:36:06 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752005AbeF2GgG (ORCPT ); Fri, 29 Jun 2018 02:36:06 -0400 Received: from mail-lf0-f68.google.com ([209.85.215.68]:43710 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752971AbeF2GgF (ORCPT ); Fri, 29 Jun 2018 02:36:05 -0400 Received: by mail-lf0-f68.google.com with SMTP id m12-v6so5419494lfc.10 for ; Thu, 28 Jun 2018 23:36:05 -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:in-reply-to:references; bh=JzGB9UUqyttyRX4GgShbIk0AUl5RKamLiKlh82paATk=; b=Kx7J1yiLZKtPsPIvs//40dtdt4BOap2cax+R3j4AocYUuZ+V+kpWhVZ2uMuGkFNSvW yiHhUPVEqvLx0rj74hhB1unSw61hd+Yr+FtFrNbL1qlUsAr+poV5QIPPBQpcqFoWTm+W VPGQamZcgCPyx6q81AAU5w1710Hkew7wL2cd4= 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:in-reply-to :references; bh=JzGB9UUqyttyRX4GgShbIk0AUl5RKamLiKlh82paATk=; b=NWNoBsm0FgPizn5erVA68Dbt4ygxHu2UPKlZ+qskHDgVkSnqsPvtVW3x5vqnKJmzk4 OTvomzheSzW8eCQtltFgm1Btra6W4l9VamjK+/xdwKff7QoebwRD2uf/U8OLBwFK8eRc pyvcx37AZ/SqT1zI/fH82cTFoNUZs2P2yGko0LSDAEpUtbL2V3l/1lGy0Z2YIAdDgUNp 9mo5dKR47Rwp+3puitjLXdOhrZk5pZduDQkBvTmXS98IEtwFxSyTpi8pqhMeMsrzA1rJ 323pMJbfSNPdHcCiZC4W3vo3LOy9DGDiLvACx/pB8h8X3m/NO4FIk5znGnaRf3/fc+xS SiJA== X-Gm-Message-State: APt69E0Cd8d5o9XTJ/xSp8vjZAO2lDla5axQtbVePNRtjppow13nHpe0 IpQod+0qyWOhlUxPmaBBzF3UbaDYc9I= X-Google-Smtp-Source: AAOMgpdQOEMjL/LjdyuJQ4Kp7qqeO7kZvVIY7htYL8r7jU7hBhvq92u6kXP7jhb24AHwHB1CW1nnXA== X-Received: by 2002:a19:aac1:: with SMTP id t184-v6mr9364029lfe.65.1530254164199; Thu, 28 Jun 2018 23:36:04 -0700 (PDT) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id v2-v6sm1382162ljj.71.2018.06.28.23.36.02 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 28 Jun 2018 23:36:03 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org Cc: Linus Walleij , Bruno Randolf Subject: [PATCH 07/18] gpio: sch311x: Include the right header Date: Fri, 29 Jun 2018 08:35:33 +0200 Message-Id: <20180629063544.3826-7-linus.walleij@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180629063544.3826-1-linus.walleij@linaro.org> References: <20180629063544.3826-1-linus.walleij@linaro.org> Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org This is a GPIO driver, include only . Cc: Bruno Randolf Signed-off-by: Linus Walleij --- drivers/gpio/gpio-sch311x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/gpio-sch311x.c b/drivers/gpio/gpio-sch311x.c index b96990c262a1..8bc2bf45e5da 100644 --- a/drivers/gpio/gpio-sch311x.c +++ b/drivers/gpio/gpio-sch311x.c @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #include From patchwork Fri Jun 29 06:35:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 936635 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-gpio-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="BnAuaZZA"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 41H6Nn0klWz9s0w for ; Fri, 29 Jun 2018 16:36:09 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753194AbeF2GgI (ORCPT ); Fri, 29 Jun 2018 02:36:08 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:38114 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752967AbeF2GgI (ORCPT ); Fri, 29 Jun 2018 02:36:08 -0400 Received: by mail-lj1-f196.google.com with SMTP id v15-v6so6418299ljk.5 for ; Thu, 28 Jun 2018 23:36:07 -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:in-reply-to:references; bh=NHiT73881VoCIe0spKZcaEs+BUKhaLoQE9m3CtckF+U=; b=BnAuaZZAC/tr6q4wGe27OWk2wXwXgZuwGDVDlSm86hjMunL5/QaEDHVF/t7kqTd/qL v0gb/V0fAtczzgsPC5aCHSCVM1x5P6aL+dA6hrWFyLM3XuXazhPHl1Po/stDPw0mqwAJ RIqenpdHe6u9kLesR91aTUi+wDR3WlNU3bHe8= 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:in-reply-to :references; bh=NHiT73881VoCIe0spKZcaEs+BUKhaLoQE9m3CtckF+U=; b=pzK1Yy11WbgAFrwaJFO+vaU2bJqG3OIc5HvpEc84pFc3UcOBhzxHn647sQnO59+ZqL Wh5PWW5wuWlpmScUEb+a8lh8XFCYndTFZQVTSGHL4Sgu5qp8irFYcsZYpHvppQt5VFKC 05ufKtkRLnN7O3vjLMpXWauUanO9h87P5GTU3KdryPHKhYP7uCitVcDaeSYaYHcNe0NN LCgakDPK6V87/7Z71PV/0LE44g+cATOh3eSu/Jy3jw6pYQ/Hzjfuis18J4h6LaDh6zd1 hw+iqtk8f73tzUEA+l7SZ8Fbsl/NAyUMPjA7GTq7HS0BDdbHX6RFhbeGtcRZQb3Fkart mjQA== X-Gm-Message-State: APt69E3BugYQo7PSmjZz51oIpUc14hMIelmiCNJPThpEZ4M3lZKpdSsj g4QPymWCXXYGKAnFk9INRW/tQ6TT3Po= X-Google-Smtp-Source: ADUXVKLjZu/GHT0Xiow/e4wLSGbKL2Zki2qopU4mOdNpHPHZpy12/wnZhJzohLpyGmhLjASuW7Jrwg== X-Received: by 2002:a2e:1207:: with SMTP id t7-v6mr9502055lje.129.1530254166410; Thu, 28 Jun 2018 23:36:06 -0700 (PDT) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id v2-v6sm1382162ljj.71.2018.06.28.23.36.05 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 28 Jun 2018 23:36:05 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org Cc: Linus Walleij , Bruno Randolf Subject: [PATCH 08/18] gpio: sch311x: Implement .get_direction() Date: Fri, 29 Jun 2018 08:35:34 +0200 Message-Id: <20180629063544.3826-8-linus.walleij@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180629063544.3826-1-linus.walleij@linaro.org> References: <20180629063544.3826-1-linus.walleij@linaro.org> Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org It's pretty simple to implement the .get_direction() for this chip, so let's just do it. Cc: Bruno Randolf Signed-off-by: Linus Walleij --- drivers/gpio/gpio-sch311x.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/gpio/gpio-sch311x.c b/drivers/gpio/gpio-sch311x.c index 8bc2bf45e5da..ed64f7fa23b1 100644 --- a/drivers/gpio/gpio-sch311x.c +++ b/drivers/gpio/gpio-sch311x.c @@ -221,6 +221,18 @@ static int sch311x_gpio_direction_out(struct gpio_chip *chip, unsigned offset, return 0; } +static int sch311x_gpio_get_direction(struct gpio_chip *chip, unsigned offset) +{ + struct sch311x_gpio_block *block = gpiochip_get_data(chip); + unsigned char data; + + spin_lock(&block->lock); + data = inb(block->runtime_reg + block->config_regs[offset]); + spin_unlock(&block->lock); + + return !!(data & SCH311X_GPIO_CONF_IN); +} + static int sch311x_gpio_probe(struct platform_device *pdev) { struct sch311x_pdev_data *pdata = dev_get_platdata(&pdev->dev); @@ -253,6 +265,7 @@ static int sch311x_gpio_probe(struct platform_device *pdev) block->chip.free = sch311x_gpio_free; block->chip.direction_input = sch311x_gpio_direction_in; block->chip.direction_output = sch311x_gpio_direction_out; + block->chip.get_direction = sch311x_gpio_get_direction; block->chip.get = sch311x_gpio_get; block->chip.set = sch311x_gpio_set; block->chip.ngpio = 8; From patchwork Fri Jun 29 06:35:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 936636 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-gpio-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="XAkdyaN/"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 41H6Nq1c4Bz9s0w for ; Fri, 29 Jun 2018 16:36:11 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753211AbeF2GgK (ORCPT ); Fri, 29 Jun 2018 02:36:10 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:36784 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752971AbeF2GgK (ORCPT ); Fri, 29 Jun 2018 02:36:10 -0400 Received: by mail-lj1-f194.google.com with SMTP id o26-v6so6405231ljg.3 for ; Thu, 28 Jun 2018 23:36:09 -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:in-reply-to:references; bh=q85ETMV7uWzWnrx6g87lbPcFrUcB3P+KFmPAfKIywE0=; b=XAkdyaN/3Fgiz74JHpNy4gd+vkbFoeLXfs4dblxaCQIzHaik7h5ci15eWjWKvrkm7R JbGr4Ggvl4B6aXgig0snOSOqLYr1KhA/7gmr6Oti8xK17htpazfI5wr+0/iGxp5yRN9t 2cdQSl/K7hVodMiB4ghidySQSrmhpHd4U83s4= 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:in-reply-to :references; bh=q85ETMV7uWzWnrx6g87lbPcFrUcB3P+KFmPAfKIywE0=; b=AJWxd610gl8CC6bZz5xquNUamZCig+tz8vrDo+XySEHWXPYuQ2GQG6SeyBYCiblTnU d2wBWMFvHBTKI5IYjAKTnkhM+6cKoSVyhPDjZrleY0rqr7zrf7t6lQqWqpUIDsOAlAZI i4dH7odd8qgxYWezSFxV2XzqbMVgGB6x2NfT6W+Ab+QCeFQsMwN5XOzaD1QRodNXP7jf m2i6zERhhkzmBFnAMG6vsUumLv/yqRpES/Ga+idYEryRjIx5upuOykSDDdAANjqe60nn PqlNcHDLNT0+6nJUpgZ7c0AfpHv11H/P8XMGaYz2jsw9Sf3lxIZinoJMoLsRTU4UFlis J3CQ== X-Gm-Message-State: APt69E3nwBuzXYGDjIgPaFwD9nXQYl33Us/SYM99vFUCneVRDwWilzsI WBMOhSPOhejRP7T/3v6fdfSg31O+6sk= X-Google-Smtp-Source: AAOMgpdN9GEQjLRO5VMvWyz34T8VWuUtJrcCEynheU9QgVVnO0TokvQzKfDvem7pNcfj+4u1BcRiXw== X-Received: by 2002:a2e:20e8:: with SMTP id g101-v6mr8958833lji.100.1530254168399; Thu, 28 Jun 2018 23:36:08 -0700 (PDT) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id v2-v6sm1382162ljj.71.2018.06.28.23.36.07 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 28 Jun 2018 23:36:07 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org Cc: Linus Walleij , Bruno Randolf Subject: [PATCH 09/18] gpio: sch311x: Use RMW to change direction Date: Fri, 29 Jun 2018 08:35:35 +0200 Message-Id: <20180629063544.3826-9-linus.walleij@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180629063544.3826-1-linus.walleij@linaro.org> References: <20180629063544.3826-1-linus.walleij@linaro.org> Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Bit 0 in the config register obviously controls the direction of the GPIO so instead of hammering 0x0/0x1 into that register, use read-modify-write so that we can also alter the other bits in the register. Cc: Bruno Randolf Signed-off-by: Linus Walleij --- drivers/gpio/gpio-sch311x.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/drivers/gpio/gpio-sch311x.c b/drivers/gpio/gpio-sch311x.c index ed64f7fa23b1..faf44178f97b 100644 --- a/drivers/gpio/gpio-sch311x.c +++ b/drivers/gpio/gpio-sch311x.c @@ -23,10 +23,9 @@ #define DRV_NAME "gpio-sch311x" -#define SCH311X_GPIO_CONF_OUT 0x00 -#define SCH311X_GPIO_CONF_IN 0x01 -#define SCH311X_GPIO_CONF_INVERT 0x02 -#define SCH311X_GPIO_CONF_OPEN_DRAIN 0x80 +#define SCH311X_GPIO_CONF_DIR BIT(0) +#define SCH311X_GPIO_CONF_INVERT BIT(1) +#define SCH311X_GPIO_CONF_OPEN_DRAIN BIT(7) #define SIO_CONFIG_KEY_ENTER 0x55 #define SIO_CONFIG_KEY_EXIT 0xaa @@ -196,10 +195,12 @@ static void sch311x_gpio_set(struct gpio_chip *chip, unsigned offset, static int sch311x_gpio_direction_in(struct gpio_chip *chip, unsigned offset) { struct sch311x_gpio_block *block = gpiochip_get_data(chip); + unsigned char data; spin_lock(&block->lock); - outb(SCH311X_GPIO_CONF_IN, block->runtime_reg + - block->config_regs[offset]); + data = inb(block->runtime_reg + block->config_regs[offset]); + data |= SCH311X_GPIO_CONF_DIR; + outb(data, block->runtime_reg + block->config_regs[offset]); spin_unlock(&block->lock); return 0; @@ -209,12 +210,13 @@ static int sch311x_gpio_direction_out(struct gpio_chip *chip, unsigned offset, int value) { struct sch311x_gpio_block *block = gpiochip_get_data(chip); + unsigned char data; spin_lock(&block->lock); - outb(SCH311X_GPIO_CONF_OUT, block->runtime_reg + - block->config_regs[offset]); - + data = inb(block->runtime_reg + block->config_regs[offset]); + data &= ~SCH311X_GPIO_CONF_DIR; + outb(data, block->runtime_reg + block->config_regs[offset]); __sch311x_gpio_set(block, offset, value); spin_unlock(&block->lock); @@ -230,7 +232,7 @@ static int sch311x_gpio_get_direction(struct gpio_chip *chip, unsigned offset) data = inb(block->runtime_reg + block->config_regs[offset]); spin_unlock(&block->lock); - return !!(data & SCH311X_GPIO_CONF_IN); + return !!(data & SCH311X_GPIO_CONF_DIR); } static int sch311x_gpio_probe(struct platform_device *pdev) From patchwork Fri Jun 29 06:35:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 936637 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-gpio-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="V4931wUA"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 41H6Ns1X5Hz9s0w for ; Fri, 29 Jun 2018 16:36:13 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753210AbeF2GgM (ORCPT ); Fri, 29 Jun 2018 02:36:12 -0400 Received: from mail-lf0-f67.google.com ([209.85.215.67]:40722 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752967AbeF2GgM (ORCPT ); Fri, 29 Jun 2018 02:36:12 -0400 Received: by mail-lf0-f67.google.com with SMTP id y200-v6so393057lfd.7 for ; Thu, 28 Jun 2018 23:36:11 -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:in-reply-to:references; bh=aQfoR+RhUKpGn4Ycxl4mVEL313kBEXKoMhXpuY+kkVE=; b=V4931wUAnihGOPTehHrw2/Bm5Lp+y4tyBQvnvthikU6ATl55aDUmZKOYPAY0pk9Tw7 BSkWigBbOdT5r1Awm9j9BbUO7n6A1UH2xT6IiL7ak+1bUGx5J4CdJGuuRvFREC8eQu1d Dn6dN8Zthgr6JpNXGfaoKWC74xLpuMtp0eNxU= 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:in-reply-to :references; bh=aQfoR+RhUKpGn4Ycxl4mVEL313kBEXKoMhXpuY+kkVE=; b=GGb8ncZ+z77gQwTDg4/wSMR2dS6aIf5O0T5P9Npttz8q2vMS/6PonUKez33hV19o8t a3vbyT1aLccCiLUy5cAUUAP/6kujmS588SQ+1Pssg3ty5yJhn2GXuRtfNkogN/IxQsOC rVX8gEJHZCSBnqP6PhwE57xoKVzgu29o5SHtMwS9cTyTgrwqVlal6GaStwtNeVI7rb7T /u87kVF4hKrG/DwCAu2d2+4IpG/nhYSrZWm0Xc/HALosZ7zDrPbVJvUPq3duwiZx1f9F u0KPeSiLqY2cKOGA2gRrZYLofjZ5GF5jq95jzZ+xhw+dgw2RlTHM5TyYCv52o92ZeL5R gvhQ== X-Gm-Message-State: APt69E0eHr7FqMRCue/Ola9aefX1B7kBM8KRu2BN8nv1oVoHizdUAHQA uuz8US1PNMi37sh+cgGEVqV/22U/2fE= X-Google-Smtp-Source: AAOMgpdRcF7DVVcjwZyG0UfrQKibS83S+ozwJyK/a03c4zWi1td55PgUMZgcCn5nBAL20MEqcyo+zg== X-Received: by 2002:a19:1003:: with SMTP id f3-v6mr9235385lfi.116.1530254170527; Thu, 28 Jun 2018 23:36:10 -0700 (PDT) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id v2-v6sm1382162ljj.71.2018.06.28.23.36.09 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 28 Jun 2018 23:36:09 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org Cc: Linus Walleij , Bruno Randolf Subject: [PATCH 10/18] gpio: sch311x: Implement open drain support Date: Fri, 29 Jun 2018 08:35:36 +0200 Message-Id: <20180629063544.3826-10-linus.walleij@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180629063544.3826-1-linus.walleij@linaro.org> References: <20180629063544.3826-1-linus.walleij@linaro.org> Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org The chip has a bit for controlling open drain, and it is easy to implement the callback to support open drain when needed, so let's implement it. Cc: Bruno Randolf Signed-off-by: Linus Walleij --- drivers/gpio/gpio-sch311x.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/drivers/gpio/gpio-sch311x.c b/drivers/gpio/gpio-sch311x.c index faf44178f97b..1d2af9f97a91 100644 --- a/drivers/gpio/gpio-sch311x.c +++ b/drivers/gpio/gpio-sch311x.c @@ -235,6 +235,34 @@ static int sch311x_gpio_get_direction(struct gpio_chip *chip, unsigned offset) return !!(data & SCH311X_GPIO_CONF_DIR); } +static int sch311x_gpio_set_config(struct gpio_chip *chip, unsigned offset, + unsigned long config) +{ + struct sch311x_gpio_block *block = gpiochip_get_data(chip); + enum pin_config_param param = pinconf_to_config_param(config); + unsigned char data; + + switch (param) { + case PIN_CONFIG_DRIVE_OPEN_DRAIN: + spin_lock(&block->lock); + data = inb(block->runtime_reg + block->config_regs[offset]); + data |= SCH311X_GPIO_CONF_OPEN_DRAIN; + outb(data, block->runtime_reg + block->config_regs[offset]); + spin_unlock(&block->lock); + return 0; + case PIN_CONFIG_DRIVE_PUSH_PULL: + spin_lock(&block->lock); + data = inb(block->runtime_reg + block->config_regs[offset]); + data &= ~SCH311X_GPIO_CONF_OPEN_DRAIN; + outb(data, block->runtime_reg + block->config_regs[offset]); + spin_unlock(&block->lock); + return 0; + default: + break; + } + return -ENOTSUPP; +} + static int sch311x_gpio_probe(struct platform_device *pdev) { struct sch311x_pdev_data *pdata = dev_get_platdata(&pdev->dev); @@ -268,6 +296,7 @@ static int sch311x_gpio_probe(struct platform_device *pdev) block->chip.direction_input = sch311x_gpio_direction_in; block->chip.direction_output = sch311x_gpio_direction_out; block->chip.get_direction = sch311x_gpio_get_direction; + block->chip.set_config = sch311x_gpio_set_config; block->chip.get = sch311x_gpio_get; block->chip.set = sch311x_gpio_set; block->chip.ngpio = 8; From patchwork Fri Jun 29 06:35:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 936638 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-gpio-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="fmkqOJP6"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 41H6Nv2yxZz9s0w for ; Fri, 29 Jun 2018 16:36:15 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753235AbeF2GgO (ORCPT ); Fri, 29 Jun 2018 02:36:14 -0400 Received: from mail-lf0-f67.google.com ([209.85.215.67]:44389 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752967AbeF2GgO (ORCPT ); Fri, 29 Jun 2018 02:36:14 -0400 Received: by mail-lf0-f67.google.com with SMTP id j26-v6so5977205lfb.11 for ; Thu, 28 Jun 2018 23:36:13 -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:in-reply-to:references; bh=Ow/Eb9FQV+a/OCExCZ8x62pIhWOiVF0L5RzX9Hxu+d4=; b=fmkqOJP6m5JRboqOYef4UeMT7jKra3NW92/5JOrrNfDzorfoAmH+ihPT2NFAxddl6G 9CQS0Je8s3e1Dep2AbzyPNs4fkcMcByXvQ4VvErUHp9DSsB70L0Kzvtdzv9BQTxQYrdy 9tsjAtklzws199X5CgxWMwgMTMKfooPGPXodw= 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:in-reply-to :references; bh=Ow/Eb9FQV+a/OCExCZ8x62pIhWOiVF0L5RzX9Hxu+d4=; b=RKrQqn4gGCLVz6IA+bUwhUt7358VcdRPG0ueKyJQD2ry8QcuMcIjMnzsFm/Xs60XRj bTzb4pOhgZ4/9uPexF7O6espfYyVQNpx9DLyBzbNDG7oM1Ls+3GVOCwKAubC/4TDQz/O o5pYjGapVxJq5R6bsT5CjWw/x9iZGRCJp/WR2KEX4BndSwNgwL0B4yQCWJ5960IUwTJS msg6K0y8SFjXqIFyDqbtBXv1MqGgFUy9E/79/2EK7bcLzqHhzIObwk8eBVVjbAeCr0He /+o4B4z+xUtd3cqgkQqRjAHZ8PltIuFo4xZJ6R31w+kTWfnH4CEa2hnLLLR+c4ifniGF tZWA== X-Gm-Message-State: APt69E0ddI1HBjbR2OtDsDUfbmL2A+VQya09b+eqECYxcE+rMYJBxjYf 32sirsjBJ0pY16Qvw4ofd/ctG0UEFeg= X-Google-Smtp-Source: AAOMgpdrTpsLgSSEiwPrtSmOIUeymZ9XeVG5Ywolcp4C+hHO/g6A4R2qeBVKzUmA+T0puc7fiTFkWA== X-Received: by 2002:a19:5d54:: with SMTP id p20-v6mr8558986lfj.143.1530254172769; Thu, 28 Jun 2018 23:36:12 -0700 (PDT) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id v2-v6sm1382162ljj.71.2018.06.28.23.36.11 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 28 Jun 2018 23:36:11 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org Cc: Linus Walleij , Bruno Randolf Subject: [PATCH 11/18] gpio: sch311x: Replace unsigned char with u8 Date: Fri, 29 Jun 2018 08:35:37 +0200 Message-Id: <20180629063544.3826-11-linus.walleij@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180629063544.3826-1-linus.walleij@linaro.org> References: <20180629063544.3826-1-linus.walleij@linaro.org> Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org This purely syntactic change switches unsigned char to u8 in the driver. Cc: Bruno Randolf Signed-off-by: Linus Walleij --- drivers/gpio/gpio-sch311x.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/gpio/gpio-sch311x.c b/drivers/gpio/gpio-sch311x.c index 1d2af9f97a91..5497f0a88cf0 100644 --- a/drivers/gpio/gpio-sch311x.c +++ b/drivers/gpio/gpio-sch311x.c @@ -162,7 +162,7 @@ static void sch311x_gpio_free(struct gpio_chip *chip, unsigned offset) static int sch311x_gpio_get(struct gpio_chip *chip, unsigned offset) { struct sch311x_gpio_block *block = gpiochip_get_data(chip); - unsigned char data; + u8 data; spin_lock(&block->lock); data = inb(block->runtime_reg + block->data_reg); @@ -174,7 +174,7 @@ static int sch311x_gpio_get(struct gpio_chip *chip, unsigned offset) static void __sch311x_gpio_set(struct sch311x_gpio_block *block, unsigned offset, int value) { - unsigned char data = inb(block->runtime_reg + block->data_reg); + u8 data = inb(block->runtime_reg + block->data_reg); if (value) data |= BIT(offset); else @@ -195,7 +195,7 @@ static void sch311x_gpio_set(struct gpio_chip *chip, unsigned offset, static int sch311x_gpio_direction_in(struct gpio_chip *chip, unsigned offset) { struct sch311x_gpio_block *block = gpiochip_get_data(chip); - unsigned char data; + u8 data; spin_lock(&block->lock); data = inb(block->runtime_reg + block->config_regs[offset]); @@ -210,7 +210,7 @@ static int sch311x_gpio_direction_out(struct gpio_chip *chip, unsigned offset, int value) { struct sch311x_gpio_block *block = gpiochip_get_data(chip); - unsigned char data; + u8 data; spin_lock(&block->lock); @@ -226,7 +226,7 @@ static int sch311x_gpio_direction_out(struct gpio_chip *chip, unsigned offset, static int sch311x_gpio_get_direction(struct gpio_chip *chip, unsigned offset) { struct sch311x_gpio_block *block = gpiochip_get_data(chip); - unsigned char data; + u8 data; spin_lock(&block->lock); data = inb(block->runtime_reg + block->config_regs[offset]); @@ -240,7 +240,7 @@ static int sch311x_gpio_set_config(struct gpio_chip *chip, unsigned offset, { struct sch311x_gpio_block *block = gpiochip_get_data(chip); enum pin_config_param param = pinconf_to_config_param(config); - unsigned char data; + u8 data; switch (param) { case PIN_CONFIG_DRIVE_OPEN_DRAIN: @@ -353,7 +353,7 @@ static int __init sch311x_detect(int sio_config_port, unsigned short *addr) { int err = 0, reg; unsigned short base_addr; - unsigned char dev_id; + u8 dev_id; err = sch311x_sio_enter(sio_config_port); if (err) From patchwork Fri Jun 29 06:35:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 936639 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-gpio-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="jffRt2sX"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 41H6Nx3jS9z9s0w for ; Fri, 29 Jun 2018 16:36:17 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753218AbeF2GgR (ORCPT ); Fri, 29 Jun 2018 02:36:17 -0400 Received: from mail-lf0-f67.google.com ([209.85.215.67]:34852 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752967AbeF2GgQ (ORCPT ); Fri, 29 Jun 2018 02:36:16 -0400 Received: by mail-lf0-f67.google.com with SMTP id i15-v6so5983729lfc.2 for ; Thu, 28 Jun 2018 23:36:15 -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:in-reply-to:references; bh=o2zKm6x3zz/Y5Eer0S7pT43ycvtIhMjDbrLHqe+w7K4=; b=jffRt2sXtOmpBhNoktoFR1UAgkj6Pa5kKAzWBeDLjn8pz3DgQM2NY71HbVK1YjFCHH TDdH/lvQEYXiXHDDSaf8QMzXQJoK/rIZ5KcxKpySCjGldqpc6aQT0ByRmtqbXRGvzBis sOhClXiPWhdNQ2NZ3RmPk0Mo0mg4JuqG7nJtY= 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:in-reply-to :references; bh=o2zKm6x3zz/Y5Eer0S7pT43ycvtIhMjDbrLHqe+w7K4=; b=CM5QvHdRA2D1jKgrRVtFJHPuBq6yoHOdc7s/79rjFdn7o/6WNrG0ngmLl4+c2D5PyA vPKlR+MI25Q/X15ipTQQ+z6dEjB3Km+CLj76KiTvxYF3XEE5Z//LZa8+pjM721HAdG2/ lbSCobpF8s5OVz1/b+ELvsqn/m5NvLkmBNC1u7OQO9rBJn72Zrc5ottrlmjJeydBAsUN YFsu+TkkNwFKY+sdt/bKMhIgJVoqbNFES4SBmEryHwQT9+TmBgGsu/n+U5A1FanjieFx rxLH92lCj39jgxJIt+vh8RAb+PvLogqVALOGeOLq37cfes+NY+142dbioBi8u1jA9YoT Gu5w== X-Gm-Message-State: APt69E2qNvYnj6LKkbjVB7TFyeBDEiquzDv+zx7zjsaqjZ6sE9TkhmD0 v59O9PhzbIB76AgoBGMsUtZF1C7Ug6U= X-Google-Smtp-Source: AAOMgpcxLBvn05l9Rea3F/C/K5REXUWHbalXxaF5BNQCZgKAuIroSZf2ffJOp9VHe9XKqA4o70EpPQ== X-Received: by 2002:a19:a947:: with SMTP id s68-v6mr9227015lfe.70.1530254174882; Thu, 28 Jun 2018 23:36:14 -0700 (PDT) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id v2-v6sm1382162ljj.71.2018.06.28.23.36.13 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 28 Jun 2018 23:36:13 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org Cc: Linus Walleij Subject: [PATCH 12/18] gpio: spear-spics: Include the right header Date: Fri, 29 Jun 2018 08:35:38 +0200 Message-Id: <20180629063544.3826-12-linus.walleij@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180629063544.3826-1-linus.walleij@linaro.org> References: <20180629063544.3826-1-linus.walleij@linaro.org> Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org This is a GPIO driver, include only . Signed-off-by: Linus Walleij --- drivers/gpio/gpio-spear-spics.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/gpio-spear-spics.c b/drivers/gpio/gpio-spear-spics.c index 22267479ba68..ee3039f091f4 100644 --- a/drivers/gpio/gpio-spear-spics.c +++ b/drivers/gpio/gpio-spear-spics.c @@ -10,7 +10,7 @@ */ #include -#include +#include #include #include #include From patchwork Fri Jun 29 06:35:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 936640 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-gpio-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="cl2iu4mO"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 41H6Nz5Tgrz9s0n for ; Fri, 29 Jun 2018 16:36:19 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753224AbeF2GgT (ORCPT ); Fri, 29 Jun 2018 02:36:19 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:39182 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752967AbeF2GgS (ORCPT ); Fri, 29 Jun 2018 02:36:18 -0400 Received: by mail-lj1-f194.google.com with SMTP id t7-v6so6403894ljj.6 for ; Thu, 28 Jun 2018 23:36:18 -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:in-reply-to:references; bh=v5tO4G6vuRJ/4q+bpmthJEAbkAhDmz2Wpo1H9rG5VeY=; b=cl2iu4mODmWtdN4EI2TlILMTHOrABNw7wBg8OdARCBZymENIbaUIeW8a/VvRErpYfE DbdfsS3322zT8C9YcHZMvliRVNARqHwbsFZRx7bbNJ/hztHpbl8EAuWFjlM8aapYs56j /qSbkLczlZPeJIc1YUp9J+CEjuJasNnHnw7HE= 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:in-reply-to :references; bh=v5tO4G6vuRJ/4q+bpmthJEAbkAhDmz2Wpo1H9rG5VeY=; b=jFWSIJWIGx1MqakojDcXjzln22MCaeLABGiraU3kjMKPb8vHbiqgZ05GLbb9cOMk2q YFDsMmHdpGzK5fBqODI7j8rwVkMKtfF0QncwhsZ38RjcHr0e3bPPQgs/5j1qKbUpzb6y V2F27+TP3eEm5bcC/aGosBE+jKm6UtQzENOUqYuRRQeOpvTus93U9xUACeLZLyGStBE2 EwMsmPWBKadR+zRz7oOYR2HKUbRorAoWIcSII+UJSlnBX4Qw8Kl9HoU2oL4ZsFV8zMIB jsd3ERNpjO3pK75/z5awdqHbOZHhF4v2T1Muf64ThGQcRuPjNO5tWLrcbIyzBS4RrRP9 4xjQ== X-Gm-Message-State: APt69E05k5gqbA/pFLMPAjYsbr330nygBOZIKezmtrDeZZ++35obfnpa OjK0tJ0Fodb5+RLwJHyDl9JAMyO8ahw= X-Google-Smtp-Source: AAOMgpco8W5Lo/6/7sxC1Oh2ADV+NE0uZMZNYfYQxLyaQFOf3QT7uk+OnYhFAEf36VWH6/VPNYvHzQ== X-Received: by 2002:a2e:4d9d:: with SMTP id c29-v6mr7288566ljd.132.1530254177160; Thu, 28 Jun 2018 23:36:17 -0700 (PDT) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id v2-v6sm1382162ljj.71.2018.06.28.23.36.15 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 28 Jun 2018 23:36:16 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org Cc: Linus Walleij , Alessandro Rubini , Bartosz Golaszewski Subject: [PATCH 13/18] gpio: sta2x11: Include the right header Date: Fri, 29 Jun 2018 08:35:39 +0200 Message-Id: <20180629063544.3826-13-linus.walleij@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180629063544.3826-1-linus.walleij@linaro.org> References: <20180629063544.3826-1-linus.walleij@linaro.org> Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org This is a GPIO driver, include only . Cc: Alessandro Rubini Cc: Bartosz Golaszewski Signed-off-by: Linus Walleij Acked-by: Alessandro Rubini --- drivers/gpio/gpio-sta2x11.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/gpio-sta2x11.c b/drivers/gpio/gpio-sta2x11.c index 407359da08f9..16e7f18f8f42 100644 --- a/drivers/gpio/gpio-sta2x11.c +++ b/drivers/gpio/gpio-sta2x11.c @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include #include From patchwork Fri Jun 29 06:35:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 936641 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-gpio-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="HnDA63bE"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 41H6P16sd5z9s0n for ; Fri, 29 Jun 2018 16:36:21 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753253AbeF2GgV (ORCPT ); Fri, 29 Jun 2018 02:36:21 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:41030 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752967AbeF2GgU (ORCPT ); Fri, 29 Jun 2018 02:36:20 -0400 Received: by mail-lj1-f196.google.com with SMTP id a17-v6so3294287ljd.8 for ; Thu, 28 Jun 2018 23:36:20 -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:in-reply-to:references; bh=fO5sC5aCDJdUU4ULKaFHhAh//Cu0wPaaprT2QaIQrDE=; b=HnDA63bEKNberAlewaEY84sVsgz8BkN7bmJ9UBO3TXT1r7yE/RlK0rqxhx6HZwz3U+ /yrmB09HvFP+4HP+QvgP/xZC/YRpOBdWTipJWpW/CTAQMHCpPXVo6US+zBlkjG6ocCgD u8VWuSqEyGmFMsjwrcQzHg7Y/a8xKO6jtIKLU= 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:in-reply-to :references; bh=fO5sC5aCDJdUU4ULKaFHhAh//Cu0wPaaprT2QaIQrDE=; b=lZYiKlmX8ErgatwlUT4Vrm7e7ZQoCSJUZpYYYYYAlacYaYiGlYUj0r6FAVi8A1tfb4 5SR+N6QIx/Iqoha7LT/xXFzjAOi+ooiANurl61y50W1T4g5SrTieSnTqTGI4H8WjF3GE 81iSQ6JtADBuPXkY098mC7jp9PFxiib9+oy78HdiyT4jWWKsZEkx3uOUkmhvG0MlcjcD EXR5sFeqY8SatYtX9G9kSLDd/WjX8TUf3JRyaF2jBlTqeam4DevzwxHmN6raCALoiZrq XnTczjpnzMUVjDYs89UdyxWbbcfPnYPdTko4cAmbOxisW+w4IGj7vcx2N7O/2q1DAEzZ fGqg== X-Gm-Message-State: APt69E1AOcKwSKEzArG4K48hewbLsqlzIgK7xYH6PmFznf4SMVfIM4Nw 1sKf+iP0WKeOSQxbqyQKz3ASOUcFGFw= X-Google-Smtp-Source: AAOMgpc0pOchcnPvZZgjICFpB+vIUjA467VUsp/89DyxMmXD8jElgKnag8FUwMYQE9qm41XYP4OitQ== X-Received: by 2002:a2e:7d10:: with SMTP id y16-v6mr3897681ljc.29.1530254179192; Thu, 28 Jun 2018 23:36:19 -0700 (PDT) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id v2-v6sm1382162ljj.71.2018.06.28.23.36.17 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 28 Jun 2018 23:36:18 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org Cc: Linus Walleij , Alessandro Rubini , Bartosz Golaszewski Subject: [PATCH 14/18] gpio: sta2x11: Use BIT() macro Date: Fri, 29 Jun 2018 08:35:40 +0200 Message-Id: <20180629063544.3826-14-linus.walleij@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180629063544.3826-1-linus.walleij@linaro.org> References: <20180629063544.3826-1-linus.walleij@linaro.org> Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org This removes the custom implementation of the BIT() macro and inlines all calls to the helper. Cc: Alessandro Rubini Cc: Bartosz Golaszewski Signed-off-by: Linus Walleij Acked-by: Alessandro Rubini --- drivers/gpio/gpio-sta2x11.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/drivers/gpio/gpio-sta2x11.c b/drivers/gpio/gpio-sta2x11.c index 16e7f18f8f42..4af90968e838 100644 --- a/drivers/gpio/gpio-sta2x11.c +++ b/drivers/gpio/gpio-sta2x11.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -63,11 +64,6 @@ static inline struct gsta_regs __iomem *__regs(struct gsta_gpio *chip, int nr) return chip->regs[nr / GSTA_GPIO_PER_BLOCK]; } -static inline u32 __bit(int nr) -{ - return 1U << (nr % GSTA_GPIO_PER_BLOCK); -} - /* * gpio methods */ @@ -76,7 +72,7 @@ static void gsta_gpio_set(struct gpio_chip *gpio, unsigned nr, int val) { struct gsta_gpio *chip = gpiochip_get_data(gpio); struct gsta_regs __iomem *regs = __regs(chip, nr); - u32 bit = __bit(nr); + u32 bit = BIT(nr % GSTA_GPIO_PER_BLOCK); if (val) writel(bit, ®s->dats); @@ -88,7 +84,7 @@ static int gsta_gpio_get(struct gpio_chip *gpio, unsigned nr) { struct gsta_gpio *chip = gpiochip_get_data(gpio); struct gsta_regs __iomem *regs = __regs(chip, nr); - u32 bit = __bit(nr); + u32 bit = BIT(nr % GSTA_GPIO_PER_BLOCK); return !!(readl(®s->dat) & bit); } @@ -98,7 +94,7 @@ static int gsta_gpio_direction_output(struct gpio_chip *gpio, unsigned nr, { struct gsta_gpio *chip = gpiochip_get_data(gpio); struct gsta_regs __iomem *regs = __regs(chip, nr); - u32 bit = __bit(nr); + u32 bit = BIT(nr % GSTA_GPIO_PER_BLOCK); writel(bit, ®s->dirs); /* Data register after direction, otherwise pullup/down is selected */ @@ -113,7 +109,7 @@ static int gsta_gpio_direction_input(struct gpio_chip *gpio, unsigned nr) { struct gsta_gpio *chip = gpiochip_get_data(gpio); struct gsta_regs __iomem *regs = __regs(chip, nr); - u32 bit = __bit(nr); + u32 bit = BIT(nr % GSTA_GPIO_PER_BLOCK); writel(bit, ®s->dirc); return 0; @@ -167,7 +163,7 @@ static void gsta_set_config(struct gsta_gpio *chip, int nr, unsigned cfg) { struct gsta_regs __iomem *regs = __regs(chip, nr); unsigned long flags; - u32 bit = __bit(nr); + u32 bit = BIT(nr % GSTA_GPIO_PER_BLOCK); u32 val; int err = 0; @@ -235,7 +231,7 @@ static void gsta_irq_disable(struct irq_data *data) struct gsta_gpio *chip = gc->private; int nr = data->irq - chip->irq_base; struct gsta_regs __iomem *regs = __regs(chip, nr); - u32 bit = __bit(nr); + u32 bit = BIT(nr % GSTA_GPIO_PER_BLOCK); u32 val; unsigned long flags; @@ -258,7 +254,7 @@ static void gsta_irq_enable(struct irq_data *data) struct gsta_gpio *chip = gc->private; int nr = data->irq - chip->irq_base; struct gsta_regs __iomem *regs = __regs(chip, nr); - u32 bit = __bit(nr); + u32 bit = BIT(nr % GSTA_GPIO_PER_BLOCK); u32 val; int type; unsigned long flags; From patchwork Fri Jun 29 06:35:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 936642 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-gpio-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="GP7gLTRc"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 41H6P439LTz9s0n for ; Fri, 29 Jun 2018 16:36:24 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753261AbeF2GgX (ORCPT ); Fri, 29 Jun 2018 02:36:23 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:33911 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752967AbeF2GgX (ORCPT ); Fri, 29 Jun 2018 02:36:23 -0400 Received: by mail-lj1-f194.google.com with SMTP id l12-v6so6426432lja.1 for ; Thu, 28 Jun 2018 23:36:22 -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:in-reply-to:references; bh=a9ANTWX9cQYK2wSWMSEPRSJVL9id7DTDSn22l/2dqvQ=; b=GP7gLTRctfb6cKiO+SyJM8JfpjrvCE3u77mZDb5BKh0CtyFW98qN6RlVj8TUSekglS Us0YoHr18eotiov+G4k/kr+sNnpvqCAx8LtKMf75ULmA20jVX3M2NAYEwshFl/Bgg6tz ddQjNsAoWNU+ZWNrxJ2O2mQ0YId+ReVR76qBQ= 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:in-reply-to :references; bh=a9ANTWX9cQYK2wSWMSEPRSJVL9id7DTDSn22l/2dqvQ=; b=d3y5ZeWcPuPoqh+teICcFGwfQlu73mvqxyPuOHBnEmshP+a397zaTFG61RWQhU3X6T jOSL7GQiQ1HLaIWN/VppNqnM2HwFrSwdCX+a0jbBb282udCvgknAHvGYzxMWfcuDuvCU kRdFlNl28LKVEdwKFS87U6wjxn37X2/xAAmQaEwI5+M6bPY0x5onlMyhI6yW6CDbea/X w9t5Qy7XwYYita7iQrjKtbzj10wzx/F0FwYU9WBdIR3g/dELJMoOc+4J2ROYxtEDSOxk qMIlc5bPCELbYUyBF2j7I4nKZUhEVrwyishXVIKBBoYTJZzi+xeEwJkRvVZfHlpKZs9R 2CJg== X-Gm-Message-State: APt69E1feE6zdmj4JLnIQKP+6jk4urdgyaYf5ezlsNLIVsOTlGJ6t8hl ysTIPJX/dcrvCH6sO9z/Jd82v5g2l6A= X-Google-Smtp-Source: AAOMgpf7HKQLkbLfKHWfm01zfZ2/4n2QXeiF+7tK5K4PHNemYR4F3c2VNUbJpuVNkPefhtfJHhQssw== X-Received: by 2002:a2e:141e:: with SMTP id u30-v6mr9492398ljd.134.1530254181470; Thu, 28 Jun 2018 23:36:21 -0700 (PDT) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id v2-v6sm1382162ljj.71.2018.06.28.23.36.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 28 Jun 2018 23:36:20 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org Cc: Linus Walleij , Alessandro Rubini , Bartosz Golaszewski Subject: [PATCH 15/18] gpio: sta2x11: Inline regs macro Date: Fri, 29 Jun 2018 08:35:41 +0200 Message-Id: <20180629063544.3826-15-linus.walleij@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180629063544.3826-1-linus.walleij@linaro.org> References: <20180629063544.3826-1-linus.walleij@linaro.org> Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org I don't like the __namespace and this is simple enough to just inline at all sites. Cc: Alessandro Rubini Cc: Bartosz Golaszewski Signed-off-by: Linus Walleij Acked-by: Alessandro Rubini --- drivers/gpio/gpio-sta2x11.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/drivers/gpio/gpio-sta2x11.c b/drivers/gpio/gpio-sta2x11.c index 4af90968e838..2283c869ad5d 100644 --- a/drivers/gpio/gpio-sta2x11.c +++ b/drivers/gpio/gpio-sta2x11.c @@ -59,11 +59,6 @@ struct gsta_gpio { unsigned irq_type[GSTA_NR_GPIO]; }; -static inline struct gsta_regs __iomem *__regs(struct gsta_gpio *chip, int nr) -{ - return chip->regs[nr / GSTA_GPIO_PER_BLOCK]; -} - /* * gpio methods */ @@ -71,7 +66,7 @@ static inline struct gsta_regs __iomem *__regs(struct gsta_gpio *chip, int nr) static void gsta_gpio_set(struct gpio_chip *gpio, unsigned nr, int val) { struct gsta_gpio *chip = gpiochip_get_data(gpio); - struct gsta_regs __iomem *regs = __regs(chip, nr); + struct gsta_regs __iomem *regs = chip->regs[nr / GSTA_GPIO_PER_BLOCK]; u32 bit = BIT(nr % GSTA_GPIO_PER_BLOCK); if (val) @@ -83,7 +78,7 @@ static void gsta_gpio_set(struct gpio_chip *gpio, unsigned nr, int val) static int gsta_gpio_get(struct gpio_chip *gpio, unsigned nr) { struct gsta_gpio *chip = gpiochip_get_data(gpio); - struct gsta_regs __iomem *regs = __regs(chip, nr); + struct gsta_regs __iomem *regs = chip->regs[nr / GSTA_GPIO_PER_BLOCK]; u32 bit = BIT(nr % GSTA_GPIO_PER_BLOCK); return !!(readl(®s->dat) & bit); @@ -93,7 +88,7 @@ static int gsta_gpio_direction_output(struct gpio_chip *gpio, unsigned nr, int val) { struct gsta_gpio *chip = gpiochip_get_data(gpio); - struct gsta_regs __iomem *regs = __regs(chip, nr); + struct gsta_regs __iomem *regs = chip->regs[nr / GSTA_GPIO_PER_BLOCK]; u32 bit = BIT(nr % GSTA_GPIO_PER_BLOCK); writel(bit, ®s->dirs); @@ -108,7 +103,7 @@ static int gsta_gpio_direction_output(struct gpio_chip *gpio, unsigned nr, static int gsta_gpio_direction_input(struct gpio_chip *gpio, unsigned nr) { struct gsta_gpio *chip = gpiochip_get_data(gpio); - struct gsta_regs __iomem *regs = __regs(chip, nr); + struct gsta_regs __iomem *regs = chip->regs[nr / GSTA_GPIO_PER_BLOCK]; u32 bit = BIT(nr % GSTA_GPIO_PER_BLOCK); writel(bit, ®s->dirc); @@ -161,7 +156,7 @@ static void gsta_gpio_setup(struct gsta_gpio *chip) /* called from probe */ */ static void gsta_set_config(struct gsta_gpio *chip, int nr, unsigned cfg) { - struct gsta_regs __iomem *regs = __regs(chip, nr); + struct gsta_regs __iomem *regs = chip->regs[nr / GSTA_GPIO_PER_BLOCK]; unsigned long flags; u32 bit = BIT(nr % GSTA_GPIO_PER_BLOCK); u32 val; @@ -230,7 +225,7 @@ static void gsta_irq_disable(struct irq_data *data) struct irq_chip_generic *gc = irq_data_get_irq_chip_data(data); struct gsta_gpio *chip = gc->private; int nr = data->irq - chip->irq_base; - struct gsta_regs __iomem *regs = __regs(chip, nr); + struct gsta_regs __iomem *regs = chip->regs[nr / GSTA_GPIO_PER_BLOCK]; u32 bit = BIT(nr % GSTA_GPIO_PER_BLOCK); u32 val; unsigned long flags; @@ -253,7 +248,7 @@ static void gsta_irq_enable(struct irq_data *data) struct irq_chip_generic *gc = irq_data_get_irq_chip_data(data); struct gsta_gpio *chip = gc->private; int nr = data->irq - chip->irq_base; - struct gsta_regs __iomem *regs = __regs(chip, nr); + struct gsta_regs __iomem *regs = chip->regs[nr / GSTA_GPIO_PER_BLOCK]; u32 bit = BIT(nr % GSTA_GPIO_PER_BLOCK); u32 val; int type; From patchwork Fri Jun 29 06:35:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 936643 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-gpio-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="KSdMbEpA"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 41H6P634PNz9s0n for ; Fri, 29 Jun 2018 16:36:26 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753294AbeF2GgZ (ORCPT ); Fri, 29 Jun 2018 02:36:25 -0400 Received: from mail-lj1-f195.google.com ([209.85.208.195]:40727 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752967AbeF2GgZ (ORCPT ); Fri, 29 Jun 2018 02:36:25 -0400 Received: by mail-lj1-f195.google.com with SMTP id a6-v6so6410522ljj.7 for ; Thu, 28 Jun 2018 23:36:24 -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:in-reply-to:references; bh=hIHENYgelD5lyXMwlx/9PsL2oAQXnlI/tG5SQDVQW5o=; b=KSdMbEpAFQ7k8phE3VN7CVC08s1Oz6I9I1h6qhAvUwHCYF8yge2Gk4rsj2wKxKhulG nUwMarZNjXMEoXTKXjipcJO24wDnxALKLUQNTPo1WWhoS1d91vQSluYMEoSGIqqjx9cD yQq63WsSqgiSMM7q8pjOAiFq25RYvqBaAgwCc= 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:in-reply-to :references; bh=hIHENYgelD5lyXMwlx/9PsL2oAQXnlI/tG5SQDVQW5o=; b=VpxW/QoG3NLe2fFgqtJuZt/xPLaHEFqR90LsXpRrhX+3WdqyklR0QQlotWiiKIcXna 5MjmXnCwbDSOpjBb2lmtEMkjFYciY95B/vxUu3H9Tlp5pPZQSfeKfrn5u/xMdhAozEjU n1H0p42O6Zkq/R1JsztJxALDgflFbPH/tTrRQOV622NN2MlFp84JyybOchtoY7B8weOD ZxD/UVpJ/uVtLF5BWOwxqDw7RMGmTlC/Yjd+Y3pFTZbBEEHLRKZTPF8Juui8dBF2yW1N SFccMuNShgzQTOCoHG2CWZs7gCz3t9tPtiE3k6lsgCN/UHOvlxdBnJTBFrA36iwA/1Uv Tc9A== X-Gm-Message-State: APt69E0ABV31AUiVPNaFmDoQMIO18zv7sj2eKBSQ548Zp8O1N2oTD9MI G2r35YC8qVwkUvAle1u5dxluRfAxrGQ= X-Google-Smtp-Source: AAOMgpdgtMMSeDDbYY1EMO6Z1jE8jRqDlTbMbhxeZYkeZ15VhHHAMDqqBH/maXTemeqyEpMILX6qsA== X-Received: by 2002:a2e:9c82:: with SMTP id x2-v6mr2346335lji.131.1530254183783; Thu, 28 Jun 2018 23:36:23 -0700 (PDT) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id v2-v6sm1382162ljj.71.2018.06.28.23.36.22 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 28 Jun 2018 23:36:22 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org Cc: Linus Walleij Subject: [PATCH 16/18] gpio: stmpe: Include the right header Date: Fri, 29 Jun 2018 08:35:42 +0200 Message-Id: <20180629063544.3826-16-linus.walleij@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180629063544.3826-1-linus.walleij@linaro.org> References: <20180629063544.3826-1-linus.walleij@linaro.org> Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org This is a GPIO driver, include only . Signed-off-by: Linus Walleij --- drivers/gpio/gpio-stmpe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/gpio-stmpe.c b/drivers/gpio/gpio-stmpe.c index 8d6a5a7e612d..65a2315f1673 100644 --- a/drivers/gpio/gpio-stmpe.c +++ b/drivers/gpio/gpio-stmpe.c @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include #include From patchwork Fri Jun 29 06:35:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 936644 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-gpio-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="UEcYeX8j"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 41H6P82d9Tz9s0n for ; Fri, 29 Jun 2018 16:36:28 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752967AbeF2Gg1 (ORCPT ); Fri, 29 Jun 2018 02:36:27 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:43957 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753295AbeF2Gg1 (ORCPT ); Fri, 29 Jun 2018 02:36:27 -0400 Received: by mail-lj1-f196.google.com with SMTP id h2-v6so3166506ljb.10 for ; Thu, 28 Jun 2018 23:36:26 -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:in-reply-to:references; bh=Je3XYN3MYxcgmM83pSUG/75H+71briU72Xp0dqfJOXc=; b=UEcYeX8j4pZEevYpz2BTsxy3MxA6ZBAdG6fNsBgqKXhLuwsFTs9mYuroOtPlv72a9X ztpsYzLrK8hWeV506lAFXN4iHbKpNZ0uQGgiof5xK7syx7rVU6xBQ6vpo4l/j3vUtF0j hNuXb2k1sKc6sC5e2jwsMF4qA17+z2YVGy0dc= 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:in-reply-to :references; bh=Je3XYN3MYxcgmM83pSUG/75H+71briU72Xp0dqfJOXc=; b=WPqPQzHoTmST/WVuvO9u+Tz8CTWHNJ98fgGPLjXKftXqliw28ysgpffpyTWED3Xk6n sIWnzF/MG1Czlu6C1Icue4SMSZLsn0UT0xwbcGy3fhzm5vtTR7Uhz/BO2UDhwG3KLfCE lra0a0JLUD7i3c4jlQQepV0RWRBfK0CrfbETVBQu6Js/PKHQMJUwG0mlw+F7UoUso0PA 6rv0sOdrPjRXrKGzaLUIYCjftTIwVuoMA025A6XCJWOxR/qi4vZ6f47WwD9sjSa2M0/t suAEF33Ahd0f5zuzQSII1EJafV7fvkdIeziIz+9lx/DngAtpqY9vLIm+eZvvAKXtNaos Zolg== X-Gm-Message-State: APt69E3ge0nF5e2veVnQUrCwbU/38WzwAiZczQaB0u63CVctuoZts1Cs TG1rI6318OSBnO5NS7zOcQvvPGMLxj4= X-Google-Smtp-Source: AAOMgpfuqCJSpAL3bYKlAQN0G79Age/Sr503KtaYGdefkZxyDHA7reQrg7pigU1nIAciM1o4/H/KbQ== X-Received: by 2002:a2e:1bcc:: with SMTP id c73-v6mr1312784ljf.0.1530254185867; Thu, 28 Jun 2018 23:36:25 -0700 (PDT) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id v2-v6sm1382162ljj.71.2018.06.28.23.36.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 28 Jun 2018 23:36:24 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org Cc: Linus Walleij Subject: [PATCH 17/18] gpio: stp-xway: Include the right header Date: Fri, 29 Jun 2018 08:35:43 +0200 Message-Id: <20180629063544.3826-17-linus.walleij@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180629063544.3826-1-linus.walleij@linaro.org> References: <20180629063544.3826-1-linus.walleij@linaro.org> Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org This is a GPIO driver, include only . Signed-off-by: Linus Walleij --- drivers/gpio/gpio-stp-xway.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpio/gpio-stp-xway.c b/drivers/gpio/gpio-stp-xway.c index c07385b71403..3e597109e96b 100644 --- a/drivers/gpio/gpio-stp-xway.c +++ b/drivers/gpio/gpio-stp-xway.c @@ -13,9 +13,8 @@ #include #include #include -#include +#include #include -#include #include #include From patchwork Fri Jun 29 06:35:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 936645 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-gpio-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="SvAM/BGf"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 41H6PB4SKQz9s0n for ; Fri, 29 Jun 2018 16:36:30 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753295AbeF2Gga (ORCPT ); Fri, 29 Jun 2018 02:36:30 -0400 Received: from mail-lj1-f195.google.com ([209.85.208.195]:43959 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753243AbeF2Gg3 (ORCPT ); Fri, 29 Jun 2018 02:36:29 -0400 Received: by mail-lj1-f195.google.com with SMTP id h2-v6so3166560ljb.10 for ; Thu, 28 Jun 2018 23:36:28 -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:in-reply-to:references; bh=IMpracw7ePQJzA5fcTeFBaHfb5lOo/CTGRQXnOOitZE=; b=SvAM/BGfqnVmmnbpbnUqJXmyAK0j2zCkkUH0AEPKonXKOxkJPemHHYvnNi4w7/ZMyc jZIZCMR0y2jIvdyhlHadO16JwucSM4rBoq90vcUoaq/Eo1WXUzlJaJJg0wNCoisszKfO KWECb1bRLCDb/cy1y0mFaEKRZg09YhRvg+leA= 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:in-reply-to :references; bh=IMpracw7ePQJzA5fcTeFBaHfb5lOo/CTGRQXnOOitZE=; b=ES4774tGIfIP7HPE/ixDcAzBpKVUJEhFUupZcZ2nnSvGy7IYapS4oifOeHtQ7CmF1M Dww6PUEEGUyRwei8gADu2IcL/sl8DkZgueDpFXM1QJVZH1vG5iDLneaP4A7unslXIFWT r3QBW7If+CMsWXxN1MqNjVtP0wGyUvbYTTvtzA2gEt4L7OawFUzpzPBgYMTMPq2k9R1I HqY6ZdDvdGQzfad7lnM8Fg0+1wi+GGabGmnrT/sVYQz7krlpXEqLGlmk01CF9ySvs7Ma bckGwoZU97wnnPyneN/TIXCXNYaKRzYnysJj6I7YGTJpMlE91v7oYJ5Na6jHOZkC5jDN N8nA== X-Gm-Message-State: APt69E1mHtOqTaGxHpkxRTd7PtXeSx0ILjLx1h+gYtc1W5HGdYFx6kN/ rVgWhGYdqGa9FmaT1cvxdMkykvdhM/4= X-Google-Smtp-Source: AAOMgpdFFRpGMVnvzkOtBR2rdBi0XX20oK0PStUAtcR3A0b2XLMmoPV6U3YJWWZjDaFl3q0b6yGeGw== X-Received: by 2002:a2e:88d1:: with SMTP id a17-v6mr8951499ljk.54.1530254188051; Thu, 28 Jun 2018 23:36:28 -0700 (PDT) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id v2-v6sm1382162ljj.71.2018.06.28.23.36.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 28 Jun 2018 23:36:26 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org Cc: Linus Walleij Subject: [PATCH 18/18] gpio: syscon: Include the right header Date: Fri, 29 Jun 2018 08:35:44 +0200 Message-Id: <20180629063544.3826-18-linus.walleij@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180629063544.3826-1-linus.walleij@linaro.org> References: <20180629063544.3826-1-linus.walleij@linaro.org> Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org This is a GPIO driver, include only . Signed-off-by: Linus Walleij --- drivers/gpio/gpio-syscon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/gpio-syscon.c b/drivers/gpio/gpio-syscon.c index 8b0a69c5ba88..d40cabd15e9e 100644 --- a/drivers/gpio/gpio-syscon.c +++ b/drivers/gpio/gpio-syscon.c @@ -10,7 +10,7 @@ */ #include -#include +#include #include #include #include