Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1569602imm; Mon, 3 Sep 2018 04:03:30 -0700 (PDT) X-Google-Smtp-Source: ANB0VdY5ZnbY52rcCGcJOeLB7q5Svs3CY8ge3+ooaMSaPq7Oy2PKoSjt8xmtDzp8jDKubDh4ThBa X-Received: by 2002:a63:3245:: with SMTP id y66-v6mr25922867pgy.101.1535972610223; Mon, 03 Sep 2018 04:03:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535972610; cv=none; d=google.com; s=arc-20160816; b=u6SwmbwUxrvpsY9a6QIl4tnO2cukX/lsaVB6l5c7BwOXgIwyE+21+gFdUdE8uoFaO0 Fx2wM5JRcpylDfnLCf3rSsycHvioJI+O6rlP9RBaTtv0fcZ/NAdgFeahrn6G5DsK1FCD kzqiiCdGaAPOCqm2FLOt3hJ3b9ytIzWfsg++Ca7h/E1bI4E8FXr7aLjCFqofZQ8JMzuI XIHBxCdHziy0skNg57OhMMALLbLZEYE7qFXV0bFeQA/gS+GzHotwVsukzVS7FmU8kfAd 6vQq5iyBV/v91VVuvwJQICsxTjS92t405MISaVjfoitsB3cfCQ92fjP7KiNxwqoV96Jb RKiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:from:cc:to:subject :content-transfer-encoding:mime-version:references:in-reply-to:date :arc-authentication-results; bh=aa/9Hxx2FkcaP3QFf4+lvCMaUciUJxpX7xGGLnnxhVQ=; b=t/9Xx70m3ToHGF7LtUFlBTEstLuA1Crnihcgqg464LzjEIP4DQ5Auxed/bsrSi5l1G p0BJdQHXMCBuUf71XAe0x6D2LkY7huBX0w4bO1x2S1KBfjkzQhX3CqtMInv+ClIvQjDL +8K37I5bRVb2H0U/r+0eU2OrReAOZP4BnOv37YVtHaqe8pCE+OA8cAMuY43VioqP428g T7eHWkKStB9j00BkK7ZMh9CPqEyJQUMiRzRhfqWudkmRbNlN5kgtTlELHVYdsshD0dCV xOespg7A5f+BrEPM5ckRz6nd0YxFHD2SG0Vr33HnCk1hfKXmBip/eZ0WROB/yl8+MJQZ DPpg== 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 c126-v6si19180237pfa.130.2018.09.03.04.03.14; Mon, 03 Sep 2018 04:03:30 -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; 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 S1727266AbeICPVt convert rfc822-to-8bit (ORCPT + 99 others); Mon, 3 Sep 2018 11:21:49 -0400 Received: from hermes.aosc.io ([199.195.250.187]:48630 "EHLO hermes.aosc.io" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726023AbeICPVs (ORCPT ); Mon, 3 Sep 2018 11:21:48 -0400 Received: from localhost (localhost [127.0.0.1]) (Authenticated sender: icenowy@aosc.io) by hermes.aosc.io (Postfix) with ESMTPSA id 61326FF699; Mon, 3 Sep 2018 11:01:55 +0000 (UTC) Date: Mon, 03 Sep 2018 19:01:47 +0800 In-Reply-To: <20180903102022.fkxfkxadkt4vpbmb@flea> References: <20180830154518.29507-1-embed3d@gmail.com> <20180830154518.29507-22-embed3d@gmail.com> <20180831091137.wkbbipssyd6mqfbt@flea> <20180903102022.fkxfkxadkt4vpbmb@flea> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Subject: Re: [linux-sunxi] Re: [PATCH v3 21/30] iio: adc: sun4i-gpadc-iio: add support for H3 thermal sensor To: maxime.ripard@bootlin.com, Maxime Ripard CC: Philipp Rossak , mark.rutland@arm.com, geert+renesas@glider.be, linux-iio@vger.kernel.org, robh+dt@kernel.org, linux-sunxi@googlegroups.com, clabbe.montjoie@gmail.com, pmeerw@pmeerw.net, lee.jones@linaro.org, lars@metafoo.de, quentin.schulz@bootlin.com, linux@armlinux.org.uk, wens@csie.org, devicetree@vger.kernel.org, arnd@arndb.de, vilhelm.gray@gmail.com, broonie@kernel.org, linux-arm-kernel@lists.infradead.org, rdunlap@infradead.org, arnaud.pouliquen@st.com, linux-kernel@vger.kernel.org, lukas@wunner.de, knaack.h@gmx.de, eugen.hristev@microchip.com, jic23@kernel.org From: Icenowy Zheng Message-ID: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 于 2018年9月3日 GMT+08:00 下午6:20:22, Maxime Ripard 写到: >On Fri, Aug 31, 2018 at 05:51:41PM +0800, Icenowy Zheng wrote: >> Personally I suggest to leave out all SID or calibration related >> patches here. >> >> Currently we seems to be wrongly converting SID to big endian, >however, >> the orgnization of the THS calibration data on H6 shows that it's >> surely little endian: >> >> It consists a temperature value in 1/10 celsuis as unit, and some >> thermal register readout values, which are the values read out at the >> given temperature, and every value here (the temperature and the >> readout) are all half word length. >> >> Let the temperature value be AABB, the two readout values be XXYY and >> ZZWW, the oragnization is: >> BB AA YY XX WW ZZ ** ** . >> >> When converting the SID to big endian, it becomes: >> XX YY AA BB ** ** ZZ WW , >> which is non-sense, and not able to do sub-word cell addressing. >> >> Maxime, should I drop the LE2BE conversion in SID driver? (I doubt >> whether it will break compatibility.) > >This is exposed to the userspace, so no. Please note the LE2BE totally breaks the SID addressing. Without it dropped all cells must be referenced with 4 byte word as unit, and half word addressing of SID is thus not possible. The driver will also need then to split the half words if needed. I think this is kind of hardware misbehavior, and not a simple UAPI change, so the UAPI stability shouldn't affect this change. > >Maxime >>