Received: by 10.223.176.5 with SMTP id f5csp65988wra; Tue, 30 Jan 2018 08:09:42 -0800 (PST) X-Google-Smtp-Source: AH8x225XCg7x8tAo2VfVwjf5zmvQhSSTIn57YTNGw0a6qpepBU9UyT/klysJ6fqERdBk8PVXISDG X-Received: by 10.99.140.72 with SMTP id q8mr23659267pgn.51.1517328581973; Tue, 30 Jan 2018 08:09:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517328581; cv=none; d=google.com; s=arc-20160816; b=JDU0jSuKK6PQT7/H3Ib0kNsLB4gf18C051rsyBNhWvKKLHqCjyAR9EjyrsbcdvjzLE /Vs0ckdxFv2c+CDO0O9h9VW0oIqgyVEhDsMYGf+TiqAnqK68Xvli2yUj8AiJqAVjRugp SuWjqIUJLR2kunF1rVdzAGD5Hz2IPWCtCYQ3Q670FveT6Q7ZNL8pc8hb5SH7obuCJRQk jETcD1pRXowIk8LYNGAFTARGG4XD7vqL4B/RbCqLmLi9d9kLEIUBpAPdis7VqsDXhdqH KBXy+CccGWD//6ZUVSbJhtp7FQ+g1k9Ml6ti62q+r/vZkj20fdYWlF7lAal0oGRkEYB8 lv6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=dl//qPpDQCrTmwvCzcMIHsBYvt9MhoY2Iimkow9oFQI=; b=pjRb48+7MfS/N7Cw5GTqMPDx8YllxfB9IRgJh2J40OoFdzFdQsiZ+2ngQ7UwURH8eU +GNSWEYB9Pl4JTnp110kOJxXqxSP5wL+jnHkub+X5Jh3el65f1eI+undYkYv9UyvAdO0 IBOKkbys7bsuFrCNb2rOGXFQ7CukEMZLOXgGQL0heO/hjx4gPfx6fxHy5KQXFTN/ynhB PKEdLDs02zmmobyiDRT37YWyKxhnmeZqoibKAhwE+m8udvjYQrj8E39AFZ+drkNANSZK Dr0ZYp3Pze2rs5DL+6OgjD6Fg3e94cF0bUjL43YBQcn1UKxIteKzvaGPI2QG97DaXa3F VySg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=OE4UyDaL; 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 p128si1659916pga.15.2018.01.30.08.08.55; Tue, 30 Jan 2018 08:09:41 -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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=OE4UyDaL; 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 S1752242AbeA3OPY (ORCPT + 99 others); Tue, 30 Jan 2018 09:15:24 -0500 Received: from mail-pf0-f193.google.com ([209.85.192.193]:43381 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751711AbeA3OPW (ORCPT ); Tue, 30 Jan 2018 09:15:22 -0500 Received: by mail-pf0-f193.google.com with SMTP id y26so9081733pfi.10; Tue, 30 Jan 2018 06:15:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=dl//qPpDQCrTmwvCzcMIHsBYvt9MhoY2Iimkow9oFQI=; b=OE4UyDaL0scgI39ujDeXGm6+WcdDxDm3Kb1TDBYD+5GFqV0LhY1YMAanEbXXkgwxl/ INUNAu7UJwjnw2et4V41tgIMFBkVnSsJDgnBHcc8vRAz043FGnkpdiRpZADW+YUfjUJC SU4WVVNqsHOqdvfWDmzSU1b7wuV3JaBXltNYZjXmASzaiEnXiS90wwzYUSQ+RLQz8I8K V2xfd6yPNDQbn6ByoURPhxk7TgsQ5wU3BB+HUzUEiGtGNqsYUqVOCOX4AYDjty0rXjwT 6xsmv5n8zSofwLFz7X0LpkFZ7Vdgbdx7NVuI4xyzehdKNRNZA4ZkyT3dh1U/9lcOZuZG kxJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=dl//qPpDQCrTmwvCzcMIHsBYvt9MhoY2Iimkow9oFQI=; b=gNjYk03aVVIiJh/MaYEPVXIBCxVTePyg3SjE5DN28VN9NiDHz/gmMJy1dlGEa3XmzI 5bvEtDW7uA8aUYaKEEiMfI1YY4XMKyKZoxNSFlxIqLA4yQGBR8W8x5Rt+gNWA1UPc5m/ 1pFOx/6+K4tM/NFtQ/GDeObZOwASQcvNt1DeOCS/grK4Q49rjsP8YoZo0Tq7tGa0zFMM w53ru8DPaF+Z/S5GVPmmDmiBcm+sXgVZbRs6/OBPYkwRZTpP0CdZH/FN/wHj5557F6Ea o10gHPjcH/zUUc/Cb8HDINA0xrmcbTBd5EnKA5Ad/3fjnjoiODO+lhwR6NYwXDs+D4Nu fkHQ== X-Gm-Message-State: AKwxyteMV6qeav0Jzmz44XVQztTW2edKmoebbPiIb1GWaX9ELTnim2Kl GIgkus4chm+xcwNV1VP5Q1L/Lw== X-Received: by 10.101.83.76 with SMTP id w12mr23295632pgr.95.1517321721505; Tue, 30 Jan 2018 06:15:21 -0800 (PST) Received: from server.roeck-us.net (108-223-40-66.lightspeed.sntcca.sbcglobal.net. [108.223.40.66]) by smtp.gmail.com with ESMTPSA id k90sm35883767pfk.171.2018.01.30.06.15.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 30 Jan 2018 06:15:20 -0800 (PST) Subject: Re: [PATCH 4/4] rtc: isl1208: add support for isl1219 with hwmon for tamper detection To: Denis OSTERLAND , "alexandre.belloni@free-electrons.com" Cc: "linux-rtc@vger.kernel.org" , "a.zummo@towertech.it" , "kernel@pengutronix.de" , "mgr@pengutronix.de" , "jdelvare@suse.com" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" References: <20180123121801.4214-1-m.grzeschik@pengutronix.de> <20180123121801.4214-5-m.grzeschik@pengutronix.de> <20180123182254.GA27379@roeck-us.net> <20180124090333.r5o2mzpm4q536w4r@pengutronix.de> <20180129215919.GA17988@roeck-us.net> <20180130102740.GD2809@piout.net> <1517312409.5307.22.camel@diehl.com> From: Guenter Roeck Message-ID: Date: Tue, 30 Jan 2018 06:15:18 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <1517312409.5307.22.camel@diehl.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/30/2018 03:40 AM, Denis OSTERLAND wrote: > Am Dienstag, den 30.01.2018, 11:27 +0100 schrieb Alexandre Belloni: >> On 29/01/2018 at 13:59:19 -0800, Guenter Roeck wrote: >>> >>> On Wed, Jan 24, 2018 at 10:03:33AM +0100, Michael Grzeschik wrote: >>> [ ... ] >>>> >>>>> >>>>>> >>>>>> + >>>>>> diff --git a/Documentation/hwmon/sysfs-interface b/Documentation/hwmon/sysfs-interface >>>>>> index fc337c317c673..a12b3c2b2a18c 100644 >>>>>> --- a/Documentation/hwmon/sysfs-interface >>>>>> +++ b/Documentation/hwmon/sysfs-interface >>>>>> @@ -702,6 +702,13 @@ intrusion[0-*]_alarm >>>>>>   the user. This is done by writing 0 to the file. Writing >>>>>>   other values is unsupported. >>>>>> >>>>>> +intrusion[0-*]_timestamp >>>>>> + Chassis intrusion detection >>>>>> + YYYY-MM-DD HH:MM:SS UTC (ts.sec): intrusion detected >>>>>> + RO >>>>>> + The corresponding timestamp on which the intrustion >>>>>> + was detected. >>>>>> + >>>>> Sneaky. Nack. You don't just add attributes to the ABI because you want it, >>>>> without serious discussion, and much less so hidden in an RTC driver >>>>> (and even less as unparseable attribute). >>>> Right; but it was not meant to be sneaky. I should have stick to my first >>>> thought and label this patch RFC. Sorry for that. >>>> >>>>> >>>>> In addition to that, I consider the attribute unnecessary. The intrusion >>>>> already generates an event which should be sufficient for all practical >>>>> purposes. >>>> Would it make sense in between the other sysfs attributes of this driver? >>>> >>> I don't understand what you mean with that, sorry. >>> >>> From an ABI perspective, the attibute doesn't add value since it is >>> highly device specific (or at least it is the only chip I am aware of >>> which reports such a time stamp). Feel free to add the attribute to the >>> driver and document it, but not as part of the hwmon ABI. In that >>> case I would be inclined to accept it. However, keep in mind that >>> your version, reporting a human readable date/time, would effectively >>> preclude it from ever making it into the ABI. >>> >> Actually, there are many RTCs that are able to register one or more >> timestamps. My plan was to add support for that soon but I was not >> planning to do so in the hwmon ABI as this may be used for something >> that is not intrusion detection (interval timers for example). > What would you suggest? > I think about something like this: > event[0-*]_timestamp: timestamp in seconds since epoch or empty if not triggered > event[0-*]_alarm: 1 if event was triggered, else 0; write 0 to clear event Sure, that makes sense if the events are not specifically related to intrusion detection. Question is if there would ever be more than one or if event_timestamp and event_alarm would be sufficient. Guenter