Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1497954imm; Tue, 10 Jul 2018 02:55:12 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeHNEU0/tar9iKkXzNBD0SABNx86H0wJO+oFcCjOOfIsvr11M68O7j7aGRUTEcrJjzHynNj X-Received: by 2002:a62:5290:: with SMTP id g138-v6mr25032281pfb.46.1531216512846; Tue, 10 Jul 2018 02:55:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531216512; cv=none; d=google.com; s=arc-20160816; b=BbnfOah0T9QA6h4mi6vQ8uSvmyX8LAZ4CqIW6mfmDtn8GrAuPnyEGc9PM9HGUZe0PC k9Cdrq0G3WsW0RdIfEEpWhh9+XIeqmXvpG6tdj6IzBg0hTmfH71Ba6/KFFo0WbO660cC xXEm8MSyq17VZGqVHzaYE21HQdZ3cDZ+tbbXtpAgIarRMXWZGkod+ez1fjdBTZ39TUJM KICNM9O0mALUy+D6U4VAQn/NHKfOiYnpFenT1sNWsqnye3Zdzm8DBLYCwv8LgQg6Y7rG rydybObs9DpKL/TlutbN2hXHSXdgaUunDdeDAsauvzMNgtgDMsXBO4SZTVU5n1h1RnxH VHww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:mime-version:accept-language:in-reply-to :references:message-id:date:thread-index:thread-topic:subject:cc:to :from:arc-authentication-results; bh=vvGtcHNrd24vdHGYTEyVMlTyc+dNRqIB0VCV6BDf95c=; b=BF46MUY3vQMS6Z+vM6Vs+ILvXe7H9hCMJJNviWWehdSSyjzZ4KmwXyAPGrB0jj9791 OZs7BdjjdHNxkdZ3+PGXhe41VOLsZK7Dx5ukALOrHf3s8I7Jty09CeCNFn+BoTC3FhZD T9ll6FBH0e2l4GplnC/DdzfQPGJvKIUjcygDtEjDJeAzVbb20t896CauB5NQY7pF8BZj WJKTuNa1a6ZsC9N6dA3pEVpqMpaStoniDb+0gndhTBa+ADeSDK0ZAA8AQ/iUgeFM/98N GB+ua2lfrraFbBvNCaCbJ0vEO7+4/ylnh8IOxlXUo2ZDHQeBtz+tbmqaq8XCCj9A2mcP eycw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 72-v6si14796449pfq.6.2018.07.10.02.54.56; Tue, 10 Jul 2018 02:55:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932172AbeGJJyE convert rfc822-to-8bit (ORCPT + 99 others); Tue, 10 Jul 2018 05:54:04 -0400 Received: from enterprise03.smtp.diehl.com ([193.201.238.214]:34098 "EHLO enterprise03.smtp.diehl.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751194AbeGJJyC (ORCPT ); Tue, 10 Jul 2018 05:54:02 -0400 X-Greylist: delayed 584 seconds by postgrey-1.27 at vger.kernel.org; Tue, 10 Jul 2018 05:54:01 EDT X-$ESA-Groupmapping: true X-IronPort-AV: E=Sophos;i="5.51,334,1526335200"; d="scan'208";a="1300769" From: Denis OSTERLAND To: "a.zummo@towertech.it" , "alexandre.belloni@bootlin.com" CC: "linux-kernel@vger.kernel.org" , "robh+dt@kernel.org" , "m.grzeschik@pengutronix.de" , "devicetree@vger.kernel.org" , "mark.rutland@arm.com" , "linux-rtc@vger.kernel.org" , "kernel@pengutronix.de" , Denis OSTERLAND Subject: [PATCH v4 4/5] rtc: isl1208: set ev-evienb bit from device tree Thread-Topic: [PATCH v4 4/5] rtc: isl1208: set ev-evienb bit from device tree Thread-Index: AQHUGDKQc+Asm28t0ECDKItPGJBMwA== Date: Tue, 10 Jul 2018 09:44:15 +0000 Message-ID: <20180710090710.9066-5-Denis.Osterland@diehl.com> References: <20180710090710.9066-1-Denis.Osterland@diehl.com> In-Reply-To: <20180710090710.9066-1-Denis.Osterland@diehl.com> Accept-Language: de-DE, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: Evolution 3.18.5.2-0ubuntu3.2 MIME-Version: 1.0 X-TrailerSkip: 1 X-GBS-PROC: 415AWy8o668fDtCxszluz0zTROt74XCFScM92SyQlssW7uUDrG43Dh3mm4ySY7fh X-TNEFEvaluated: 1 Content-Transfer-Encoding: 8BIT Content-Type: text/plain; charset="iso-8859-1" Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Denis Osterland Add support to disable event in pull-up. Signed-off-by: Denis Osterland --- drivers/rtc/rtc-isl1208.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/rtc/rtc-isl1208.c b/drivers/rtc/rtc-isl1208.c index bbe08c1ab9f3..2f18ee3c615a 100644 --- a/drivers/rtc/rtc-isl1208.c +++ b/drivers/rtc/rtc-isl1208.c @@ -44,6 +44,7 @@ #define ISL1208_REG_INT_IM (1<<7) /* interrupt/alarm mode */ #define ISL1219_REG_EV 0x09 #define ISL1219_REG_EV_EVEN (1<<4) /* event detection enable */ +#define ISL1219_REG_EV_EVIENB (1<<7) /* event in pull-up disable */ #define ISL1208_REG_ATR 0x0a #define ISL1208_REG_DTR 0x0b @@ -777,7 +778,10 @@ isl1208_probe(struct i2c_client *client, const struct i2c_device_id *id) "please set clock.\n"); if (id->driver_data == TYPE_ISL1219) { + struct device_node *np = client->dev.of_node; rc = ISL1219_REG_EV_EVEN; + if (of_get_property(np, "isil,ev-evienb", NULL)) + rc |= ISL1219_REG_EV_EVIENB; rc = i2c_smbus_write_byte_data(client, ISL1219_REG_EV, rc); if (rc < 0) { dev_err(&client->dev, "could not enable tamper detection\n"); @@ -786,7 +790,7 @@ isl1208_probe(struct i2c_client *client, const struct i2c_device_id *id) rc = rtc_add_group(rtc, &isl1219_rtc_sysfs_files); if (rc) return rc; - evdet_irq = of_irq_get_byname(client->dev.of_node, "evdet"); + evdet_irq = of_irq_get_byname(np, "evdet"); } rc = sysfs_create_group(&client->dev.kobj, &isl1208_rtc_sysfs_files); -- 2.18.0 Diehl Connectivity Solutions GmbH Gesch?ftsf?hrung: Horst Leonberger Sitz der Gesellschaft: N?rnberg - Registergericht: Amtsgericht N?rnberg: HRB 32315 ___________________________________________________________________________________________________ Der Inhalt der vorstehenden E-Mail ist nicht rechtlich bindend. Diese E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen. Informieren Sie uns bitte, wenn Sie diese E-Mail faelschlicherweise erhalten haben. Bitte loeschen Sie in diesem Fall die Nachricht. Jede unerlaubte Form der Reproduktion, Bekanntgabe, Aenderung, Verteilung und/oder Publikation dieser E-Mail ist strengstens untersagt. The contents of the above mentioned e-mail is not legally binding. This e-mail contains confidential and/or legally protected information. Please inform us if you have received this e-mail by mistake and delete it in such a case. Each unauthorized reproduction, disclosure, alteration, distribution and/or publication of this e-mail is strictly prohibited.