From patchwork Wed Aug 9 09:45:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Schulz X-Patchwork-Id: 109697 Delivered-To: patch@linaro.org Received: by 10.140.95.78 with SMTP id h72csp623822qge; Wed, 9 Aug 2017 02:46:51 -0700 (PDT) X-Received: by 10.84.248.78 with SMTP id e14mr8100194pln.459.1502272010951; Wed, 09 Aug 2017 02:46:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1502272010; cv=none; d=google.com; s=arc-20160816; b=Nzg8Ia57lyq4RR7/0gzSVTUrmPJ/asYN0Qs4jE1y35dr5mT40SxZJOuto4L13i37UF V7Rcsk3UcfjVf/d7OGT5Q+k4mIEiCvjsew4883i/Ozbs5R1XZatCyHksdFlmG21NOm2V RekC41lX0JLq6haziBKyQbae6yyJTkkKN6Svg4t7WyUblnGIP30U3kjomvewhbKeq01C 0k0o/7psv1UaSmcpxS/etyucSZlJUVtyvnNXGOlmkXOkr4zZEA5QRjCNkdbJBoQpfW5Y 9TgetPqLQIMdepmraMvGBDcC8iYC0vVYsY3A/u8nkbqaaSpVkBucgbeCiVY1xKW2pPff F9LQ== 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:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=/YJQHyyay7EU8xQlOaS19cxcHvxHx2nf4SCB5G2xF+I=; b=uTdIj2P8Mwy8x951LuFRsTIP9sTAwva5ByD4YEed86ne7p7ZzX7PC3T9POZT9xpQZa rYqgU0KiICpT5sNMc/z0ltSIf0FO1FxfRW3QG6SWmAgb39mtyE0SK50QxnOqMLnpyqVj IlhpRPphX72mHTytcUn6075sPsT8chtbUhzosTKeqx9gE0IdrQ+Mo+rxSgSxYHQDRq+d MypFBFr59C7zbX92whDI+vGMOYFyX34xyQ7PFV0pbyt+2Z6eyzQOLbqhMLkL2ggSLDxt arY0IeNIXs5z2Vf8m+Ci6X3o7gIikJe95+Px46Dzl+BXh0XVCzx/U1dzxIP4R5y95dAX KPfw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 a124si2200497pgc.796.2017.08.09.02.46.50; Wed, 09 Aug 2017 02:46:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752586AbdHIJqg (ORCPT + 25 others); Wed, 9 Aug 2017 05:46:36 -0400 Received: from mail.free-electrons.com ([62.4.15.54]:42271 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752067AbdHIJqd (ORCPT ); Wed, 9 Aug 2017 05:46:33 -0400 Received: by mail.free-electrons.com (Postfix, from userid 110) id DE139209C0; Wed, 9 Aug 2017 11:46:30 +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 A1E4B209E8; Wed, 9 Aug 2017 11:46:20 +0200 (CEST) From: Quentin Schulz To: dmitry.torokhov@gmail.com, wens@csie.org, lee.jones@linaro.org Cc: hdegoede@redhat.com, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, thomas.petazzoni@free-electrons.com, maxime.ripard@free-electrons.com, Quentin Schulz Subject: [PATCH v3 2/2] Input: axp20x-pek: add support for AXP221 PEK Date: Wed, 9 Aug 2017 11:45:55 +0200 Message-Id: X-Mailer: git-send-email 2.11.0 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The AXP221 has different values for startup time bits from the AXP20X. Signed-off-by: Quentin Schulz Reviewed-by: Chen-Yu Tsai --- drivers/input/misc/axp20x-pek.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) -- git-series 0.9.1 diff --git a/drivers/input/misc/axp20x-pek.c b/drivers/input/misc/axp20x-pek.c index f616fe5..a542906 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) @@ -382,6 +396,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, }, };