From patchwork Mon Jun 25 05:09:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 10485043 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 30C8F601D5 for ; Mon, 25 Jun 2018 05:10:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 22AF4288B8 for ; Mon, 25 Jun 2018 05:10:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 16BF3288EF; Mon, 25 Jun 2018 05:10:33 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, MAILING_LIST_MULTI, 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 B4140288B8 for ; Mon, 25 Jun 2018 05:10:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752104AbeFYFKa (ORCPT ); Mon, 25 Jun 2018 01:10:30 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:46620 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752110AbeFYFK1 (ORCPT ); Mon, 25 Jun 2018 01:10:27 -0400 Received: by mail-pf0-f196.google.com with SMTP id q1-v6so5893159pff.13 for ; Sun, 24 Jun 2018 22:10:27 -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=7VOVuZu1f1Bdmt/sz1gKINGq6GdNR1kX+D6p2ujSgmM=; b=eDU4M0jUiqSAviwc+YHVaU+Hs8+JXx6HYC5Qyl+sE1y408wNQRF2w7eKxYcoj6JVK7 2CWyngpUXm5JPCi0Zy3qDjq06u8kON1mFNvrLH/bQlsboZN0J8T63H6EoNYSedUOLLmI p0ZQ+hbSkVNVOMtQPWbYxnhP/obbBn+KlAels= 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=7VOVuZu1f1Bdmt/sz1gKINGq6GdNR1kX+D6p2ujSgmM=; b=pew9NurrJlnoxBW/Ka1SIzVebPH05zOJLgDH0+hxDuDzNfm1yeCVLeE9Ff1XOuer5M OElQJ5a2mAFPS6gUtND8wbA5Dffs4ya0wa4cXCwM2bWpOggMVLs6iD9zst3I0sHhEvUs VngtfNJ3cwkmFO/mCldW2RIJOOVZF975lZGFYkm+4iyzXCs+zdbpci0IsGrJHxPDMpeU hh/BihlA4gaHvuCZ5tVV+tH03CLvWdRDJrDYWvPYE+ZAOxx7S59sCfC9Sd3WfLRGiG1w tiIMv4zJgMWpXb68zAnSwH+WEPKcn8b9tiUDpWJEwO//OgeoAMtlHL9+/2auKxy6/A4q U1PA== X-Gm-Message-State: APt69E0vsVJVd06T+7chFOLVP4p2NYC9GCaOxJIzBed9FWK4q5Dlrwuu C684oE1Po619Z40avDT13lk8vQ== X-Google-Smtp-Source: ADUXVKIt1N4kDWxsaz9HAR8/rE3oab58w+/82mmr92NIGR98F4NC2sPsV4XazACUojpodIasAeepGw== X-Received: by 2002:a63:2581:: with SMTP id l123-v6mr9317541pgl.226.1529903427255; Sun, 24 Jun 2018 22:10:27 -0700 (PDT) Received: from localhost.localdomain ([223.226.41.70]) by smtp.gmail.com with ESMTPSA id h16-v6sm20272308pfn.80.2018.06.24.22.10.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 24 Jun 2018 22:10:26 -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 v2 5/5] input: pm8941-pwrkey: Add resin entry Date: Mon, 25 Jun 2018 10:39:38 +0530 Message-Id: <20180625050938.4700-6-vkoul@kernel.org> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180625050938.4700-1-vkoul@kernel.org> References: <20180625050938.4700-1-vkoul@kernel.org> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@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 b2c1093f7d62..e360b1bd7415 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);