{"id":817919,"url":"http://patchwork.ozlabs.org/api/patches/817919/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-gpio/patch/20170924145622.4031-3-linus.walleij@linaro.org/","project":{"id":42,"url":"http://patchwork.ozlabs.org/api/projects/42/?format=json","name":"Linux GPIO development","link_name":"linux-gpio","list_id":"linux-gpio.vger.kernel.org","list_email":"linux-gpio@vger.kernel.org","web_url":"","scm_url":"","webscm_url":"","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20170924145622.4031-3-linus.walleij@linaro.org>","list_archive_url":null,"date":"2017-09-24T14:56:16","name":"[2/8] extcon: gpio: Localize platform data","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"7c9a1d7db284e4e5417acd046169fee8c3c1ccd3","submitter":{"id":7055,"url":"http://patchwork.ozlabs.org/api/people/7055/?format=json","name":"Linus Walleij","email":"linus.walleij@linaro.org"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/linux-gpio/patch/20170924145622.4031-3-linus.walleij@linaro.org/mbox/","series":[{"id":4818,"url":"http://patchwork.ozlabs.org/api/series/4818/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-gpio/list/?series=4818","date":"2017-09-24T14:56:14","name":"GPIO extcon modernization","version":1,"mbox":"http://patchwork.ozlabs.org/series/4818/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/817919/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/817919/checks/","tags":{},"related":[],"headers":{"Return-Path":"<linux-gpio-owner@vger.kernel.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=linux-gpio-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"OuCTgCaU\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3y0Vj93xvvz9sRW\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 25 Sep 2017 00:58:53 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1752578AbdIXO6w (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n\tSun, 24 Sep 2017 10:58:52 -0400","from mail-pg0-f52.google.com ([74.125.83.52]:44971 \"EHLO\n\tmail-pg0-f52.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1752540AbdIXO6v (ORCPT\n\t<rfc822; linux-gpio@vger.kernel.org>); Sun, 24 Sep 2017 10:58:51 -0400","by mail-pg0-f52.google.com with SMTP id j16so2734207pga.1\n\tfor <linux-gpio@vger.kernel.org>;\n\tSun, 24 Sep 2017 07:58:51 -0700 (PDT)","from genomnajs.saswifi.com ([104.153.224.168])\n\tby smtp.gmail.com with ESMTPSA id\n\tn83sm7386805pfi.163.2017.09.24.07.58.22\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tSun, 24 Sep 2017 07:58:50 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=2jxVPCIRGO5yXL+LoQ5MNlE1/0+ir58BOeJARm/WmNs=;\n\tb=OuCTgCaUrdhTuOrEw8p3bJjJuxWxLcEqy9kZUzapJ7EoLC2VG7IFH3JN9++HiOrHKQ\n\t94ru1IIzq81tV2dnX4iLCBR3NjRxT4OOUydIkTEgqS2eX8x66zY/0AITVedPzJsZPQSS\n\tQLP1JE2shYWO7a9Sf99KLz0QY5fv/HMNTiEhM=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=2jxVPCIRGO5yXL+LoQ5MNlE1/0+ir58BOeJARm/WmNs=;\n\tb=AsS/Qz5dfNx2yypxANZWFTub21KBDyPlZWOi/qAV/bWPGlz1UdonB1tJpcAqgK0qH1\n\t9KoGLYyK3j8tTnEtsEi9IWHhx2qViu3sgFZgWegBnke5VwaNkrjLvDVgF154TopVq+gG\n\t5LVXRUaQmFVdYRM1iLH2sFyjTzFR74RN7mpWlYN5h5I2LBIJqRFf843J8I1Xg6+uXXFW\n\ta9CMtFhldMOGLWsE6kVSi+prxpHswkHQP1OwRrUp9cjBvpj9Fnu0LWLIVPdpm1Zh0gkp\n\tiVkoktDnnrwSiQ8bOdU4DZxro4ew/kmXKvVDhvyp8ULdht9AtsmOlOeH8PIgnL6tN3LF\n\tVyIg==","X-Gm-Message-State":"AHPjjUg4TQGtnKmM42gcu2UqP6Bu94fxZt1WixN2cRfAaCPNWDJAzuds\n\tY+m5lBtga5QZbvCkYQTfWmGA5BvuKUs=","X-Google-Smtp-Source":"AOwi7QBWv+wvMYdaJG2LwJB2uhPh+onR6YJcSU8M3a8+toqjpNnzi0/R9K1yrgfnxwXYvu/ef3IxZA==","X-Received":"by 10.98.35.209 with SMTP id q78mr4981419pfj.36.1506265131223;\n\tSun, 24 Sep 2017 07:58:51 -0700 (PDT)","From":"Linus Walleij <linus.walleij@linaro.org>","To":"MyungJoo Ham <myungjoo.ham@samsung.com>,\n\tChanwoo Choi <cw00.choi@samsung.com>","Cc":"linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org,\n\tJohn Stultz <john.stultz@linaro.org>,\n\tMike Lockwood <lockwood@google.com>, Guenter Roeck <linux@roeck-us.net>,\n\tLinus Walleij <linus.walleij@linaro.org>","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":"<linux-gpio.vger.kernel.org>","X-Mailing-List":"linux-gpio@vger.kernel.org"},"content":"Nothing in the entire kernel #includes <linux/extcon/extcon-gpio.h>\nso move the platform data declaration inside of the driver.\n\nSigned-off-by: Linus Walleij <linus.walleij@linaro.org>\n---\n drivers/extcon/extcon-gpio.c       | 22 +++++++++++++++++-\n include/linux/extcon/extcon-gpio.h | 47 --------------------------------------\n 2 files changed, 21 insertions(+), 48 deletions(-)\n delete mode 100644 include/linux/extcon/extcon-gpio.h","diff":"diff --git a/drivers/extcon/extcon-gpio.c b/drivers/extcon/extcon-gpio.c\nindex ebed22f22d75..6abf5f70fdbf 100644\n--- a/drivers/extcon/extcon-gpio.c\n+++ b/drivers/extcon/extcon-gpio.c\n@@ -18,7 +18,6 @@\n  */\n \n #include <linux/extcon.h>\n-#include <linux/extcon/extcon-gpio.h>\n #include <linux/gpio.h>\n #include <linux/gpio/consumer.h>\n #include <linux/init.h>\n@@ -29,6 +28,27 @@\n #include <linux/slab.h>\n #include <linux/workqueue.h>\n \n+/**\n+ * struct gpio_extcon_pdata - A simple GPIO-controlled extcon device.\n+ * @extcon_id:\t\tThe unique id of specific external connector.\n+ * @gpio:\t\tCorresponding GPIO.\n+ * @gpio_active_low:\tBoolean describing whether gpio active state is 1 or 0\n+ *\t\t\tIf true, low state of gpio means active.\n+ *\t\t\tIf false, high state of gpio means active.\n+ * @debounce:\t\tDebounce time for GPIO IRQ in ms.\n+ * @irq_flags:\t\tIRQ Flags (e.g., IRQF_TRIGGER_LOW).\n+ * @check_on_resume:\tBoolean describing whether to check the state of gpio\n+ *\t\t\twhile resuming from sleep.\n+ */\n+struct gpio_extcon_pdata {\n+\tunsigned int extcon_id;\n+\tunsigned gpio;\n+\tbool gpio_active_low;\n+\tunsigned long debounce;\n+\tunsigned long irq_flags;\n+\tbool check_on_resume;\n+};\n+\n struct gpio_extcon_data {\n \tstruct extcon_dev *edev;\n \tint irq;\ndiff --git a/include/linux/extcon/extcon-gpio.h b/include/linux/extcon/extcon-gpio.h\ndeleted file mode 100644\nindex 7cacafb78b09..000000000000\n--- a/include/linux/extcon/extcon-gpio.h\n+++ /dev/null\n@@ -1,47 +0,0 @@\n-/*\n- * Single-state GPIO extcon driver based on extcon class\n- *\n- * Copyright (C) 2012 Samsung Electronics\n- * Author: MyungJoo Ham <myungjoo.ham@samsung.com>\n- *\n- * based on switch class driver\n- * Copyright (C) 2008 Google, Inc.\n- * Author: Mike Lockwood <lockwood@android.com>\n- *\n- * This software is licensed under the terms of the GNU General Public\n- * License version 2, as published by the Free Software Foundation, and\n- * may be copied, distributed, and modified under those terms.\n- *\n- * This program is distributed in the hope that it will be useful,\n- * but WITHOUT ANY WARRANTY; without even the implied warranty of\n- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n- * GNU General Public License for more details.\n- */\n-#ifndef __EXTCON_GPIO_H__\n-#define __EXTCON_GPIO_H__ __FILE__\n-\n-#include <linux/extcon.h>\n-\n-/**\n- * struct gpio_extcon_pdata - A simple GPIO-controlled extcon device.\n- * @extcon_id:\t\tThe unique id of specific external connector.\n- * @gpio:\t\tCorresponding GPIO.\n- * @gpio_active_low:\tBoolean describing whether gpio active state is 1 or 0\n- *\t\t\tIf true, low state of gpio means active.\n- *\t\t\tIf false, high state of gpio means active.\n- * @debounce:\t\tDebounce time for GPIO IRQ in ms.\n- * @irq_flags:\t\tIRQ Flags (e.g., IRQF_TRIGGER_LOW).\n- * @check_on_resume:\tBoolean describing whether to check the state of gpio\n- *\t\t\twhile resuming from sleep.\n- */\n-struct gpio_extcon_pdata {\n-\tunsigned int extcon_id;\n-\tunsigned gpio;\n-\tbool gpio_active_low;\n-\tunsigned long debounce;\n-\tunsigned long irq_flags;\n-\n-\tbool check_on_resume;\n-};\n-\n-#endif /* __EXTCON_GPIO_H__ */\n","prefixes":["2/8"]}