From patchwork Mon Jun 25 06:38:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 10485131 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 37432604D3 for ; Mon, 25 Jun 2018 06:39:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1DA09286DD for ; Mon, 25 Jun 2018 06:39:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 12879286FD; Mon, 25 Jun 2018 06:39:30 +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=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID 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 ACD64286DE for ; Mon, 25 Jun 2018 06:39:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752417AbeFYGj1 (ORCPT ); Mon, 25 Jun 2018 02:39:27 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:45904 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752441AbeFYGjY (ORCPT ); Mon, 25 Jun 2018 02:39:24 -0400 Received: by mail-pf0-f196.google.com with SMTP id a22-v6so5992344pfo.12 for ; Sun, 24 Jun 2018 23:39:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=fI+6BgZEhsA4dM7frmUHH5QPi/ZW/IK73/x82B0DImw=; b=duSs07lntIM7QsZ4mpt4Pu39ZeaOnhgMrt7zex7uQ8g7fx7mZzM5EJPnJE49tPUuNk 88TTwKpvkGMSEsSKYFDN7Ej9+FoOl0O24s7NY/eeyv4q177wh28bz9rFtf03Hx7gx62i 3gk/yp2ajrXwP6isbYQGEYHpHXe9JYdmOIMnU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=fI+6BgZEhsA4dM7frmUHH5QPi/ZW/IK73/x82B0DImw=; b=aBaIOLTLZG2IbcsMCE8GDaItExp7t9TYlYEn2Nr5zzc3n7JdBimjXRu0/+si8M/UWe 0UmIZegWeVbDJz1oj3B55ZPnrx5mFIzmzTAY+MP4U1d0MNPzpcG0dR4z/4p7tEarwwCX WZ4NfUr8hfYAR5QHiQcANHtscGCpe6glDM7R34IqvANm1evqMjo/b96vfrChVAGElX5m NG57S1sh/8cWbYOS4NvonlSwnBkhzTsftwMaWxrZsGXexgg+5QZbxzrayNoZ8PrEtc44 2RD4M8Pb3/rFZOALBWUP6Y8kiYacfXGR6Q4OA21zu81XYxx0FFY8crakKrDPQAPGbXvk 9BSA== X-Gm-Message-State: APt69E1tW42/NmDaaH9LzT6KN0pMKQJYM98uXexNPD939z78KfSIk+00 gQ7MSsINExo7HmnuLUfszvXzoNUhS0c= X-Google-Smtp-Source: ADUXVKKfchhqsIxry9Bc+JKUTwpjzp9s2LRWTHYYW7o89+OhMH/apIJKG/2s0fdkMwnEbp4BfDnmMQ== X-Received: by 2002:a63:b543:: with SMTP id u3-v6mr9601003pgo.365.1529908763900; Sun, 24 Jun 2018 23:39:23 -0700 (PDT) Received: from localhost.localdomain ([223.226.41.70]) by smtp.gmail.com with ESMTPSA id a10-v6sm18271742pgw.90.2018.06.24.23.39.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 24 Jun 2018 23:39:23 -0700 (PDT) From: Vinod Koul X-Google-Original-From: Vinod Koul To: linux-input@vger.kernel.org, linux-pm@vger.kernel.org Cc: Bjorn Andersson , Dmitry Torokhov , Rob Herring , Sebastian Reichel , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, Vinod Koul Subject: [PATCH v3 5/5] input: pm8941-pwrkey: Add resin entry Date: Mon, 25 Jun 2018 12:08:40 +0530 Message-Id: <20180625063840.30173-6-vkoul@kernel.org> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180625063840.30173-1-vkoul@kernel.org> References: <20180625063840.30173-1-vkoul@kernel.org> 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 Since handling is abstracted in this driver, we need to add resin entry in id table along with pwrkey_data. Reviewed-by: Bjorn Andersson Signed-off-by: Vinod Koul --- drivers/input/misc/pm8941-pwrkey.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/input/misc/pm8941-pwrkey.c b/drivers/input/misc/pm8941-pwrkey.c index 2047e34c0982..6547a57f5222 100644 --- a/drivers/input/misc/pm8941-pwrkey.c +++ b/drivers/input/misc/pm8941-pwrkey.c @@ -29,6 +29,7 @@ #define PON_RT_STS 0x10 #define PON_KPDPWR_N_SET BIT(0) +#define PON_RESIN_N_SET BIT(1) #define PON_PS_HOLD_RST_CTL 0x5a #define PON_PS_HOLD_RST_CTL2 0x5b @@ -39,6 +40,7 @@ #define PON_PULL_CTL 0x70 #define PON_KPDPWR_PULL_UP BIT(1) +#define PON_RESIN_PULL_UP BIT(0) #define PON_DBC_CTL 0x71 #define PON_DBC_DELAY_MASK 0x7 @@ -306,8 +308,14 @@ static const struct pm8941_data pwrkey_data = { .status_bit = PON_KPDPWR_N_SET, }; +static const struct pm8941_data resin_data = { + .pull_up_bit = PON_RESIN_PULL_UP, + .status_bit = PON_RESIN_N_SET, +}; + static const struct of_device_id pm8941_pwr_key_id_table[] = { { .compatible = "qcom,pm8941-pwrkey", .data = &pwrkey_data }, + { .compatible = "qcom,pm8941-resin", .data = &resin_data }, { } }; MODULE_DEVICE_TABLE(of, pm8941_pwr_key_id_table);