Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3124925pxb; Tue, 19 Jan 2021 14:37:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJyd3k1dAT934aXE+WAmKjOF9COWjSEqGSb/JKCDQlQBrDJiIW7sLId2p4gd+LkOdCbgHsiZ X-Received: by 2002:a17:906:f153:: with SMTP id gw19mr4481558ejb.272.1611095827375; Tue, 19 Jan 2021 14:37:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611095827; cv=none; d=google.com; s=arc-20160816; b=cnD+qOuksxJf1z0V1SFNGtASZ43af/HsNN+FCC1km5Th1cyPJqdroVP8DJnxbS9qWp uWp8rdv/dkS9gQ4mlcqntTU9G4IWxS7AJhUXS5y0i57t9GOAFjTmdoO2fpChITOJZYdp VLNhKFIRoaVYGiAgtJYF+xny/ZQm+ysRkjtlT5OfkQ4RIlGksxQvZXJeqS3prKoHlfcm SuukWCPKIcLYOo58/0TtYLsWJ+wHCy15Wkw+f1ZS8Ci8Qf9uwxlH1XbZ9eGTFBqYQB/C xDzD71RBhXp0vl9zpwZgHU+SpWqJ5Kb52nnn9vWn85/v3i4yArynWTgj8jsi1/pHjJqg elug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :ironport-sdr:ironport-sdr; bh=uUzVFAOr6hEkiFs+sJEwvU57T4NicoE2xUXmwXkSNDg=; b=ouxEhqtCqoqcnj/e85H/Dg0d/8pEdcz1Ahc0mFGOYy4vzqLuezs6xcP3QpEVyikb+i vATBO2eSs8NPdvN8ZS4t0cq9jYI1r+X5kdQpJRUPOLfctT7UBlPAyj3B4H4WOwQ+A/pD S/BFi2R87KSEGEPHyIVDpRfC1L0CL/iuPEtCJSJ08+VGRQkp6yOv7QetfYv1NQo5PEWA szM01uE6sSRwUH+6IDwgcHOEqd94aLA/0jDBjsVe9XoyTeZrS2/eD3gFb+gELhQpeZQf KCZrJ+gdsYI/KgLgeicIMhY9uKRUe56sumYlWsgSoIsGH2Zd1nrNKrOufnQm220E1+hD w6mw== 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 o28si80134edz.348.2021.01.19.14.36.30; Tue, 19 Jan 2021 14:37:07 -0800 (PST) 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 S1728226AbhASWdJ (ORCPT + 99 others); Tue, 19 Jan 2021 17:33:09 -0500 Received: from mga18.intel.com ([134.134.136.126]:24755 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727669AbhASRoS (ORCPT ); Tue, 19 Jan 2021 12:44:18 -0500 IronPort-SDR: dJV84DJ/vSSJ+Hn8A+Wxhhtm3za3Zz/j8Sqwl21dBj00sBMoTG3/iIJ32hKObH1S0bMA52ZeqM W5dm7lHYx3mw== X-IronPort-AV: E=McAfee;i="6000,8403,9869"; a="166632754" X-IronPort-AV: E=Sophos;i="5.79,359,1602572400"; d="scan'208";a="166632754" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jan 2021 09:42:19 -0800 IronPort-SDR: EL58UZk+sJ19P4ixy5WWw7RUj9/Yx+9c2hUyTbYVWS2dSrkQoe04HMeVAzYEqHzQNh6FuH/9zD F+SVCiy3PhJQ== X-IronPort-AV: E=Sophos;i="5.79,359,1602572400"; d="scan'208";a="501005745" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jan 2021 09:42:13 -0800 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1l1v2B-004oA2-Fm; Tue, 19 Jan 2021 19:43:15 +0200 Date: Tue, 19 Jan 2021 19:43:15 +0200 From: Andy Shevchenko To: Laurent Pinchart Cc: Daniel Scally , linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, linux-gpio@vger.kernel.org, linux-i2c@vger.kernel.org, platform-driver-x86@vger.kernel.org, devel@acpica.org, rjw@rjwysocki.net, lenb@kernel.org, andy@kernel.org, mika.westerberg@linux.intel.com, linus.walleij@linaro.org, bgolaszewski@baylibre.com, wsa@kernel.org, lee.jones@linaro.org, hdegoede@redhat.com, mgross@linux.intel.com, robert.moore@intel.com, erik.kaneda@intel.com, sakari.ailus@linux.intel.com, kieran.bingham@ideasonboard.com Subject: Re: [PATCH v2 6/7] platform: x86: Add intel_skl_int3472 driver Message-ID: References: <20210118003428.568892-1-djrscally@gmail.com> <20210118003428.568892-7-djrscally@gmail.com> <20210118144606.GO4077@smile.fi.intel.com> <75e99a06-4579-44ee-5f20-8f2ee3309a68@gmail.com> <1053125f-7cb2-8aa0-3204-24df62986184@gmail.com> <20210119093358.GO4077@smile.fi.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 19, 2021 at 06:36:31PM +0200, Laurent Pinchart wrote: > On Tue, Jan 19, 2021 at 11:33:58AM +0200, Andy Shevchenko wrote: > > On Tue, Jan 19, 2021 at 12:11:40AM +0000, Daniel Scally wrote: > > > On 18/01/2021 21:19, Daniel Scally wrote: ... > > See my previous reply. TL;DR: you have to modify clk-gpio.c to export couple of > > methods to be able to use it as a library. > > That seems really overkill given the very simple implementation of the > clock provided here. Less code in the end is called an overkill? Hmm... I think since we in Linux it's better to utilize what it provides. Do you want me to prepare a patch to show that there is no overkill at all? ... > > > (also, Laurent, if we did it this way we wouldn't be able to also handle > > > the led-indicator GPIO here without some fairly major rework) > > > > LED indicators are done as LED class devices (see plenty of examples in PDx86 > > drivers: drivers/platform/x86/) > > How do you expose the link between the sensor and its indicator LED to > userspace ? Isn't it better to handle it in the kernel to avoid rogue > userspace turning the camera on without notifying the user ? I didn't get this. It's completely a LED handling driver business. We may expose it to user space or not, but it's orthogonal to the usage of LED class IIUC. Am I mistaken here? -- With Best Regards, Andy Shevchenko