{"id":817925,"url":"http://patchwork.ozlabs.org/api/patches/817925/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-gpio/patch/20170924145622.4031-9-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-9-linus.walleij@linaro.org>","list_archive_url":null,"date":"2017-09-24T14:56:22","name":"[8/8] extcon: gpio: Always check state on resume","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"27c4f42fb9cb9a9769dedb2918e077af22c07d17","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-9-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/817925/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/817925/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=\"B/YBjcar\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3y0Vnt2Sf5z9sRV\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 25 Sep 2017 01:02:58 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1752631AbdIXPCr (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n\tSun, 24 Sep 2017 11:02:47 -0400","from mail-pg0-f54.google.com ([74.125.83.54]:48810 \"EHLO\n\tmail-pg0-f54.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1752594AbdIXPCq (ORCPT\n\t<rfc822; linux-gpio@vger.kernel.org>); Sun, 24 Sep 2017 11:02:46 -0400","by mail-pg0-f54.google.com with SMTP id v23so2732437pgc.5\n\tfor <linux-gpio@vger.kernel.org>;\n\tSun, 24 Sep 2017 08:02:46 -0700 (PDT)","from genomnajs.saswifi.com ([104.153.224.168])\n\tby smtp.gmail.com with ESMTPSA id\n\tn83sm7386805pfi.163.2017.09.24.08.02.14\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tSun, 24 Sep 2017 08:02:45 -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=PHU9GwQikBxttSN6CQscSmCAlSIe7qNrQaoy+I4aNN4=;\n\tb=B/YBjcarg4evTS4hONzQQav1IN0BRtTfnxijA8IWZMH3F4P53q8a4taiN7iGLMOw9j\n\tol6UYmrzGXp7JdQB8LjWgNHH2rCu5to25GSE98/4EFRdkMAp1zpgd12UIM0rj1To1e7M\n\tWAn2wYWDy7l38Lb9+kydseVxsYkR2h9az218U=","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=PHU9GwQikBxttSN6CQscSmCAlSIe7qNrQaoy+I4aNN4=;\n\tb=DFJ0F62ZlRjZlKxgBYPrVqo/TCs+6A1FgT5YceGeu9+jdyVs7/5s16qhDhiHEWYIxz\n\tF5B+7bQuvnb1BRwwmGmAI+Nz7sK7uiWDlgI6UuVLl2ZrCppe44SHkhAG0ky5D7Gnk//E\n\tAbu0nLa8vyq8uaQUkUvSiOmICMMaCcvnMaEYl6f34dzMuBRwiGbHveBNbr6EzH8dEZwr\n\tRqrdTjcviOPw0OH/Qopq8EZqwZabVb3VBXC46gZwpZq42j4Wt6irOThTSTIP6K1Q8vEE\n\tBGRYseW6dFt1dgS/jPXxw0391+rInNeF21yzE8FVPWftdZOR4AVhlInqVEq2Ly7slnFZ\n\t/FWA==","X-Gm-Message-State":"AHPjjUg89ieHVrjsdIdTv6rsEIvNkDLQOzue6tGVCR6nG6pPT5QJ2I92\n\tMdmf1V8DmYkQOoJfJ2GvjKbs1Q==","X-Google-Smtp-Source":"AOwi7QBzN5AkklkkcDT97zcjcrWrF9Gjl24mR+QM3FZhreTMLwk/INeidPkdEjjfnXu3qUQSUGOdmw==","X-Received":"by 10.98.71.153 with SMTP id p25mr4846219pfi.84.1506265366320;\n\tSun, 24 Sep 2017 08:02:46 -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 8/8] extcon: gpio: Always check state on resume","Date":"Sun, 24 Sep 2017 16:56:22 +0200","Message-Id":"<20170924145622.4031-9-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":"It makes most sense to always check the state of the GPIO external\nconnector at system resume so just do this by default. Add a TODO\nif people turn out to desire to parameterize this.\n\nSigned-off-by: Linus Walleij <linus.walleij@linaro.org>\n---\n drivers/extcon/extcon-gpio.c | 9 +++++++++\n 1 file changed, 9 insertions(+)","diff":"diff --git a/drivers/extcon/extcon-gpio.c b/drivers/extcon/extcon-gpio.c\nindex b7353f5018b5..4f0ad5ad2722 100644\n--- a/drivers/extcon/extcon-gpio.c\n+++ b/drivers/extcon/extcon-gpio.c\n@@ -83,6 +83,15 @@ static int gpio_extcon_probe(struct platform_device *pdev)\n \tif (!data)\n \t\treturn -ENOMEM;\n \n+\t/*\n+\t * Always checking connector state on resume makes most sense so do this\n+\t * by default.\n+\t *\n+\t * TODO: if parameterization is needed, augment this to use proper device\n+\t * properties or set it up from PM core.\n+\t */\n+\tdata->check_on_resume = true;\n+\n \tdata->gpiod = devm_gpiod_get(dev, \"extcon\", GPIOD_IN);\n \tif (IS_ERR(data->gpiod))\n \t\treturn PTR_ERR(data->gpiod);\n","prefixes":["8/8"]}