From patchwork Sat Jun 8 23:14:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 166210 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp2287331ili; Sat, 8 Jun 2019 16:14:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqyzMsni/8sl54AqDbIkP0be/YQTFWFmDzHENw5oZ8FPjeywid7+c1DNQlBMZ8DyDqomANmH X-Received: by 2002:a62:5303:: with SMTP id h3mr14156881pfb.58.1560035672875; Sat, 08 Jun 2019 16:14:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560035672; cv=none; d=google.com; s=arc-20160816; b=H5BqqXKEtpOX/7QTsczoEokay5kvVd1v/wcwzeyMzWay2Ug52S+JYhl/Mi9fb2HFQM fKKSGnfvkHFcMmVFDfE33YLsKOpHeh0m1LvtK4DTVexy545C6P+3EyRZFYSLCmoN/+fA J3aFmxsxI4dMr4DqZL6tkctDyLp9g9pTm3bgdD0z6Yt63mIQX76Af9JCBfLKdNdPT2BH 6CdUVurZtf7maG5K52ZtMiXaUP7loM5RD+uD/muXEEPFWugNQpvmrNsf2Iv2C0xeivsH OR95CENbDz9Y5YKWD1Pbp0OJQXt9viR9EfZGS9i8qrCeeo00DysyVYnwKmsnbkNFInC8 o1Ig== 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; bh=3Zp1bn2oYxda6LDTqyZ5GXOuq4BjnJOFiw+QZsnsSzQ=; b=PLU7eAg4sVf8+sUNCbGDP7IVjaFU5GvEA+MBhXrUC8Us24fj9braB97GZVqUPXCRYZ aZx//AwNcVespT5mumejPb4sfHHzystWZIRQDYPRrQYZ8x27qY9QumiijNjuUC6Fl/hl ZRivZROnaBecO+l0jihVRpGi0LnFJSkqyFcRXxJuqAgJU1FMAmVz9h82NaLl5w3iPnWs +SK147pLoKJFBFGecYJMryePXhgeJS9/inX7YDxXwrKvkc1EFJvbiY8vN+MugKNEfaDF z3Jy8FDGIzbpDUzDLU5GZfDDY96ZcXD/UIRsI00q7+wdIYk5LurWkCpg06TgWRanEhS/ aPww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wuM2tsMd; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-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 k1si5630878pfa.25.2019.06.08.16.14.32; Sat, 08 Jun 2019 16:14:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-gpio-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=wuM2tsMd; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-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 S1727406AbfFHXOb (ORCPT + 5 others); Sat, 8 Jun 2019 19:14:31 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:33197 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726190AbfFHXOb (ORCPT ); Sat, 8 Jun 2019 19:14:31 -0400 Received: by mail-wm1-f65.google.com with SMTP id h19so6507677wme.0 for ; Sat, 08 Jun 2019 16:14:30 -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=3Zp1bn2oYxda6LDTqyZ5GXOuq4BjnJOFiw+QZsnsSzQ=; b=wuM2tsMdlF07OQhHKBfdaPH8QFPb0U1rth7MZGBaMdKTfuacIn2acYCRPtFtUhPq6c TUeW23Qf6cdiKy3kjiAS4zHxDhRU6/LMCNgjQumU5rDkkpnCQH/KQsd3wwqdzxnCkitf xx8f7GC6pv9qKP8pLLwDGTgSjFZsluwtW2SbZ87fEVlwJJGmpu0D6RYboQrj80E9J68y Z71sa83+SauXC+eNiSvXR2l/1W6oAUPpOvubkOIbejayqQUib1mMQFyDoV7/4Di7hPYX 82wBi0s3e7tuTsYmIUtCiCSd+svNdKCf3HOVEtqAag4hMDarXW7nCvPo0+YbXoG8xDnM 2Alg== 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=3Zp1bn2oYxda6LDTqyZ5GXOuq4BjnJOFiw+QZsnsSzQ=; b=XbBoLufRcvmlNRHGrrvQxiwHgcD673v6qNnOYx/50n95xfouy/TkgVy2wt0uKL7keh EefkJF2hVUyx+yrVCsAVXWjO9GRcIrnIhcXdukFNo2X9G2uACEnVeikeE6qJAmFT1Ohn +GVa7eq7vzANQ/A4Bvhvu1oxnlHpjobUg5NBuYJkBn2uqBv96MjUMBwr+5MndnCwKzv1 SIVWv6ef5YuEH2pqoMSyBf3DAJ8jAO9k40hammkIh0Z6kz5Wf7bAxCGkf92vZGU2y+aQ r/LOuo8mNe+1zWevwBTrNZKbctMoTwfnloW+yYuyjcXGxBk93BxJU2MMGC6OP5wvNvsy tHVA== X-Gm-Message-State: APjAAAWnv6efeJ5Z3MMlqlxD4SpnZ/BJRrTAGeUY5PdaXe/lmFCbvKhX jHBn/Idc5wylQKE51FTLnzBRnLbcing= X-Received: by 2002:a1c:a545:: with SMTP id o66mr8645942wme.138.1560035669245; Sat, 08 Jun 2019 16:14:29 -0700 (PDT) Received: from localhost.localdomain (catv-89-135-96-219.catv.broadband.hu. [89.135.96.219]) by smtp.gmail.com with ESMTPSA id z17sm5118911wru.21.2019.06.08.16.14.27 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sat, 08 Jun 2019 16:14:28 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org Cc: Bartosz Golaszewski , Linus Walleij , Federico Vaga , Pat Riehecky , Alessandro Rubini Subject: [PATCH] fmc: Decouple from Linux GPIO subsystem Date: Sun, 9 Jun 2019 01:14:30 +0200 Message-Id: <20190608231430.22916-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org FMC has its own GPIO handling, the inclusion of is only to reuse some flags that we can just as well provide using local defines. Cc: Federico Vaga Cc: Pat Riehecky Cc: Alessandro Rubini Signed-off-by: Linus Walleij --- I will merge this into the GPIO tree unless there are protests against it. --- drivers/fmc/fmc-trivial.c | 1 - include/linux/fmc.h | 18 ++++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) -- 2.20.1 Acked-by: Alessandro Rubini diff --git a/drivers/fmc/fmc-trivial.c b/drivers/fmc/fmc-trivial.c index 8defdee3e3a3..b99dbc7ee203 100644 --- a/drivers/fmc/fmc-trivial.c +++ b/drivers/fmc/fmc-trivial.c @@ -15,7 +15,6 @@ #include #include #include -#include #include static struct fmc_driver t_drv; /* initialized later */ diff --git a/include/linux/fmc.h b/include/linux/fmc.h index 3dc8a1b2db7b..f0d482d29df7 100644 --- a/include/linux/fmc.h +++ b/include/linux/fmc.h @@ -101,7 +101,7 @@ struct fmc_gpio { char *carrier_name; /* name or NULL for virtual pins */ int gpio; int _gpio; /* internal use by the carrier */ - int mode; /* GPIOF_DIR_OUT etc, from */ + int mode; /* GPIOF_DIR_OUT etc */ int irqmode; /* IRQF_TRIGGER_LOW and so on */ }; @@ -115,13 +115,15 @@ struct fmc_gpio { #define FMC_GPIO_USER(x) ((x) + 0x1400) /* 256 of them */ /* We may add SCL and SDA, or other roles if the need arises */ -/* GPIOF_DIR_IN etc are missing before 3.0. copy from */ -#ifndef GPIOF_DIR_IN -# define GPIOF_DIR_OUT (0 << 0) -# define GPIOF_DIR_IN (1 << 0) -# define GPIOF_INIT_LOW (0 << 1) -# define GPIOF_INIT_HIGH (1 << 1) -#endif +/* + * These are similar to the legacy Linux GPIO defines from + * but in fact FMC has its own GPIO handling and is not using the Linux + * GPIO subsystem. + */ +#define GPIOF_DIR_OUT (0 << 0) +#define GPIOF_DIR_IN (1 << 0) +#define GPIOF_INIT_LOW (0 << 1) +#define GPIOF_INIT_HIGH (1 << 1) /* * The operations are offered by each carrier and should make driver