From patchwork Wed Jun 27 11:53:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinod Koul X-Patchwork-Id: 141578 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp765649ljj; Wed, 27 Jun 2018 04:54:01 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKHjVZva8LTtPRwklAJ2qhrDedkUIjxhC8xbXMrqUClLZqxS60f7Y1M5r7O/XxY27tKaZVG X-Received: by 2002:a17:902:8341:: with SMTP id z1-v6mr5872606pln.40.1530100441537; Wed, 27 Jun 2018 04:54:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530100441; cv=none; d=google.com; s=arc-20160816; b=cNQ75p0fGAEvDZZlR6w/3zDcwNoDh4Nfow7HWa5yzHfAPXPgKG/4uu7bCw1R+BA1Yd GRwBPAH9FPJ2DkGltiuE5/e6GEXJjIQtg4br7wjHC1qYTZ7oML0ZKRi3VrC4Ll1wJUVJ OerO5aguY2AXxKK09K1moGUpEtIExHL/Usn0cU4YmhOuEN3LS02NleIkTYOaedZVXrxH F1XsbPWWSmX7Wc0JlZA1H7xeJnGKdOen2/ZTlTqIqeaJhgdinJ2ODiy8yNJNk87l4Xsk brMvy/p+k1bHs2kBEfSPH1K4LDLF/ufioeqYibfT9K6avg1RgEMB/EA88n8OKZgufWJf Wk+A== 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:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=dtW/QGGhsQ78SP962h82NKLTP+DAzSErEpAB92a2/Nc=; b=E52+0o5hO7kHi2upL2gexKSChC9UKEJLnMeilCBBR4aNCSxuUDEmVuBVJD9oE8JP8g df1nKVvYrAW167JTOOYxXv+BYq/Aw7bqYGM77DDqAoRMjaGVY2y2a3ot1ipiMUvuWUV4 f8uTxe7jPF0MPP+d8JD9DEiuq4jUPqE2E8m571WhvTDmHZN4xaPQ09S3dgn7gRJfVRlj vqAW46UXpjvO6yrIkP/1Tx30ew3RcmzuIbdQmV5p//lbAQrv6ZVKQUqTgp0SS2T6Sg3n bQ0xFjMel3CNk0KQhekEI9yd23ubCra9tsxewbn83b31+ZReO9ME+Bp25As1ggulM76U rohw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@kernel.org header.s=default header.b="1/PdYcc6"; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l61-v6si3814836plb.507.2018.06.27.04.54.01; Wed, 27 Jun 2018 04:54:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@kernel.org header.s=default header.b="1/PdYcc6"; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934205AbeF0Lx7 (ORCPT + 13 others); Wed, 27 Jun 2018 07:53:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:37092 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753473AbeF0Lx5 (ORCPT ); Wed, 27 Jun 2018 07:53:57 -0400 Received: from localhost.localdomain (unknown [106.201.61.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2E74822BE8; Wed, 27 Jun 2018 11:53:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1530100436; bh=18zSlxLW6hAhdBXWIFXD/MmFR9Mxa1xrsMWvFj3m/Bk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1/PdYcc6ym7aB0lwF6lnkPIfCw6qVraLLZldTYC3vCTSpmEDZJl6247BkYPm527WX PTTmyKK0OwydR6T73r8eY//FMIxWKOVjOa0vERsjwRHwhflVGdDlzwp9hd6lnbz3qG WZ3ABh43UMu81XJ6z+VuyStWzMa3P71J5+r4tVws= 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 v4 6/6] input: pm8941-pwrkey: Add resin entry Date: Wed, 27 Jun 2018 17:23:01 +0530 Message-Id: <20180627115301.21330-7-vkoul@kernel.org> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180627115301.21330-1-vkoul@kernel.org> References: <20180627115301.21330-1-vkoul@kernel.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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(+) -- 2.14.4 -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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);