From patchwork Wed Jul 19 07:43:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Schulz X-Patchwork-Id: 108253 Delivered-To: patch@linaro.org Received: by 10.182.45.195 with SMTP id p3csp523502obm; Wed, 19 Jul 2017 00:44:05 -0700 (PDT) X-Received: by 10.99.106.69 with SMTP id f66mr1708070pgc.282.1500450245886; Wed, 19 Jul 2017 00:44:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1500450245; cv=none; d=google.com; s=arc-20160816; b=tkuVc/w710TPwCrGJ90zDg2o3p5PyX0gLcsdBHhnDTSyS2doNuiMlb9RR57Z5jwObH g93kiy+KCUja2D4QT6LWabPRx856Tk0UFNafuHh/UQ8RQ88u7sJ0MdfaHrXO039bF8IA ElP7ljVdpz7Q88pGryv+TvA5XiW7mQy+KQCYbxYpOIGspgwrkcEXLpAfOWcAwXm0svDI N+Jwj570KaDxccC1AOhq4KDJrPSJYQTwXVtUdIqhYAqhSLAuE16Ww2GOFmAkztgFczdL C5s2nTpNlwiVlGXZzrOQWS/7NkIs0JG+aMzXcgrqMSUvMXaZQAih8EPg4qJPUErr5U+G IGhw== 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:arc-authentication-results; bh=CLDD4BFH3aPpHJK0M4KtW5UrtwG+AEEs5h1cvcB3RpI=; b=PL16NnXUKODKhI+FCykUANkS1lLfPpoSaIGYPAfPRcWzIX3H4M24TOS4viF76KAEpJ zi92u5fiTjyf2cyi8a5QLn38FpdX29QKteae8Q/O5O/NRTocSOEVg7wtztE5+aEtun1e Shf/cvO09ptGxFmTMb0xmXmZUEcN8KXjfLN8xN8DIEv44l2RtEh45uL6qMYFdy6zPRBY yxJB0ZOCgofL+RKw+NscW7gEpIbwEpJq0E+XHgQ8fbAiz268/iZFZqRjhMSPv/6xwZHX yQmA9ck9OLUtMRsncB5SpV1SIaRoODHGDqXyvME9tuHGVdMKkqSM+t2W+kIo5GmxP5gy Mr5A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-input-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-input-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z12si3697785pge.264.2017.07.19.00.44.05 for ; Wed, 19 Jul 2017 00:44:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-input-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-input-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-input-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751683AbdGSHoD (ORCPT ); Wed, 19 Jul 2017 03:44:03 -0400 Received: from mail.free-electrons.com ([62.4.15.54]:54396 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752315AbdGSHoC (ORCPT ); Wed, 19 Jul 2017 03:44:02 -0400 Received: by mail.free-electrons.com (Postfix, from userid 110) id D360E207FE; Wed, 19 Jul 2017 09:43:58 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost.localdomain (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.free-electrons.com (Postfix) with ESMTPSA id 929A32082D; Wed, 19 Jul 2017 09:43:48 +0200 (CEST) From: Quentin Schulz To: dmitry.torokhov@gmail.com, wens@csie.org, lee.jones@linaro.org Cc: Quentin Schulz , hdegoede@redhat.com, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, thomas.petazzoni@free-electrons.com, maxime.ripard@free-electrons.com Subject: [PATCH v2 2/3] Input: axp20x-pek: remove mention to extended attributes Date: Wed, 19 Jul 2017 09:43:36 +0200 Message-Id: <20170719074337.19189-3-quentin.schulz@free-electrons.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170719074337.19189-1-quentin.schulz@free-electrons.com> References: <20170719074337.19189-1-quentin.schulz@free-electrons.com> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org Now that extended attributes aren't used anymore, remove all the mentions to extended attributes. Signed-off-by: Quentin Schulz --- drivers/input/misc/axp20x-pek.c | 60 ++++++++++++++++++++--------------------- 1 file changed, 29 insertions(+), 31 deletions(-) -- 2.11.0 -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Reviewed-by: Chen-Yu Tsai diff --git a/drivers/input/misc/axp20x-pek.c b/drivers/input/misc/axp20x-pek.c index 94c89fbeeeaa..fa49f45c0f0e 100644 --- a/drivers/input/misc/axp20x-pek.c +++ b/drivers/input/misc/axp20x-pek.c @@ -70,9 +70,9 @@ static const struct axp20x_info axp20x_info = { .shutdown_mask = AXP20X_PEK_SHUTDOWN_MASK, }; -static ssize_t axp20x_show_ext_attr(struct device *dev, - const struct axp20x_time *time, - unsigned int mask, char *buf) +static ssize_t axp20x_show_attr(struct device *dev, + const struct axp20x_time *time, + unsigned int mask, char *buf) { struct axp20x_pek *axp20x_pek = dev_get_drvdata(dev); unsigned int val; @@ -92,30 +92,30 @@ static ssize_t axp20x_show_ext_attr(struct device *dev, return sprintf(buf, "%u\n", val); } -static ssize_t axp20x_show_ext_attr_startup(struct device *dev, - struct device_attribute *attr, - char *buf) +static ssize_t axp20x_show_attr_startup(struct device *dev, + struct device_attribute *attr, + char *buf) { struct axp20x_pek *axp20x_pek = dev_get_drvdata(dev); - return axp20x_show_ext_attr(dev, axp20x_pek->info->startup_time, - axp20x_pek->info->startup_mask, buf); + return axp20x_show_attr(dev, axp20x_pek->info->startup_time, + axp20x_pek->info->startup_mask, buf); } -static ssize_t axp20x_show_ext_attr_shutdown(struct device *dev, - struct device_attribute *attr, - char *buf) +static ssize_t axp20x_show_attr_shutdown(struct device *dev, + struct device_attribute *attr, + char *buf) { struct axp20x_pek *axp20x_pek = dev_get_drvdata(dev); - return axp20x_show_ext_attr(dev, axp20x_pek->info->shutdown_time, - axp20x_pek->info->shutdown_mask, buf); + return axp20x_show_attr(dev, axp20x_pek->info->shutdown_time, + axp20x_pek->info->shutdown_mask, buf); } -static ssize_t axp20x_store_ext_attr(struct device *dev, - const struct axp20x_time *time, - unsigned int mask, const char *buf, - size_t count) +static ssize_t axp20x_store_attr(struct device *dev, + const struct axp20x_time *time, + unsigned int mask, const char *buf, + size_t count) { struct axp20x_pek *axp20x_pek = dev_get_drvdata(dev); char val_str[20]; @@ -157,30 +157,28 @@ static ssize_t axp20x_store_ext_attr(struct device *dev, return count; } -static ssize_t axp20x_store_ext_attr_startup(struct device *dev, - struct device_attribute *attr, - const char *buf, size_t count) +static ssize_t axp20x_store_attr_startup(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) { struct axp20x_pek *axp20x_pek = dev_get_drvdata(dev); - return axp20x_store_ext_attr(dev, axp20x_pek->info->startup_time, - axp20x_pek->info->startup_mask, buf, - count); + return axp20x_store_attr(dev, axp20x_pek->info->startup_time, + axp20x_pek->info->startup_mask, buf, count); } -static ssize_t axp20x_store_ext_attr_shutdown(struct device *dev, - struct device_attribute *attr, - const char *buf, size_t count) +static ssize_t axp20x_store_attr_shutdown(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) { struct axp20x_pek *axp20x_pek = dev_get_drvdata(dev); - return axp20x_store_ext_attr(dev, axp20x_pek->info->shutdown_time, - axp20x_pek->info->shutdown_mask, buf, - count); + return axp20x_store_attr(dev, axp20x_pek->info->shutdown_time, + axp20x_pek->info->shutdown_mask, buf, count); } -DEVICE_ATTR(startup, 0644, axp20x_show_ext_attr_startup, axp20x_store_ext_attr_startup); -DEVICE_ATTR(shutdown, 0644, axp20x_show_ext_attr_shutdown, axp20x_store_ext_attr_shutdown); +DEVICE_ATTR(startup, 0644, axp20x_show_attr_startup, axp20x_store_attr_startup); +DEVICE_ATTR(shutdown, 0644, axp20x_show_attr_shutdown, axp20x_store_attr_shutdown); static struct attribute *axp20x_attributes[] = { &dev_attr_startup.attr, From patchwork Wed Jul 19 07:43:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Schulz X-Patchwork-Id: 108255 Delivered-To: patch@linaro.org Received: by 10.182.45.195 with SMTP id p3csp524203obm; Wed, 19 Jul 2017 00:45:01 -0700 (PDT) X-Received: by 10.84.139.195 with SMTP id 61mr1848203plr.296.1500450301905; Wed, 19 Jul 2017 00:45:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1500450301; cv=none; d=google.com; s=arc-20160816; b=ptPIGxltqyeF62TdV3kEObgl6xu76qGPRjgcRcM4P5A42zxD6IxURonhJ+9B4V1Z8F 9+9AYOalsE6NQLn60ZIAqZwsKViPDdagRvO5/vjlPYywCrjQn6KHj2GHaAYj5PKDSmEK 0raEwSizIiSfrObw7pbhi+vRzEuvX+wmzBXNdWv9OANrjiae7tXbJwOvTD19bUyd6M4i 9uj8iq6urw5YcJvVwczO3NDMBcZ9nFaQyqVDuzr+mXoGBApQ01ErSejpW9Jpx9Y4XiZZ 8tzyui3sU0jyElskL1nuq6StX2QhQ7WBrBc+pdIxlPTRnqVpL2HWwRe7iLIeTFijK4aL yh7Q== 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:arc-authentication-results; bh=fI7si1nxNwE6G+xDkMbN5E4e6JRqjKGC1f7mMZOKpGs=; b=0Lmdv+lW+6YOODhSLQ37/yKAg1NHS/bc5Nb4trzeHR/O1x1hoycCnhOGptH6DxmxUM hz0NgAZgoVwmycXxYj9gV3N/2b58EXkAzbnZ0vY8Ryag6ceiCmrhOcgwxVtt880vIcRS 3SC7ECTqyUM52Cx3tQAmRQPEftSTAwa+V4GhbCSqSICTqcBfVxbJ4nVwCSEldPyaSpAV 4XJ6Mc7hKQqM6Sm5IvFvfOe7gBk1S6wSfAPq0qOxxVObKVssB+PcjFYf7WIhb557jVVl WoCFdrfDrUUtX19KWjt2o4gYO0bbjtEGBmsBFwjfOwgnuWGodWNPhFmcW8nA2NuylzIz p0oQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-input-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-input-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 37si3733352pld.431.2017.07.19.00.45.01 for ; Wed, 19 Jul 2017 00:45:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-input-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-input-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-input-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753228AbdGSHpA (ORCPT ); Wed, 19 Jul 2017 03:45:00 -0400 Received: from mail.free-electrons.com ([62.4.15.54]:54402 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752492AbdGSHoC (ORCPT ); Wed, 19 Jul 2017 03:44:02 -0400 Received: by mail.free-electrons.com (Postfix, from userid 110) id 12BBB2082D; Wed, 19 Jul 2017 09:43:59 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost.localdomain (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.free-electrons.com (Postfix) with ESMTPSA id C69D820834; Wed, 19 Jul 2017 09:43:48 +0200 (CEST) From: Quentin Schulz To: dmitry.torokhov@gmail.com, wens@csie.org, lee.jones@linaro.org Cc: Quentin Schulz , hdegoede@redhat.com, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, thomas.petazzoni@free-electrons.com, maxime.ripard@free-electrons.com Subject: [PATCH v2 3/3] Input: axp20x-pek: add support for AXP221 PEK Date: Wed, 19 Jul 2017 09:43:37 +0200 Message-Id: <20170719074337.19189-4-quentin.schulz@free-electrons.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170719074337.19189-1-quentin.schulz@free-electrons.com> References: <20170719074337.19189-1-quentin.schulz@free-electrons.com> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org The AXP221 has different values for startup time bits from the AXP20X. Signed-off-by: Quentin Schulz --- drivers/input/misc/axp20x-pek.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) -- 2.11.0 -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Reviewed-by: Chen-Yu Tsai diff --git a/drivers/input/misc/axp20x-pek.c b/drivers/input/misc/axp20x-pek.c index fa49f45c0f0e..71fd0dc7dad4 100644 --- a/drivers/input/misc/axp20x-pek.c +++ b/drivers/input/misc/axp20x-pek.c @@ -56,6 +56,13 @@ static const struct axp20x_time startup_time[] = { { .time = 2000, .idx = 3 }, }; +static const struct axp20x_time axp221_startup_time[] = { + { .time = 128, .idx = 0 }, + { .time = 1000, .idx = 1 }, + { .time = 2000, .idx = 2 }, + { .time = 3000, .idx = 3 }, +}; + static const struct axp20x_time shutdown_time[] = { { .time = 4000, .idx = 0 }, { .time = 6000, .idx = 1 }, @@ -70,6 +77,13 @@ static const struct axp20x_info axp20x_info = { .shutdown_mask = AXP20X_PEK_SHUTDOWN_MASK, }; +static const struct axp20x_info axp221_info = { + .startup_time = axp221_startup_time, + .startup_mask = AXP20X_PEK_STARTUP_MASK, + .shutdown_time = shutdown_time, + .shutdown_mask = AXP20X_PEK_SHUTDOWN_MASK, +}; + static ssize_t axp20x_show_attr(struct device *dev, const struct axp20x_time *time, unsigned int mask, char *buf) @@ -397,6 +411,9 @@ static const struct platform_device_id axp_pek_id_match[] = { { .name = "axp20x-pek", .driver_data = (kernel_ulong_t)&axp20x_info, + }, { + .name = "axp221-pek", + .driver_data = (kernel_ulong_t)&axp221_info, }, };