Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp660915imp; Wed, 20 Feb 2019 06:56:51 -0800 (PST) X-Google-Smtp-Source: AHgI3IZwm8lu4j5+DUEAz1I2PqQ635Q/f5c4/CDrJH/35uYh+1s879VHJl+a7Oho2/dMKIFYbR3R X-Received: by 2002:a63:43:: with SMTP id 64mr7028116pga.64.1550674611887; Wed, 20 Feb 2019 06:56:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550674611; cv=none; d=google.com; s=arc-20160816; b=hbimZJAntcxqp5yjtMOL0C6BtmpN8GBXy/XCu9cpNJ+X0Qz1k7AsuWYDBMgN2RKT0n 1lWziyfDV2S4k7v6+FNnHsrhvRylZ3LQMCdwUYJ6w43SaRASIolLiD4QZo9oD6mONL1A pc7f5oAjaq7bbeZBzu5hEsXO/qtMs5hbXlPdQfiT70mGWbM3Ya3zBo4SK3hoJAvnVn+L hzj74ARdKDIRW8gO1fgKbg17GQZ1BFeQmweb5NTQekfG+8EqLtUbrjAjECMb2zodrRNb qr5QfkZnvfjcUdzXJml2sXy6q8BvC0ntWhMq6BEW/ho9zgC4zRHMiE/lbDTx7Q3B3V0M fKzg== 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; bh=MCOsYk9q2mtiXxF5mrCD6onILYQlQafJSnS7CXNdDZI=; b=DZahk9WwpiLWGg5VakajTCHrqolR9Qyd6icInPXlYC1JQKM3KH2sU+uQzy91tIwtWZ IXH5aUXY5iMf5KPl2KCG+VwVuN/4ta8dspAsiiG6iVgu3Y+8SIJzlSYEvpb4YdDfgwfZ OGeyUs1+olV39jysQpWZhLVGUQMdCnH+Rk9xbZlgswhrwKE9B9k5899AW1edPhR8qPs8 K5gVE1mYmy5VfRrvIwluo/vzWXwHLWSMqDM9RgmM9enaVPdwyfXI3HN+YICs/jQ5pnJd /QeMBv+eAy05m9XvcgkBA+90sZDCAbpekNksNucqAbWobSSOqFd+P7rx7LxOEuOn/5aU E+ag== 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 b15si15891717plm.431.2019.02.20.06.56.34; Wed, 20 Feb 2019 06:56:51 -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 S1726755AbfBTOzf (ORCPT + 99 others); Wed, 20 Feb 2019 09:55:35 -0500 Received: from relay11.mail.gandi.net ([217.70.178.231]:51649 "EHLO relay11.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726458AbfBTOzf (ORCPT ); Wed, 20 Feb 2019 09:55:35 -0500 Received: from localhost (unknown [185.94.189.187]) (Authenticated sender: maxime.ripard@bootlin.com) by relay11.mail.gandi.net (Postfix) with ESMTPSA id D6BA5100011; Wed, 20 Feb 2019 14:55:31 +0000 (UTC) Date: Wed, 20 Feb 2019 15:55:31 +0100 From: Maxime Ripard To: Chen-Yu Tsai Cc: Philipp Rossak , Emmanuel Vadot , Rob Herring , Mark Rutland , Jonathan Cameron , Quentin Schulz , Icenowy Zheng , linux-iio@vger.kernel.org, devicetree , linux-sunxi , linux-kernel , linux-arm-kernel Subject: Re: Allwinner SID THS calibration data cell representation? Message-ID: <20190220145531.xu2t5gklnien7a3i@flea> References: <20180830154518.29507-1-embed3d@gmail.com> <20180830154518.29507-28-embed3d@gmail.com> <20180904184623.e4386b8e6b657b1b25e90c09@bidouilliste.com> <55579dd6-625d-e71b-1482-4592dccac665@gmail.com> <20180906115114.inc6dhqhy47obo25@flea> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="pfmyvb5oulioawsq" Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --pfmyvb5oulioawsq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Feb 19, 2019 at 03:54:00PM +0800, Chen-Yu Tsai wrote: > Sorry for resurrecting an old discussion, but since someone posted patches > for H5 and H6, I thought we should resolve this. I'm working on patches to > fix / replace the big-endian issue. >=20 > On Thu, Sep 6, 2018 at 7:51 PM Maxime Ripard = wrote: > > > > On Thu, Sep 06, 2018 at 01:47:47PM +0200, Philipp Rossak wrote: > > > On 04.09.2018 18:46, Emmanuel Vadot wrote: > > > > > + /* Data cells */ > > > > > + thermal_calibration: calib@234 { > > > > > + reg =3D <0x234 0x8>; > > > > > + }; > > > > You are declaring 8 bytes of calibration data but to my knowledge= it's > > > > only 2 bytes per sensor, so 2 bytes for H3. > > > > Am I missing something ? > > > > > > > > Thanks, > > > > > > Emmanuel you are right, it is 2 bytes per Sensor and should be 2 byte= s for > > > H3, but the thermal calibration data field is on all chips 64 bit wid= e - so > > > 8 bytes. So I'm reading here the complete calibration data field. > > > > Having one cell per channel would make more sense I guess. >=20 > Would it? The 2 32-bit words directly map onto the registers 0x74 / 0x78 = in > the THS. As far as the SID is concerned, their is just one consumer for t= his > data, the thermal sensor. How the thermal sensor uses that data is really= not > its concern. And the thermal sensor is really just copying the data from = the > e-fuses into its registers. Nothing more. >=20 > Furthermore, with the register access interface, the e-fuses are read/wri= te > 32 bits at a time. Seems to me it would make more sense to enforce a 32-b= it > word size, so cells should be multiples of 32 bits. I guess you convinced me :) Maxime --=20 Maxime Ripard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com --pfmyvb5oulioawsq Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCXG1qYwAKCRDj7w1vZxhR xfquAQDelRqy0KSIwPv4oRKC2HvytiWLK3V5rOiAN3M29yfUdQD8CEnw/bd4nQ8r EOdlVk5w/gtOyB8NmF9rMr4XR947xAU= =G2bD -----END PGP SIGNATURE----- --pfmyvb5oulioawsq--