From patchwork Sun Sep 24 14:56:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 114127 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp1642479qgf; Sun, 24 Sep 2017 07:58:53 -0700 (PDT) X-Received: by 10.99.117.81 with SMTP id f17mr5059148pgn.314.1506265133699; Sun, 24 Sep 2017 07:58:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506265133; cv=none; d=google.com; s=arc-20160816; b=oUdrhP2P3brZ+hN6ikId7aEQ8prdF+um02MRtWBQ/vbPCZ7tCS27RuCXqQdRxZxoRR 7XhHGot56Wt+EeNxC63FOEppTd++tgOs5m9bkg2tQsCCO+65eRdprLN7pZ5HyFnsUCWo oY0F1GCQZkFJWzo+/rUikKXBDy97QwDQ3mbZQYO0o0MK+pqtYyuA8nQlftRORdHWqShy 8rPmYOFKprzwnkUn4AvtaSOdafEAttDFRkgPI5+3wfPa0B36NzVaOR2WYf90ab/j6dqW J3mslhC8dFr0OWCwddS0Qn+SFnDZymkpXtvxiF+1E5CkjMAvS3n2btXE47Vklp86pw5p SHsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=SlTwv5Y1OiiDe+40Wl8rw7HABGPhZRcjy/1MPTFGaV8=; b=nf0afit/EejnAzCnJPlm1DdrzHuN/Yo94KgDKWw2yAWf7eLdL3pJWyZ3Z/FGD8py0z a+Sj1tXGSj/RZnijP/UGf52SKiPuS9CUeOjhjQeXwEbngFZr+jPhwxmDQcPrEJPG1Rnw LGTdnHA8gkNmF8hr2suDc1+i59nZW5zZ8/9Jcw49iUWlFge1DdTqxSLWSONSyINpiLsc hYQSnwPvjAj19WxIQtH24UElZEqwQ2A/J64CR+YtEFV8NFh3DE4EtR6EmJfeb1n04BZi Uujygyhx2NhFYYoeSEE53I5awlN8FXQ8KCxDodgTWxRI0TOgC+v/4il0mOZmvse4p4ah WYOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=OuCTgCaU; 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=fail (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 u10si2689776plr.829.2017.09.24.07.58.53; Sun, 24 Sep 2017 07:58:53 -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=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=OuCTgCaU; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752578AbdIXO6w (ORCPT + 5 others); Sun, 24 Sep 2017 10:58:52 -0400 Received: from mail-pg0-f52.google.com ([74.125.83.52]:44971 "EHLO mail-pg0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752540AbdIXO6v (ORCPT ); Sun, 24 Sep 2017 10:58:51 -0400 Received: by mail-pg0-f52.google.com with SMTP id j16so2734207pga.1 for ; Sun, 24 Sep 2017 07:58: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=2jxVPCIRGO5yXL+LoQ5MNlE1/0+ir58BOeJARm/WmNs=; b=OuCTgCaUrdhTuOrEw8p3bJjJuxWxLcEqy9kZUzapJ7EoLC2VG7IFH3JN9++HiOrHKQ 94ru1IIzq81tV2dnX4iLCBR3NjRxT4OOUydIkTEgqS2eX8x66zY/0AITVedPzJsZPQSS QLP1JE2shYWO7a9Sf99KLz0QY5fv/HMNTiEhM= 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=2jxVPCIRGO5yXL+LoQ5MNlE1/0+ir58BOeJARm/WmNs=; b=AsS/Qz5dfNx2yypxANZWFTub21KBDyPlZWOi/qAV/bWPGlz1UdonB1tJpcAqgK0qH1 9KoGLYyK3j8tTnEtsEi9IWHhx2qViu3sgFZgWegBnke5VwaNkrjLvDVgF154TopVq+gG 5LVXRUaQmFVdYRM1iLH2sFyjTzFR74RN7mpWlYN5h5I2LBIJqRFf843J8I1Xg6+uXXFW a9CMtFhldMOGLWsE6kVSi+prxpHswkHQP1OwRrUp9cjBvpj9Fnu0LWLIVPdpm1Zh0gkp iVkoktDnnrwSiQ8bOdU4DZxro4ew/kmXKvVDhvyp8ULdht9AtsmOlOeH8PIgnL6tN3LF VyIg== X-Gm-Message-State: AHPjjUg4TQGtnKmM42gcu2UqP6Bu94fxZt1WixN2cRfAaCPNWDJAzuds Y+m5lBtga5QZbvCkYQTfWmGA5BvuKUs= X-Google-Smtp-Source: AOwi7QBWv+wvMYdaJG2LwJB2uhPh+onR6YJcSU8M3a8+toqjpNnzi0/R9K1yrgfnxwXYvu/ef3IxZA== X-Received: by 10.98.35.209 with SMTP id q78mr4981419pfj.36.1506265131223; Sun, 24 Sep 2017 07:58:51 -0700 (PDT) Received: from genomnajs.saswifi.com ([104.153.224.168]) by smtp.gmail.com with ESMTPSA id n83sm7386805pfi.163.2017.09.24.07.58.22 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 24 Sep 2017 07:58:50 -0700 (PDT) From: Linus Walleij To: MyungJoo Ham , Chanwoo Choi Cc: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, John Stultz , Mike Lockwood , Guenter Roeck , Linus Walleij Subject: [PATCH 2/8] extcon: gpio: Localize platform data Date: Sun, 24 Sep 2017 16:56:16 +0200 Message-Id: <20170924145622.4031-3-linus.walleij@linaro.org> X-Mailer: git-send-email 2.13.5 In-Reply-To: <20170924145622.4031-1-linus.walleij@linaro.org> References: <20170924145622.4031-1-linus.walleij@linaro.org> Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Nothing in the entire kernel #includes so move the platform data declaration inside of the driver. Signed-off-by: Linus Walleij --- drivers/extcon/extcon-gpio.c | 22 +++++++++++++++++- include/linux/extcon/extcon-gpio.h | 47 -------------------------------------- 2 files changed, 21 insertions(+), 48 deletions(-) delete mode 100644 include/linux/extcon/extcon-gpio.h -- 2.13.5 -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/extcon/extcon-gpio.c b/drivers/extcon/extcon-gpio.c index ebed22f22d75..6abf5f70fdbf 100644 --- a/drivers/extcon/extcon-gpio.c +++ b/drivers/extcon/extcon-gpio.c @@ -18,7 +18,6 @@ */ #include -#include #include #include #include @@ -29,6 +28,27 @@ #include #include +/** + * struct gpio_extcon_pdata - A simple GPIO-controlled extcon device. + * @extcon_id: The unique id of specific external connector. + * @gpio: Corresponding GPIO. + * @gpio_active_low: Boolean describing whether gpio active state is 1 or 0 + * If true, low state of gpio means active. + * If false, high state of gpio means active. + * @debounce: Debounce time for GPIO IRQ in ms. + * @irq_flags: IRQ Flags (e.g., IRQF_TRIGGER_LOW). + * @check_on_resume: Boolean describing whether to check the state of gpio + * while resuming from sleep. + */ +struct gpio_extcon_pdata { + unsigned int extcon_id; + unsigned gpio; + bool gpio_active_low; + unsigned long debounce; + unsigned long irq_flags; + bool check_on_resume; +}; + struct gpio_extcon_data { struct extcon_dev *edev; int irq; diff --git a/include/linux/extcon/extcon-gpio.h b/include/linux/extcon/extcon-gpio.h deleted file mode 100644 index 7cacafb78b09..000000000000 --- a/include/linux/extcon/extcon-gpio.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Single-state GPIO extcon driver based on extcon class - * - * Copyright (C) 2012 Samsung Electronics - * Author: MyungJoo Ham - * - * based on switch class driver - * Copyright (C) 2008 Google, Inc. - * Author: Mike Lockwood - * - * This software is licensed under the terms of the GNU General Public - * License version 2, as published by the Free Software Foundation, and - * may be copied, distributed, and modified under those terms. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - */ -#ifndef __EXTCON_GPIO_H__ -#define __EXTCON_GPIO_H__ __FILE__ - -#include - -/** - * struct gpio_extcon_pdata - A simple GPIO-controlled extcon device. - * @extcon_id: The unique id of specific external connector. - * @gpio: Corresponding GPIO. - * @gpio_active_low: Boolean describing whether gpio active state is 1 or 0 - * If true, low state of gpio means active. - * If false, high state of gpio means active. - * @debounce: Debounce time for GPIO IRQ in ms. - * @irq_flags: IRQ Flags (e.g., IRQF_TRIGGER_LOW). - * @check_on_resume: Boolean describing whether to check the state of gpio - * while resuming from sleep. - */ -struct gpio_extcon_pdata { - unsigned int extcon_id; - unsigned gpio; - bool gpio_active_low; - unsigned long debounce; - unsigned long irq_flags; - - bool check_on_resume; -}; - -#endif /* __EXTCON_GPIO_H__ */