Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1706537imm; Mon, 3 Sep 2018 07:26:01 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYfcD37Uq9Fhe2c9ICEfhOrpsSAkqRuHxTKaPKnV1CST1Efj2GB73RpxQRNMZ7GK5WvDSPn X-Received: by 2002:a63:5845:: with SMTP id i5-v6mr26483814pgm.272.1535984761472; Mon, 03 Sep 2018 07:26:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535984761; cv=none; d=google.com; s=arc-20160816; b=TTe6YXBOYWR1nGWT/42Fx8oJjIxIdo3NNKQLCNurL6Mx+7KRW4vBPk73Y+9mScSw39 E90Gy98mVLMrqo8vyZo9wv6wVumJaO2I8nraCi93NvKNPraxJQRQ3wwDYkQzo33WDpDh dql8/tvKV5UZR1bjOOrMzb1bOJLFEdpG/jtooL77BP45zd7siQoEM1n5Qu6zxgLiLOVj sBKeoJn32d11ym4Vxo++k9ALdIlmjK0l1dTbishRc/jah6lx4/uCEYL5xCEaRR3TcSO0 8H8uKLoT66YzUdgJbxA5OF3PAzvClucCSLvoEUBfQ0uTkqz45VChSR+LEYr21+LEzPXW nJDg== 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:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=8H+2+Vilw5nuvgG9FY3LKDeo0BV+IY/skCVeF/QCu2w=; b=q8YgVI9QKSXQFmh2hmEq4qAgXDPDJBbxVZXirUzU6eTYt60lm63yymem/cVLrkxdgX ibVDKe3ntR8ydMv/uFSgYbjlEc41zdMLdmqHalP7Lb6q/Xx43eE+2LVLBM3rnFoizXOB +OaWwcj72Vr7NUS6gQh3tPBZut1zjEJarD2oJi7E5zMg6k4+65jfcONa52IcHSzZxPkD 2b732CHa/jUjFJllH6e9quJV1X9Ul/2rA0dtLruAIIxOOQtnaj5rzk6z6YNBoluPTV6P mTQJtl8b5jY0IYKjPDgLiEebH/em9318y7lkY0VIgmHUEoFlzEI6HiFepC1mPTryShG+ gbQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=CyjIX9g5; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c13-v6si17543667pgh.627.2018.09.03.07.25.46; Mon, 03 Sep 2018 07:26:01 -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=@gmail.com header.s=20161025 header.b=CyjIX9g5; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727651AbeICSpC (ORCPT + 99 others); Mon, 3 Sep 2018 14:45:02 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:36193 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726212AbeICSpB (ORCPT ); Mon, 3 Sep 2018 14:45:01 -0400 Received: by mail-wr1-f66.google.com with SMTP id m27-v6so887744wrf.3; Mon, 03 Sep 2018 07:24:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=8H+2+Vilw5nuvgG9FY3LKDeo0BV+IY/skCVeF/QCu2w=; b=CyjIX9g5Z2lhGRYzWQQgA1k835VgagzTXCIY1zLFm3Zl1XkwRmn3x/3crAj472EWCF 28tk3DVG+RxwcEqRluZZa1l7uArRbeh3Fbk+PZkWNKEmuMvd21md9SR8m3Clxe/xlAyI x/xhqIZjTRuw1afyyy8QimnkMSqwslP92b5MitZSzeYs6NSmMEHnIu2NISsv5Wrb7JG7 EgoX9h4GZUYpwtxRERfDXV4s7B37edsG2QDE9M3f4finpkX54PDaSgwiHnP11e/uypFL Q7zm+EA8TE/mu7LfIWz9vyFeAsfZ6No51vzYdDWkHGBuT9WvOdHW2Ny191PYc68DBGSz XSMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=8H+2+Vilw5nuvgG9FY3LKDeo0BV+IY/skCVeF/QCu2w=; b=cY2kpSCx6F54LjjjwuXZ1Beywje3u2nlDYtqnRY18cTe83zV2/fDmwudZc4bCBJhFS 5RDAfWbFusTJSRWOAE0tHm1GCFXg8ZNXHIHWxXED12iPx5tsViXkEVSJg6xOkKoUtST6 pz24UeUVj/9PTqNvurrYnWM99p8YZTWmzXWWp5yseQJ+ie9j4SRhBze020WNKMu2Xps/ gBGQ47LQ/WmcUDtGbnLWuo8kp8/sU5HLN442GBybPWtDueZx3/YR8ibSRjCapqc03pKB ZvYB+173U7+I/5i7h6UfjmngdVwRQBJBupFgnSmzIeOG0w7YN7muDi8CbqvsD7OcDxAr Hpmw== X-Gm-Message-State: APzg51DuKl6h/+kUmeG+l5E/A6O5skxLMtcazn/m6LC8a7i04/uf6RmB YYMlfZHnV+fg3ZR7HT0sq2E= X-Received: by 2002:a5d:494c:: with SMTP id r12-v6mr19335426wrs.244.1535984674974; Mon, 03 Sep 2018 07:24:34 -0700 (PDT) Received: from [10.104.3.222] (eduroam-nat1.rz.uni-ulm.de. [134.60.112.236]) by smtp.gmail.com with ESMTPSA id 184-v6sm22784205wmv.6.2018.09.03.07.24.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Sep 2018 07:24:34 -0700 (PDT) Subject: Re: [PATCH v3 05/30] iio: adc: move SUN4I_GPADC_CHANNEL define to header file To: Jonathan Cameron Cc: lee.jones@linaro.org, robh+dt@kernel.org, mark.rutland@arm.com, maxime.ripard@bootlin.com, wens@csie.org, linux@armlinux.org.uk, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, eugen.hristev@microchip.com, rdunlap@infradead.org, vilhelm.gray@gmail.com, clabbe.montjoie@gmail.com, quentin.schulz@bootlin.com, geert+renesas@glider.be, lukas@wunner.de, icenowy@aosc.io, arnd@arndb.de, broonie@kernel.org, arnaud.pouliquen@st.com, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com References: <20180830154518.29507-1-embed3d@gmail.com> <20180830154518.29507-6-embed3d@gmail.com> <20180902210109.7bd4a567@archlinux> From: Philipp Rossak Message-ID: <882cb5f9-867b-d120-5ef5-80a8bee2d628@gmail.com> Date: Mon, 3 Sep 2018 16:24:32 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180902210109.7bd4a567@archlinux> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02.09.2018 22:01, Jonathan Cameron wrote: > On Thu, 30 Aug 2018 17:44:53 +0200 > Philipp Rossak wrote: > >> We are moving the SUN4I_GPADC_CHANNEL define to the header file. > Maxime has raised this point in other patches... > > Why? Obvious what but I have no idea why you are doing this. > > Thanks, > > Jonathan There are two reasons: 1. Personal taste: I like to have the #define stuff in the header file. 2. When I started the rework I had to get some better overview, so I moved it... Since those two reasons are no good reasons to submit a patch I will drop it and keep it in the *.c file. Philipp >> >> Signed-off-by: Philipp Rossak >> --- >> drivers/iio/adc/sun4i-gpadc-iio.c | 9 --------- >> include/linux/mfd/sun4i-gpadc.h | 9 +++++++++ >> 2 files changed, 9 insertions(+), 9 deletions(-) >> >> diff --git a/drivers/iio/adc/sun4i-gpadc-iio.c b/drivers/iio/adc/sun4i-gpadc-iio.c >> index d95dd0fde2a6..666329940e1e 100644 >> --- a/drivers/iio/adc/sun4i-gpadc-iio.c >> +++ b/drivers/iio/adc/sun4i-gpadc-iio.c >> @@ -109,15 +109,6 @@ struct sun4i_gpadc_iio { >> struct device *sensor_device; >> }; >> >> -#define SUN4I_GPADC_ADC_CHANNEL(_channel, _name) { \ >> - .type = IIO_VOLTAGE, \ >> - .indexed = 1, \ >> - .channel = _channel, \ >> - .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), \ >> - .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), \ >> - .datasheet_name = _name, \ >> -} >> - >> static struct iio_map sun4i_gpadc_hwmon_maps[] = { >> { >> .adc_channel_label = "temp_adc", >> diff --git a/include/linux/mfd/sun4i-gpadc.h b/include/linux/mfd/sun4i-gpadc.h >> index 139872c2e0fe..54c7c9375c1b 100644 >> --- a/include/linux/mfd/sun4i-gpadc.h >> +++ b/include/linux/mfd/sun4i-gpadc.h >> @@ -90,6 +90,15 @@ >> /* 10s delay before suspending the IP */ >> #define SUN4I_GPADC_AUTOSUSPEND_DELAY 10000 >> >> +#define SUN4I_GPADC_ADC_CHANNEL(_channel, _name) { \ >> + .type = IIO_VOLTAGE, \ >> + .indexed = 1, \ >> + .channel = _channel, \ >> + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), \ >> + .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), \ >> + .datasheet_name = _name, \ >> +} >> + >> struct sun4i_gpadc_dev { >> struct device *dev; >> struct regmap *regmap; >