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: 9890005 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9323A603FF for ; Wed, 9 Aug 2017 09:47:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8940228A38 for ; Wed, 9 Aug 2017 09:47:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7DE0828A5F; Wed, 9 Aug 2017 09:47:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2606E28A5B for ; Wed, 9 Aug 2017 09:47:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752373AbdHIJqe (ORCPT ); Wed, 9 Aug 2017 05:46:34 -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) 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-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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(+) 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, }, };