Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp543717pxy; Wed, 5 May 2021 08:10:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzCumQrK2ef6Dgq7BxcAuvmvsQP8SbPXyVcB+Bkj+idLWs2sT0OmIp+s25DBnwZm2W4QzJq X-Received: by 2002:a5d:5903:: with SMTP id v3mr38934366wrd.405.1620227458920; Wed, 05 May 2021 08:10:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620227458; cv=none; d=google.com; s=arc-20160816; b=jpgLXH0Uhv//VuB5ejq1Jw/mAhKg0boOn0F/FweAPNV5rH3vgEQwQkurlcihlfIEvA jWJaEykCMMs3vOawWS8G3zMdHC0fetndql2Bo8yqc0G+4T6IKFyfopsyLr5UGYUmqOcY 6rbs05x/81x7ndboVEULG5WJwCv+SU2WFw9SG3D6UjJaTeIoTehpXaighFWk4o58ulek PMBZobBmQbY0Dtv8cttesuiDey7JpXAuaPxIGpBNAPWL8mYAvNAjB9vdzeuclSAbVkSV QnLBVoKKNWoOxJZTILlYN6dMEy+gjSozos+nR4YDtkrAoGskl7X2ea5kSoIifOKrZQpL Qd5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:sender:dkim-signature; bh=VFGUpVbhSw2/apyC9vepkbb02Glfo5sSVvaD/S5XelI=; b=WY7drcDu3rAFZ4WZ/QY9zjdFmhfwPqkhxUzNcB8I7y/3//auD2+PO/jMGSCXYk39hJ IQSAd+AwVpEqeCezSspYHzxcR7+UuI0PuSfDhqTyxOVa2e30lyX65J//ejw5COd28Fe1 x1EoekPzVCx/U6gcZ2HCw7ZL/k4TBq0jPuqIYvKkcdvHgrroEskfTKPG9h3SHTsM5P9w voMI0keup87dA7uREuRVAdwfr6Pc1ZdUXSRVc6ulbtZpDbtv8eqYtsRPXVQPJoArUU3n aG3xgpgwuuC5uJ92ceRz5c8vd5pQIqWXtjrWmRCpq9Z8dMPglbWq0An6sdT4IXNPo6B2 rvyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=BF0reEh8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f7si14052229edu.503.2021.05.05.08.10.34; Wed, 05 May 2021 08:10:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=BF0reEh8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233666AbhEEODJ (ORCPT + 99 others); Wed, 5 May 2021 10:03:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233668AbhEEODI (ORCPT ); Wed, 5 May 2021 10:03:08 -0400 Received: from mail-oi1-x22e.google.com (mail-oi1-x22e.google.com [IPv6:2607:f8b0:4864:20::22e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 976AEC06174A; Wed, 5 May 2021 07:02:11 -0700 (PDT) Received: by mail-oi1-x22e.google.com with SMTP id d21so2236208oic.11; Wed, 05 May 2021 07:02:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=VFGUpVbhSw2/apyC9vepkbb02Glfo5sSVvaD/S5XelI=; b=BF0reEh8p2C7kPm3xF2TxZ9/y8dDAQFHOLsKdOfzCmKkv0Q/bcGvQXH+n3kTDJy5uF s9jCSmcEabM2Y8AzfVZtDBWhQilY1Eo2NYBQDb7D/pK/vx2C3TqLDRXn+1eKJCP49rpo XlfNYvaHbFTNh4iDXprEf0kg3NuAqV95lamDDkmQLH+3gEDfVF6QqqYPQJnXqaf/jDKa D+UK3IE4tKidZ5ia5Al84ABtbqLt7B8B6BcrD08becofqDsBrKQDQeZO1juFoDW/6gcE VICDbES917LojWzvtwbIlQckaqaRmEt1VElxTM+Sb4m8ySMiuVzd/yidoKpQOp4iSviq flHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=VFGUpVbhSw2/apyC9vepkbb02Glfo5sSVvaD/S5XelI=; b=pk6nS+O7KvuApX+au9OqL8zq8xF4f4O2UNcnPm2jDo5XNkLz1DKdURCzR0OBhX6dFG mYigTqpcd9z3YSlzx+MRMkjJ1g6Q08PslttkyRIELeKqSqdc0lPMOa1L8xyqx83oO4lr 0gNRXRknlKwe0gpV7UKjdjbKejHW2AG2+/rxXX2/S+BMEThY6UILu/3/wp1dIoNEcGO0 /bKUFIM/WOBZ/bS+8TBbG1ukPxGAB1fzLtthZkM8nSyekewbW4X31eC/LuPwS1LTVjWJ FgvnaWOHQr20lo8zLQfueICtWn1GeX1b9li0m7+46qLzvpv4Lg/QPbl9QbCaGd7rr/eb 1xdA== X-Gm-Message-State: AOAM533kCMgtQZWn9yq6pffQDe3jCSBmWe32gfxKpHLXnkMrJju3YaCO S0X/yEDMM+o2iyyFhqsYKGE= X-Received: by 2002:a05:6808:51:: with SMTP id v17mr6982333oic.132.1620223331018; Wed, 05 May 2021 07:02:11 -0700 (PDT) Received: from localhost ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id p15sm1494501otl.23.2021.05.05.07.02.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 May 2021 07:02:10 -0700 (PDT) Sender: Guenter Roeck Date: Wed, 5 May 2021 07:02:08 -0700 From: Guenter Roeck To: Ivan Mikhaylov Cc: Jonathan Cameron , Lars-Peter Clausen , Peter Meerwald-Stadler , Jean Delvare , linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, linux-hwmon@vger.kernel.org Subject: Re: [PATCH 4/4] hwmon: vcnl3020: add hwmon driver for intrusion sensor Message-ID: <20210505140208.GA1913659@roeck-us.net> References: <20210430152419.261757-1-i.mikhaylov@yadro.com> <20210430152419.261757-5-i.mikhaylov@yadro.com> <20210430163831.GA3163069@roeck-us.net> <8dbdf071f9f2041b92cabfa417487a3ec3e9647e.camel@yadro.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8dbdf071f9f2041b92cabfa417487a3ec3e9647e.camel@yadro.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 04, 2021 at 10:46:53PM +0300, Ivan Mikhaylov wrote: > On Fri, 2021-04-30 at 09:38 -0700, Guenter Roeck wrote: > > On Fri, Apr 30, 2021 at 06:24:19PM +0300, Ivan Mikhaylov wrote: > > > Intrusion status detection via Interrupt Status Register. > > > > > > Signed-off-by: Ivan Mikhaylov > > > > I think this should, if at all, be handled using the > > iio->hwmon bridge (or, in other words, require a solution > > which is not chip specific). > > Thanks a lot for suggestion, it's actually looks what's needed here instead of > this driver. Anyways, there is no IIO_PROXIMITY support inside supported types > in iio_hwmon.c. Should I add additional case inside this driver for > IIO_PROXIMITY type? > > > I am also not sure if "proximity" is really appropriate to use > > for intrusion detection in the sense of hardware monitoring. > > This would require a proximity sensor within a chassis, which > > would be both overkill and unlikely to happen in the real world. > > "Intrusion", in hardware monitoring context, means "someone > > opened the chassis", not "someone got [too] close". > > > > I'm not sure either but it exists :) And it's exactly for this purpose: > "someone opened the chassis", "how near/far is cover?". > The cost for VCNL3020, for a full reel with 3,300 chips, is $1.17 per chip at Mouser. A mechanical switch costs a couple of cents. A single proximity sensor won't cover all parts of a chassis; one would likely need several chips to be sure that are no blind spots (if that is even possible - I don't think it is in any of my PC chassis due to mechanical limitations). This is on top of programming, which would be sensitive to generating false alarms (or missing alarms, for that matter). That sounds quite impractical and expensive to me. I'd really like to see the actual use case where a proximity sensor (or set of proximity sensors) is used for intrusion detection in the sense of hardware monitoring - not just the technical possibility of doing so, but an actual use case (as in "this vendor, in this chassis, is doing it"). Thanks, Guenter