Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp8562168ybn; Tue, 1 Oct 2019 09:50:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqxc+7ZHBNL6G1E9ZXOoqDAj5kXfYfpfke20qeDVrJtmYtsc5aiC3o23izP1TizqhyZ9b98x X-Received: by 2002:a17:906:1991:: with SMTP id g17mr11268388ejd.220.1569948657967; Tue, 01 Oct 2019 09:50:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569948657; cv=none; d=google.com; s=arc-20160816; b=YIwwPgSl4DfMFVS0IYbLtvuS0++Z7jHgh9/H5jVsVJx/MXWF1d9upTpQoqn9SMh9hm mZIf5RwOnOJiWtQQIYEQVusiIjouJG+evpydb9Aur9MrnP53IjN+GXk3TNL6C1uotQEW anXK6Tu32jxqztikaIhnFWjTH2gfrlS4bdzf1nv2INx0b9TS3CgCZhtUhi7OjRvtPPUI 3cOhv4uKEQCIxOd+l/AnIs6qq3gydkptiwIrL6/ZoqLz8MTEBj8EWs/V/ZwUxQ/zfaxk YvGcl7tOkElNuIpxSBFGOiHRTFNrIAS53eG41KOc1kLsx/t1uOZmL2bcD/S54yKGfkoi bYNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :mime-version:dkim-signature; bh=rVNHxQBv3COxHhMQfRaJbsiP7eYBEtcANM45F8qCpHU=; b=vvS82SCTByMkm2Avept9TeWyVZpQejiAb+1A7zJQF6kOyBG4XQny7s57qcoNwTuCcn jMgdveR0rvnaxC00/rjzdTYgMkwQy/LkRFgFUI51JQdt6rZzw4Cx3RNRtJKYkUqEjJxC 3cURm3tPHAIX+v9F0yoIQb3MkrmIT/jiQBMXjsEdLp+FT/6HYKtb3IZyenexqmftubAf OFxZZEGqjCKrkTW5/UfDz4cOJ/RrIdRaQ2Igj+XETJhfNyrA0up0cPzNNZOZAkWj4X6k e12cZX0TfaIKggyJrH+7/0NE5RPb4F8/Coubqg1/kx19h6p7dBjfmaZRgPyRzcw8ynDf +wGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Mv94PspY; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g19si8978266ejj.120.2019.10.01.09.50.32; Tue, 01 Oct 2019 09:50:57 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=Mv94PspY; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730874AbfJAQKA (ORCPT + 99 others); Tue, 1 Oct 2019 12:10:00 -0400 Received: from mail-yw1-f46.google.com ([209.85.161.46]:38312 "EHLO mail-yw1-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725865AbfJAQKA (ORCPT ); Tue, 1 Oct 2019 12:10:00 -0400 Received: by mail-yw1-f46.google.com with SMTP id s6so5013812ywe.5 for ; Tue, 01 Oct 2019 09:09:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:from:date:message-id:subject:to:cc; bh=rVNHxQBv3COxHhMQfRaJbsiP7eYBEtcANM45F8qCpHU=; b=Mv94PspYigl7q8wmgc5vXgkz1pxWmodiRXjtZIwuZy10JWWm6EQ47KE5CnnD6beSy/ C6HPagwpcJvUl4IQZHud39oiNOzkrtsFHHy9sl4b2ZbHkbqmQF7u5p7EHbKzfHAbnD+e 2Od1UHXavtM+a2oUn+EEAFMxAPO288yETwRZ7ZUx1zKLhLuG6u5ubED5csxPuQoCZZjS ydiDGMjXRoTf/hTlHnSCr1wD0s0GzX8nw+kVPTNa0slNzuAivsxBZq1DD1QOxKLsdnMR wC+35VeZp0POFXyNgX/IEdZgFU20SYRLggZ5TSLl+EmuPqzkwCFNg0ln3KSHbP4+glrm 8YGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=rVNHxQBv3COxHhMQfRaJbsiP7eYBEtcANM45F8qCpHU=; b=ncDfYblA17VVJ3UFk2xyh0FEMAQH4BG1okQaRHi6NLHWGyqibzOWAbBGus8YzK0OtN hTzrLWcFUYeKFwph8SBx7C/zpt6DXB6dTWxWiM+tmsBZHjGlO/lNXQsQ5/C7T7O4O6ig MAcxmmAFstQQJAFLvZZh4QRfUuQyn0SXX0BqJbJzeCO3C0ihqPkeIMNK/JYLKL3QaB8d /PzLPervsVQnBWlHp5ehJ4Hfq4Dw/OiSwdta6dsjTmW9GZ9wRdqYz9c6j7p4hoI19xeB ou0yPuAWYfxwU40xfuDTAKU9pAwGtpzkcBxDPy2th8q3+VkswYAFZIt4Ea/lXs4s5O12 cqHg== X-Gm-Message-State: APjAAAXJvYh+QUEmJK8mN3jBAxBKNcI5kO57rDqGYcsWesrU2hHDhn1a rVYImjv2zvGGhGcfrF6u6FQPBtmvg+3tS45j0nTR2NEJr7PPlJ+2 X-Received: by 2002:a81:3203:: with SMTP id y3mr9566155ywy.217.1569946197092; Tue, 01 Oct 2019 09:09:57 -0700 (PDT) MIME-Version: 1.0 From: Mat King Date: Tue, 1 Oct 2019 10:09:46 -0600 Message-ID: Subject: New sysfs interface for privacy screens To: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Cc: gregkh@linuxfoundation.org, rafael@kernel.org, Ross Zwisler , Rajat Jain , Lee Jones , Daniel Thompson , Jingoo Han Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Resending in plain text mode I have been looking into adding Linux support for electronic privacy screens which is a feature on some new laptops which is built into the display and allows users to turn it on instead of needing to use a physical privacy filter. In discussions with my colleagues the idea of using either /sys/class/backlight or /sys/class/leds but this new feature does not seem to quite fit into either of those classes. I am proposing adding a class called "privacy_screen" to interface with these devices. The initial API would be simple just a single property called "privacy_state" which when set to 1 would mean that privacy is enabled and 0 when privacy is disabled. Current known use cases will use ACPI _DSM in order to interface with the privacy screens, but this class would allow device driver authors to use other interfaces as well. Example: # get privacy screen state cat /sys/class/privacy_screen/cros_privacy/privacy_state # 1: privacy enabled 0: privacy disabled # set privacy enabled echo 1 > /sys/class/privacy_screen/cros_privacy/privacy_state Does this approach seem to be reasonable?