Received: by 10.223.176.5 with SMTP id f5csp3583716wra; Mon, 29 Jan 2018 15:42:29 -0800 (PST) X-Google-Smtp-Source: AH8x226kubjWq0jOGMsBky///m/0YboVJlzb0JP6xjdi89kxdNYv+NBrn4y+vG4swodgrksjJzBv X-Received: by 10.99.149.8 with SMTP id p8mr21658540pgd.186.1517269348882; Mon, 29 Jan 2018 15:42:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517269348; cv=none; d=google.com; s=arc-20160816; b=H98v7Mt7NH9v1ns/vZ2j/vVwp/xppDS992lkXbn9HpHm7DAGIiwPBFakvWEik47Evh vhcV493IfX2sMNv96MDpeG8NUUAjANnsgZN2+T3n3gD3R20t1s1U4f6yfogiRwRnxLG7 pv3RjlyoWj4hMajd/WZ4LWq+fz1/IVGf8tpyrr7fw8yor06pbDOg9E+oV7vEKByF4FiE fM4ISkYo9vYZd7JvSRddm2mmnM/PiUc4QelYbz2IT6qcXhksMstxN4SF99MhQDhDvSKn Tt6qFlokcEaT25Gv+CFT5ia81O9jEi4Tm66U9pLpFpEOHugvCqVegEsATME3PBD/2xNK Dokw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=bxvSoTe7fBhw4kH3AW6vUeMTev+ebRHqFbsGH46Kn+o=; b=gcLQVO6eDOQ1UAHm4hrIVd3PsOrExERM3XemCWSR/FpRhtw6Wb81TdbDV+qg/KGtxZ i0iNTs0uAt36keCFgLbaQO/OyNn1T8NgVrvLnC8sWK3hBj6a91MuWi9ndYCnQNzDMHtY FzlGM9fr/DVH1xp3LmTwDM+7gJTr7S91FE7IwxR3cc6UZCMnPkB9IzhTo458X8ieFyIP K1/OKbJb5GBfo7y2RKpqw+HpZmUlFBe0Q4zoNljrtAFGDcEHHWJ298slGejgmw8wIxTL el+5dtvY+9+BW1NID6mEtk8qCxeWRtKh/EAkkQK5az0PrXL8o+i5eBOsSzatqTHX8GrH 0c/A== 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 z96-v6si342069plh.100.2018.01.29.15.42.13; Mon, 29 Jan 2018 15:42:28 -0800 (PST) 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 S1751988AbeA2Xlt (ORCPT + 99 others); Mon, 29 Jan 2018 18:41:49 -0500 Received: from mail-oi0-f66.google.com ([209.85.218.66]:39645 "EHLO mail-oi0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751417AbeA2Xls (ORCPT ); Mon, 29 Jan 2018 18:41:48 -0500 Received: by mail-oi0-f66.google.com with SMTP id j188so5043383oib.6; Mon, 29 Jan 2018 15:41:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=bxvSoTe7fBhw4kH3AW6vUeMTev+ebRHqFbsGH46Kn+o=; b=FtXpao3UpXfez+FNGIG7FcR0kh/lL1wLCL4LFe2NeqCBO3JU+0Q/oWWeAzmgTjiYKP XUphX8Mld+7mSNUGS3NBbWemc6VDmIHOnvpuIHXfksWkCY1AjPogwfYyU9ufpRyqvw67 uDehdarMmTHU+HkgZIId4u8JMoYTLVCVOBX37MslTuWlJRaVWEgPMRsIPvaRD69AMomo +yd7U4v6FhZCmMvqXmkwgJ5Jq2EpQ3aCP/JcYkqEtbldE0SEt8gXvEHXybv50x0kokbq 1QNahH+hohjecszsZ1XXoFzWJogjovNjyRX4WgCgeVijfMdbdMsB8vxWSeAd2AZdchkF lYdQ== X-Gm-Message-State: AKwxytcP9m66vEDn3bgUs544uiIlX+fRUWPCTzJguYXp38QQwW0YQUj/ BHZ4IBocPUbRFGeo/KqNgw== X-Received: by 10.202.182.65 with SMTP id g62mr18716108oif.224.1517269307556; Mon, 29 Jan 2018 15:41:47 -0800 (PST) Received: from localhost (216-188-254-6.dyn.grandenetworks.net. [216.188.254.6]) by smtp.gmail.com with ESMTPSA id 11sm4640779oiq.34.2018.01.29.15.41.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 29 Jan 2018 15:41:47 -0800 (PST) Date: Mon, 29 Jan 2018 17:41:46 -0600 From: Rob Herring To: Michael Grzeschik Cc: a.zummo@towertech.it, alexandre.belloni@free-electrons.com, linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux@roeck-us.net, jdelvare@suse.com, kernel@pengutronix.de, Denis.Osterland@diehl.com Subject: Re: [PATCH 4/4] rtc: isl1208: add support for isl1219 with hwmon for tamper detection Message-ID: <20180129234146.73hvclxohhme5i2w@rob-hp-laptop> References: <20180123121801.4214-1-m.grzeschik@pengutronix.de> <20180123121801.4214-5-m.grzeschik@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180123121801.4214-5-m.grzeschik@pengutronix.de> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 23, 2018 at 01:18:01PM +0100, Michael Grzeschik wrote: > We add support for the ISL1219 chip that got an integrated tamper > detection function. This patch implements the feature by using an hwmon > interface. > > The ISL1219 can also describe the timestamp of the intrusion > event. For this we add the documentation of the new interface > intrusion[0-*]_timestamp. > > The devicetree documentation for the ISL1219 device tree > binding is added with an short example. > > Signed-off-by: Michael Grzeschik > Signed-off-by: Denis Osterland > --- > .../rtc/{intersil,isl1208.txt => isil,isl1208.txt} | 18 +- > Documentation/hwmon/sysfs-interface | 7 + > drivers/rtc/rtc-isl1208.c | 190 +++++++++++++++++++-- > 3 files changed, 201 insertions(+), 14 deletions(-) > rename Documentation/devicetree/bindings/rtc/{intersil,isl1208.txt => isil,isl1208.txt} (57%) > > diff --git a/Documentation/devicetree/bindings/rtc/intersil,isl1208.txt b/Documentation/devicetree/bindings/rtc/isil,isl1208.txt > similarity index 57% > rename from Documentation/devicetree/bindings/rtc/intersil,isl1208.txt > rename to Documentation/devicetree/bindings/rtc/isil,isl1208.txt > index a54e99feae1ca..d549699e1cfc4 100644 > --- a/Documentation/devicetree/bindings/rtc/intersil,isl1208.txt > +++ b/Documentation/devicetree/bindings/rtc/isil,isl1208.txt > @@ -1,14 +1,21 @@ > -Intersil ISL1208, ISL1218 I2C RTC/Alarm chip > +Intersil ISL1208, ISL1218, ISL1219 I2C RTC/Alarm chip > > ISL1208 is a trivial I2C device (it has simple device tree bindings, > consisting of a compatible field, an address and possibly an interrupt > line). > > +ISL1219 supports tamper detection user space representation through > +case intrusion hwmon sensor. User space and hwmon are Linux details not relevant to the binding. Just describe the h/w. > +ISL1219 has additional pins EVIN and #EVDET for tamper detection. > +I2C devices support only one irq. #IRQ and #EVDET are open-drain active low, > +so it is possible layout them to one SoC pin with pull-up. > + > Required properties supported by the device: > > - "compatible": must be one of > "isil,isl1208" > "isil,isl1218" > + "isil,isl1219" > - "reg": I2C bus address of the device > > Optional properties: > @@ -33,3 +40,12 @@ Example isl1208 node with #IRQ pin connected to SoC gpio1 pin 12: > interrupt-parent = <&gpio1>; > interrupts = <12 IRQ_TYPE_EDGE_FALLING>; > }; > + > +Example isl1219 node with #IRQ pin and #EVDET pin connected to SoC gpio1 pin 12: > + > + isl1219: isl1219@68 { > + compatible = "intersil,isl1219"; > + reg = <0x68>; > + interrupts-extended = <&gpio1 12 IRQ_TYPE_EDGE_FALLING>; With 2 interrupts, you should have 2 values. If they are connected together, just repeat the connection. Otherwise, you can't tell if EVDET is a no connect. There's not much point in having an example for every compatible. This binding is simple enough, one should be enough. > + }; > +