Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp43778pxu; Tue, 24 Nov 2020 18:03:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJw48xoNLnOusSqUSjdqEJZ7OzzzCmgEP3G5DDsp9xQJkZEHFwz2gUW5FPDqYn87hSjt4yyp X-Received: by 2002:a17:906:3ec8:: with SMTP id d8mr1295511ejj.32.1606269837738; Tue, 24 Nov 2020 18:03:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606269837; cv=none; d=google.com; s=arc-20160816; b=Ga/RGj1qvBCqjQK6FjF/GYG6Gc76QEINlxAcA2O9aA17xc0DFMfOD1aqOomy5wnvPc jbSzIrTx9Y/5+rKATlq2jne+3k1eaws1p5BLiYWxQH6jlGhgOYCJvUkYl/NSvQSb5Uf8 0bB/fJnKSySd6sHSINvzVc3OBt1D2+GfkN6MQBs3jgjFSprITiJUIDwd5rL7M87hzlXD Q01G8f8At7ZPP9sjg7tu06UHHr4r7/rjmNcVGHq8Y5O/x8QePmYl+R52Nn0vQWCzsv4s FYrCpespLYzhnsVMEQHE5h7WAg7PJQuwqmilLgA2bzffQRBO8hQqX6sy3ZQv776PhHp+ iQFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=9xtoh4Bcsh1Deiq9wlXnpjQ4byi7ukHh3CkS4EqQX/k=; b=VunYG0TERw06Dxlng4xUrhgqOn3elxF+93xkiqQDsEotZs0NRWyFWQ0/6oDhe1nSdo rREV98maf/pIzW+KClfDVk60aRa8m15EsV/Ax5GiBU9jENPclneFcJUDddmYXlrPd7iP bYfQbKETuDUsfnnTuEUrdEXSHuLHW+b0WdOI/VsrmriLV+sdokavBN/B8w1fXKbgdhZk Ll6NJsDVpkLiW9W3gQwECon6DbTyCFAp9CeOwASkxnNziWF6C35guOEK2ZUHiM73FaBk fzRJv/bUbEXxViLi6APkXyxYwkLGdC/kfdrvuugjI0e334v0RbJ7Wh0q5Df/FbZ2puwI ns1g== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m17si312387eds.236.2020.11.24.18.03.28; Tue, 24 Nov 2020 18:03:57 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732960AbgKXLkK (ORCPT + 99 others); Tue, 24 Nov 2020 06:40:10 -0500 Received: from frasgout.his.huawei.com ([185.176.79.56]:2143 "EHLO frasgout.his.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727909AbgKXLkJ (ORCPT ); Tue, 24 Nov 2020 06:40:09 -0500 Received: from fraeml706-chm.china.huawei.com (unknown [172.18.147.207]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4CgMSv0bd0z67GX4; Tue, 24 Nov 2020 19:37:35 +0800 (CST) Received: from lhreml710-chm.china.huawei.com (10.201.108.61) by fraeml706-chm.china.huawei.com (10.206.15.55) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2106.2; Tue, 24 Nov 2020 12:40:07 +0100 Received: from localhost (10.47.66.130) by lhreml710-chm.china.huawei.com (10.201.108.61) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1913.5; Tue, 24 Nov 2020 11:40:07 +0000 Date: Tue, 24 Nov 2020 11:39:51 +0000 From: Jonathan Cameron To: "Ye, Xiang" CC: Jonathan Cameron , , , , , Subject: Re: [PATCH v2 4/4] iio: hid-sensors: Add hinge sensor driver Message-ID: <20201124113951.000009ea@Huawei.com> In-Reply-To: <20201124064332.GA21403@host> References: <20201119100331.2594-1-xiang.ye@intel.com> <20201119100331.2594-5-xiang.ye@intel.com> <20201121175629.057031af@archlinux> <20201124064332.GA21403@host> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; i686-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.47.66.130] X-ClientProxiedBy: lhreml732-chm.china.huawei.com (10.201.108.83) To lhreml710-chm.china.huawei.com (10.201.108.61) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > > > > + > > > + To compile this driver as a module, choose M here: the > > > + module will be called hid-sensor-custom-hinge. > > > + > > > endmenu > > > diff --git a/drivers/iio/position/Makefile b/drivers/iio/position/Makefile > > > index 3cbe7a734352..7a6225977a01 100644 > > > --- a/drivers/iio/position/Makefile > > > +++ b/drivers/iio/position/Makefile > > > @@ -5,3 +5,6 @@ > > > # When adding new entries keep the list in alphabetical order > > > > > > obj-$(CONFIG_IQS624_POS) += iqs624-pos.o > > > + > > > +obj-$(CONFIG_HID_SENSOR_CUSTOM_HINGE) += hid-sensor-custom-hinge.o > > > > Alphabetical order preferred. > > > > > +ccflags-y += -I$(srctree)/drivers/iio/common/hid-sensors > > > > Why? > hinge driver need to include #include "hid-sensor-trigger.h", if not using this cflag-y > it should be #include "../common/hid-sensors/hid-sensor-trigger.h" Even though that looks a bit ugly, I'd prefer that rather than having to realize we were doing something not entirely obvious in the Makefile. Thanks, Jonathan