Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp150615pxa; Thu, 13 Aug 2020 23:20:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzT5xlExnUS6mjbjrihEibAU3O7hPx9rkRzJlTLFFVc8rsC1UTdbOYVN5u7CXSwql0h1bI8 X-Received: by 2002:a17:906:ce3a:: with SMTP id sd26mr952049ejb.489.1597386018911; Thu, 13 Aug 2020 23:20:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597386018; cv=none; d=google.com; s=arc-20160816; b=FMFcpd9QmDgFAOV1eKQAbrt5RD3P9WKCbIKL2gMserjKzsppc74SvK7N27aL8BSG/N TJrzeKvC/LArHkDLZ/0aCoj4jXs3JwWYjfgk3L6ljlA/3zhmHeTcftc194GEhwhhyDM9 LHeKWu4e5JSQnqsxXOB0g1Zldy5SyapNtZTF6x3xvx8Mh24w0PEsg63n7xnQAlF2ZeTp XctQUXSSmhlWquL/bWKzgEtKlzIyM2sZiUl2wZeQAkgZpBEPJftQME4XDujSGNt5eT35 6TeuhcWBmIrZqS9PcSZED4eDz6By5RDbRYaXyBFEsRzMqjeRdrS9yFiDznbLOogMzQ0/ jpbw== 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:references:cc:to:from:subject:ironport-sdr:ironport-sdr; bh=tdmHehL8qZq7RL3ncctzSjNTK53HpoUC60kiZI8CXzY=; b=TPHNrV5cVFKBlTMxzvq7JTugOk2ANT4z+BaC/K0c3LT3lN5nQ0xZqp/SuHaEPET+yS /kanicHOk7hTjFrx89FnVeLCa7UYkOOi1IUqDFqh+3tKubm843V0E9jryBDWOMAY6W8L WC6YlfgYzvC06tv6gp4+8RW9jUHs63H5bjIqzuoVE1nOLdxmS8tL0UMvLj5i4GOCev34 ynIs/Sf5+uTj6VTdjnqyx0yXuSQa5IrCVO6XxEdhZ7xBfHi5xoYUkwdMs2lAd/5ulL2e UphV8wBmtx/ziRgAMahCoBmQJjbseY/nMl9umUFxQ4doy+Kp7n9QQnNRIbUUKgmQY+QJ 1PvA== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p6si4717544ejj.300.2020.08.13.23.19.54; Thu, 13 Aug 2020 23:20:18 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726297AbgHNGTW (ORCPT + 99 others); Fri, 14 Aug 2020 02:19:22 -0400 Received: from mga09.intel.com ([134.134.136.24]:15966 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726185AbgHNGTW (ORCPT ); Fri, 14 Aug 2020 02:19:22 -0400 IronPort-SDR: qc3QO0RWv3PDkKWWUnzAvTB3m1g11J8gI61bOogi8VRRUGjjDdgIhsv142EBIXi6bIpJGyw9t9 Ku0mZ16r6Rxg== X-IronPort-AV: E=McAfee;i="6000,8403,9712"; a="155474553" X-IronPort-AV: E=Sophos;i="5.76,311,1592895600"; d="scan'208";a="155474553" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Aug 2020 23:19:21 -0700 IronPort-SDR: 545gqfD32bKwafgjhPqXEZJ/MY8MH2jMl8R6xD4Y1UwfyHWY5cxN1DzxA7dp7Ew+2hDGUaO/P8 hx+H8DlmnLWg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,311,1592895600"; d="scan'208";a="318784992" Received: from ipu5-build.bj.intel.com (HELO [10.238.232.196]) ([10.238.232.196]) by fmsmga004.fm.intel.com with ESMTP; 13 Aug 2020 23:19:17 -0700 Subject: Re: [PATCH v5 0/6] Support running driver's probe for a device powered off From: Bingbu Cao To: Sakari Ailus , linux-i2c@vger.kernel.org Cc: Wolfram Sang , "Rafael J. Wysocki" , linux-acpi@vger.kernel.org, Bingbu Cao , linux-media@vger.kernel.org, Chiranjeevi Rapolu , Hyungwoo Yang , Bartosz Golaszewski , Arnd Bergmann , linux-kernel@vger.kernel.org, Greg Kroah-Hartman , rajmohan.mani@intel.com, Tomasz Figa , "Qiu, Tian Shu" References: <20200810142747.12400-1-sakari.ailus@linux.intel.com> <5353041e-850f-05ad-3b20-35e91fc9501e@linux.intel.com> Message-ID: Date: Fri, 14 Aug 2020 14:18:10 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <5353041e-850f-05ad-3b20-35e91fc9501e@linux.intel.com> Content-Type: text/plain; charset=windows-1252 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 8/14/20 12:11 PM, Bingbu Cao wrote: > > > On 8/10/20 10:27 PM, Sakari Ailus wrote: >> Hi all, >> > ...snip... >> >> The use case is such that there is a privacy LED next to an integrated >> user-facing laptop camera, and this LED is there to signal the user that >> the camera is recording a video or capturing images. That LED also happens >> to be wired to one of the power supplies of the camera, so whenever you >> power on the camera, the LED will be lit, whether images are captured from >> the camera --- or not. There's no way to implement this differently >> without additional software control (allowing of which is itself a >> hardware design decision) on most CSI-2-connected camera sensors as they >> simply have no pin to signal the camera streaming state. >> >> This is also what happens during driver probe: the camera will be powered >> on by the I?C subsystem calling dev_pm_domain_attach() and the device is >> already powered on when the driver's own probe function is called. To the >> user this visible during the boot process as a blink of the privacy LED, >> suggesting that the camera is recording without the user having used an >> application to do that. From the end user's point of view the behaviour is >> not expected and for someone unfamiliar with internal workings of a >> computer surely seems quite suspicious --- even if images are not being >> actually captured. >> >> I've tested these on linux-next master. They also apply to Wolfram's >> i2c/for-next branch, there's a patch that affects the I?C core changes >> here (see below). The patches apart from that apply to Bartosz's >> at24/for-next as well as Mauro's linux-media master branch. > > Sakari, we meet one issue - once the vcm sub-device registered, the user space > will try to open the VCM (I have not figure out who did that), it will also > trigger the acpi pm resume/suspend, as the VCM always shares same power rail > with camera sensor, so the privacy LED still has a blink. Sakari, please ignore my previous comment, it is not related to this change. I see the sub device open is caused by v4l_id program from udev. > >> > ...snip... > -- Best regards, Bingbu Cao