From patchwork Mon Jun 18 14:35:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 10471769 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 A11EB601D7 for ; Mon, 18 Jun 2018 14:36:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 91A2A287F0 for ; Mon, 18 Jun 2018 14:36:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8635D28A47; Mon, 18 Jun 2018 14:36: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=-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 318C7287F0 for ; Mon, 18 Jun 2018 14:36:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934822AbeFROg2 (ORCPT ); Mon, 18 Jun 2018 10:36:28 -0400 Received: from mail-pl0-f66.google.com ([209.85.160.66]:38013 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934751AbeFROgX (ORCPT ); Mon, 18 Jun 2018 10:36:23 -0400 Received: by mail-pl0-f66.google.com with SMTP id b14-v6so9145775pls.5 for ; Mon, 18 Jun 2018 07:36:23 -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=sxHOaIOKDL0C9xkCvI3V+zEaAB0OrpFLYwGIYL9Hok8=; b=PuYNmg4m7DnodfTD1e+1WhTC9aCVZmly85e18xcL8elrgelyuZU1v0OUdJbsUOAfIb IxGjJY4ffcRf8DpPaKWkX++2Gd0pAgeexi98SHGBdNb14OH8iyOYdjSE2Z+9vIhuxWGF G+PxJzZG1+QopB8OX+tZOyYnplMtDqZrjCHCE= 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=sxHOaIOKDL0C9xkCvI3V+zEaAB0OrpFLYwGIYL9Hok8=; b=uQuJBwDI24N8+C1ulimMSFG+yg8hQ3DD9wmSu3kU1FDAvSM5R3iFQuVlIZFLwLxTa8 nHBCRKMf1s1pVhtWNkKoOTDgPs/T4KG78Gd+mYENJsNAzGD+DIfyaqkKMRhdPehBsYTR uu7G93JbtxVCUy75mY548XT7S09Yuseynn2hD2e8wEhQtuwWot2ykbMAHmOxmPNicpNt mXe1vkEFA9P5PAMI7Ub/vBgHoPMxxILnUoDZy0qqEre2QYZoTHgZXpAm0oSWWnmzdjRB 5eZBwqaxwa8RRcSUVbsB9fz3RoQvkit8bSQsY6llFGb5x1rvj7uwoUJoo0XfU7f4E+6u Nqow== X-Gm-Message-State: APt69E2nqkmqEESsTOi5dOrYa0MxJ91IFHfq3t/lPnr2CPMJBh3B0wWr N1iOQYXz6O3RJYRTmt7m5oq+cg== X-Google-Smtp-Source: ADUXVKJlEO4S0ZVlho7EAdq+4YGfOz8kZ98bTYXHrauGUBEDYRDftlMtxX3Mv6kMyX/qSywQdRtH5A== X-Received: by 2002:a17:902:be0d:: with SMTP id r13-v6mr14358236pls.299.1529332582704; Mon, 18 Jun 2018 07:36:22 -0700 (PDT) Received: from localhost.localdomain ([27.59.118.133]) by smtp.gmail.com with ESMTPSA id n10-v6sm28163604pfb.27.2018.06.18.07.36.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 18 Jun 2018 07:36:22 -0700 (PDT) From: Vinod Koul X-Google-Original-From: Vinod Koul To: linux-input@vger.kernel.org, linux-pm@vger.kernel.org Cc: Dmitry Torokhov , Rob Herring , Sebastian Reichel , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, Vinod Koul Subject: [PATCH 5/5] input: pm8941-pwrkey: Add resin entry Date: Mon, 18 Jun 2018 20:05:48 +0530 Message-Id: <20180618143548.29900-6-vkoul@kernel.org> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180618143548.29900-1-vkoul@kernel.org> References: <20180618143548.29900-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. Signed-off-by: Vinod Koul Reviewed-by: Bjorn Andersson --- 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 aedb6ea2b50a..913405404a92 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 @@ -307,8 +309,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);