Received: by 10.223.176.5 with SMTP id f5csp2663392wra; Mon, 29 Jan 2018 01:50:35 -0800 (PST) X-Google-Smtp-Source: AH8x224ERmOJ5GWrS+PgMN44HCFSBx7dajZVdK6Xd+JV0azB0JW3k8GCJv9SdnCLXd43ez52Rt32 X-Received: by 10.101.86.73 with SMTP id m9mr21267610pgs.70.1517219435074; Mon, 29 Jan 2018 01:50:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517219435; cv=none; d=google.com; s=arc-20160816; b=ajcs42EcqrKpyZZwNXxfjc6KsUJ1EzudMo405aoR91WkhC5lc6Gn8+UaV09UJxYiMf ko1Z+APLSo61NbvbmJ3oK8+YoUhQpR3xEDG12TM3CRCL3pa3vGxjEkIi3afO7/s6Gf9T jIEFsAfKWYNKwZrp981PJ/Htrpoltp94zNnYL7Wy87dph8qrmqtc5ImMnTi2Lqej2tqY 2zOenm6NXdf4CXsY0Is33y8yww/U1AUkm2J5OmGHovVHLoXv/5YctqBUy1XtsFcdWTYX 5fmmvFTFvTqKiGdNKXjzv/o7hlDQ7yhvzOuXJEB3xMJUvqQHJelFQQvGspBUVVNbi38H hb1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=r4yvrpDUUXhnlvLdx/YJAwAwbs3A9ukzm525iVAIfAk=; b=aYKcqE6K04TKWDlfRmmoknQU/ySl9hhkLA+DdrmyBMjqHNYrsvCKxSJ3wY5NlUAbqC uPtl6Pp0ikWxBUJSkJQC5nfW2bu/0Ft1l8qcFdz6xULiU/g9zlxqafqBobwYUuvBWpaB SDw0TvthHUgu+o1XuovgkXUteUmC7A7xDXu7gTojCkXojc0dqJcr7SHoI6G0iXsNdICB Toq5LlollblMFk3CAc0Y0IgHpWb9wqchuJ8pRfGIreV9M0K1Jel+j4fW+KuEy+DhsKRX awuCF8inej0CXG+Z1wNg2xktrL6grWTNu1l6BLfUyuI8K29J/AJGwnwjjDUZihlMQqxy 84ig== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o12-v6si8839469plg.133.2018.01.29.01.50.20; Mon, 29 Jan 2018 01:50:35 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751790AbeA2JsQ (ORCPT + 99 others); Mon, 29 Jan 2018 04:48:16 -0500 Received: from mail.free-electrons.com ([62.4.15.54]:58902 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751756AbeA2JsO (ORCPT ); Mon, 29 Jan 2018 04:48:14 -0500 Received: by mail.free-electrons.com (Postfix, from userid 110) id 3A32A21987; Mon, 29 Jan 2018 10:48:12 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.free-electrons.com (Postfix) with ESMTPSA id 5E8E021985; Mon, 29 Jan 2018 10:48:03 +0100 (CET) Date: Mon, 29 Jan 2018 10:48:03 +0100 From: Maxime Ripard To: Philipp Rossak Cc: lee.jones@linaro.org, robh+dt@kernel.org, mark.rutland@arm.com, wens@csie.org, linux@armlinux.org.uk, jic23@kernel.org, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, davem@davemloft.net, hans.verkuil@cisco.com, mchehab@kernel.org, rask@formelder.dk, clabbe.montjoie@gmail.com, sean@mess.org, krzk@kernel.org, quentin.schulz@free-electrons.com, icenowy@aosc.io, edu.molinas@gmail.com, singhalsimran0@gmail.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 Subject: Re: [PATCH v2 10/16] iio: adc: sun4i-gpadc-iio: add support for A83T thermal sensor Message-ID: <20180129094803.uiojqkmaeuihbe4p@flea.lan> References: <20180128232919.12639-1-embed3d@gmail.com> <20180128232919.12639-11-embed3d@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ozpu4j2zvyx5qod2" Content-Disposition: inline In-Reply-To: <20180128232919.12639-11-embed3d@gmail.com> User-Agent: NeoMutt/20171215 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --ozpu4j2zvyx5qod2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jan 29, 2018 at 12:29:13AM +0100, Philipp Rossak wrote: > This patch adds support for the A83T ths sensor. >=20 > The A83T supports interrupts. The interrupt is configured to update the > the sensor values every second. >=20 > Signed-off-by: Philipp Rossak > --- > drivers/iio/adc/sun4i-gpadc-iio.c | 38 +++++++++++++++++++++++++++++++++= +++++ > include/linux/mfd/sun4i-gpadc.h | 18 ++++++++++++++++++ > 2 files changed, 56 insertions(+) >=20 > diff --git a/drivers/iio/adc/sun4i-gpadc-iio.c b/drivers/iio/adc/sun4i-gp= adc-iio.c > index 8196203d65fe..9f7895ba1966 100644 > --- a/drivers/iio/adc/sun4i-gpadc-iio.c > +++ b/drivers/iio/adc/sun4i-gpadc-iio.c > @@ -170,6 +170,40 @@ static const struct gpadc_data sun8i_h3_ths_data =3D= { > SUN8I_H3_THS_TEMP_PERIOD(0x7), > }; > =20 > +static const struct gpadc_data sun8i_a83t_ths_data =3D { > + .temp_offset =3D -2724, > + .temp_scale =3D -70, > + .temp_data =3D {SUN8I_H3_THS_TDATA0, > + SUN8I_A83T_THS_TDATA1, > + SUN8I_A83T_THS_TDATA2, > + 0}, > + .sample_start =3D sunxi_ths_sample_start, > + .sample_end =3D sunxi_ths_sample_end, > + .sensor_count =3D 3, > + .supports_nvmem =3D false, > + .support_irq =3D true, > + .ctrl0_map =3D SUN4I_GPADC_CTRL0_T_ACQ(0x1f3), > + .ctrl2_map =3D SUN8I_H3_THS_ACQ1(0x1f3), Where are these values coming from? > + .sensor_en_map =3D SUN8I_H3_THS_TEMP_SENSE_EN0 | > + SUN8I_A83T_THS_TEMP_SENSE_EN1 | > + SUN8I_A83T_THS_TEMP_SENSE_EN2, > + .filter_map =3D SUN4I_GPADC_CTRL3_FILTER_EN | > + SUN4I_GPADC_CTRL3_FILTER_TYPE(0x2), > + .irq_clear_map =3D SUN8I_H3_THS_INTS_ALARM_INT_0 | > + SUN8I_A83T_THS_INTS_ALARM_INT_1 | > + SUN8I_A83T_THS_INTS_ALARM_INT_2 | > + SUN8I_H3_THS_INTS_SHUT_INT_0 | > + SUN8I_A83T_THS_INTS_SHUT_INT_1 | > + SUN8I_A83T_THS_INTS_SHUT_INT_2 | > + SUN8I_H3_THS_INTS_TDATA_IRQ_0 | > + SUN8I_A83T_THS_INTS_TDATA_IRQ_1 | > + SUN8I_A83T_THS_INTS_TDATA_IRQ_2, Do you reall need to clear all these interrupts if you're using only one? Maxime --=20 Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com --ozpu4j2zvyx5qod2 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE0VqZU19dR2zEVaqr0rTAlCFNr3QFAlpu7dIACgkQ0rTAlCFN r3SzHQ//cf3j7ovwfUUDuTMyP8Xpd9isOIXAKfyEuRZb6Q6vvAHQ02QyEktfl7Iu SGiQUWNhvVGE0oRVQz2FMm0VOKA3p08mxt3CGsb77+sN3PfuJTNagqJ94wewtPWv hafbnU08IX2+1PfeatyE4fTtwEhVv6az8sXoC/xQ4w5bXglAAggUKmjbPbM3ovo+ sdy54elboSvHXGuNLVSnf7dMoGvspHdB83r1rd6bG92U8BYmGnmsrPXZ/DDTvKW2 tskz21RKB9gSMzqX3A10bVKS+vgNGPA611+OcqH5JYpp7KnACdTr2Oc1Mc7SmnqH eR8GUGMfNdKEwcJbIDxzBnbaaXrPAWPs2oug2sXLqu9Rx5Qzlt3HS6WUQOa/hgdr CEdPUJ82ht6Cz42bZX9snsYegwhw3U7OF6W4pYWb8HIDTUX6d5MdC0RaAKMXSUgd SBWxUOWRE2BTEykfR8vbujs7kLCO7tb9fneeHVhurdmDrfW4QX0gJdOCMsfCv9iM zK76FM02Knt8lMwm+jeKea0wA7dVx1rEW/DAuLs0hVFvC94P4ALwqGqKh24GbKps 3oS1nwXoGPmBgxoPrWrag3et2dPYyCNCz0ViJ2R3XQKQHttDtDmrBLDFa9qPZhBy ygsFQ+mGVeBehMiBEwgALrP2R+3riuI8yPfm37mpKv1cdS1ptPc= =vDYk -----END PGP SIGNATURE----- --ozpu4j2zvyx5qod2--