From patchwork Mon Feb 12 08:53:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 871924 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; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="js4oR5BX"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3zfzwv4kQjz9sNw for ; Mon, 12 Feb 2018 19:53:51 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933175AbeBLIxY (ORCPT ); Mon, 12 Feb 2018 03:53:24 -0500 Received: from mail-lf0-f65.google.com ([209.85.215.65]:42230 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932985AbeBLIxU (ORCPT ); Mon, 12 Feb 2018 03:53:20 -0500 Received: by mail-lf0-f65.google.com with SMTP id w10so6605673lfc.9 for ; Mon, 12 Feb 2018 00:53:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=AL7k3LkSauFZ5NqInZPTH8DHbfgPKqOXFFIN0CyzZGk=; b=js4oR5BXWzpNk6OAGPmnmEpikiszcFkdCfuAidawDmo4VYMfEMu4to757OP3+mHIm+ I2DzuYEbb5XNp6pv/w9iAoPSowyWTfQp5A/TTeippN8fmfdw6OUg7q0K8TgrOWWOtHo/ fxakOaHvTJL+8jN34mIOMV4UlxAm0i5GDXx+8= 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=AL7k3LkSauFZ5NqInZPTH8DHbfgPKqOXFFIN0CyzZGk=; b=keKi5A5XTISJE8GkfXwZbTm/C4l8gTgXHQzOG373Whe7oYQjUmZROGxxEW+PVl9Tld VKeiZ3HE4VXEnXlgbxb+xi+avF3YPG29VSCJ9VEZsH6Wt43/4/NWeXZG8KBGT5QmMPk8 76FdYOUAbociUJna9kquucHuwBY603L9yUgth+YvLIwRDFY1kPHVWw1q90aHIr5xCDiX 1ZKaQe42y3RgGY6mFvgj67iz3UkDUI+7lYx9exlFPEIxS9nHWvAPDtfhm2qq9ekjPNHk y03TAjVvuesH/tOrQJmW6ZBU5bI/eVWKaDypz8BKWqqMcYUgKMO2q/R0Xca00+zYZvJQ K60A== X-Gm-Message-State: APf1xPCL3+2V5ir44gB4CoFStEFm7JuUn516X8pZb6L81rMCTIdBfafc /5ljchtLM1Chn5zLB6W7gwqh0w== X-Google-Smtp-Source: AH8x227T52i5v5VotGjPlQ5qDOSWI1SyCZqugap6VGhqRrnrEHeLnTbec4XCvixP0T1yEwjB4SjzhQ== X-Received: by 10.46.118.4 with SMTP id r4mr7496447ljc.123.1518425598485; Mon, 12 Feb 2018 00:53:18 -0800 (PST) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id r13sm1590461lfr.19.2018.02.12.00.53.17 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 12 Feb 2018 00:53:17 -0800 (PST) From: Linus Walleij To: MyungJoo Ham , Chanwoo Choi Cc: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Mike Lockwood , Guenter Roeck , Linus Walleij Subject: [PATCH 1/3] extcon: gpio: Localize platform data Date: Mon, 12 Feb 2018 09:53:12 +0100 Message-Id: <20180212085314.23014-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.14.3 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 diff --git a/drivers/extcon/extcon-gpio.c b/drivers/extcon/extcon-gpio.c index ab770adcca7e..5f88f36cc54e 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__ */