Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp409333imm; Fri, 21 Sep 2018 02:13:49 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdbazbwv4MtIxcOC99/LEh0ASABb/6goOyCzQ9hm1EzjCF1b0jVbiKbXeePGi9WXvu4DTX4L X-Received: by 2002:a17:902:b218:: with SMTP id t24-v6mr43582116plr.235.1537521229245; Fri, 21 Sep 2018 02:13:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537521229; cv=none; d=google.com; s=arc-20160816; b=Wx+61Bs2DRwQBK7UxarweD5sjzPphwKKgTL7w5m58NCsBMPzdJiEkmOIm9owv3aCPK gt5Nq70Cf+4qYJkdEL7ufy3h8u2E7VjH+YEmvqBdAme8mzHp2ji9eEazHsuZ9jAzI8x2 NfV+wIM5Hbmk3fKFCJY0fPRJgyuPoD4EcP4PI07y8s6dfDUXtrVBA7B40PMX+vaLlcfX kyun5nuxTRLynQlb2PonYext8I8kOsC1DOEQh3pgBTg0ujlhqm9yeejEbYbUoxZrHf6W onXAoNVedUBZa6Ox/R+j79a+nGAyX/Z3RrOXGGdWwHq/zOAIo2XTWv5jqqlqUxk2+0Pv USSg== 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:dkim-signature; bh=KzZd453GUuIu0SX8RHhASXACzk7RqyOC4TCjCGWKCnY=; b=JdMjb79A7EtAUgHNmGb6TjxRqzLN1G12PRZqu9KWr+wBM7Y/uk1NG6iLZjHWdTOYa0 XRL2eIWU8dvSA+G2AGUxkaA9+PMr0hOnAiOEO56XmDsatqDF4ZNPwvTiVmZKGEcBHdbe KOOR20BSSZRi+m0bGYEmZanN+1Bekeq5ITUrXRRvK7KqwQQG/7ZoQlNALw6jhnnWKQLR myM2+0D02a/qr92+X6J5OwcBaoj/tkSyrrcPn2u4mgmSQLbQlwaVCfUksN821bjhZWV8 gNTbGTOK1EWMuWmoa7jpkxC0FpoMcsScyfJ7fpw4GqYvAdNTZTHsM4Ercxz+eouR6si7 upIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=MDmKNVd0; 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 t2-v6si26082730plq.287.2018.09.21.02.13.32; Fri, 21 Sep 2018 02:13:49 -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=MDmKNVd0; 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 S2389536AbeIUPBW (ORCPT + 99 others); Fri, 21 Sep 2018 11:01:22 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:42572 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389022AbeIUPBW (ORCPT ); Fri, 21 Sep 2018 11:01:22 -0400 Received: by mail-pf1-f194.google.com with SMTP id l9-v6so5699408pff.9; Fri, 21 Sep 2018 02:13:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=KzZd453GUuIu0SX8RHhASXACzk7RqyOC4TCjCGWKCnY=; b=MDmKNVd0ab3ekACfqJbHx6FWFujNuzFmvCYu8MviPaM3S0vsQtuVp/NhdQORwRCWqG OT0fIGrHqvOale2a5irpc1OjOcDgUibzYPH44pQekw3QmCh2JZ43sJDhrriW3NV5TYiE gd9P8BHZiMZQHKnCRmPdYAnCdONvFW8Wo8hCAsIcd+v/+NLGFaUB0dpXDuM/aU7Yqwx7 yj/fGr9F783+jvdsilmYIJF3G7lOJwNiTLvqowdPCEv8mjXyUO9ibbrKZpnXQImkFiOJ uALYsooCf1qitrAi0m2/lf/ablhUeiCHHC9U0ZoO1remSH5vJidP803n/MSas3qRUiru ww/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=KzZd453GUuIu0SX8RHhASXACzk7RqyOC4TCjCGWKCnY=; b=XIvb3whIooryCdMHjtpSzgB8a22dSXX8TDNU9U+MVyzcYsFzql6t3HMcmnaK7Ac0Ln NaoSlzQ2jDAMIsA0QrmtNhrKWDAigVUqbocOoBBeC7LXxF21ICCugBBcMRuyGsi2OjGD sFmDa5Yyc3Qc96Nc3GHB/MtIjzHveJcu9GK+eaWRNiukgoDDrmE2dzqNK8QBJa0xDR5a e4STTPVpWKCJ7mVsqVZFuou3TFL69iyFwOCzN9rnduKrBRIUJUzs6vHhFg7f/ouqO5+N UiDRnxRiFmXxcIkB4Yjo+kyahgtrbk0IUORptHv+vwg1O+2hzch8GVu8Z8PZtHN1NBpR XwLw== X-Gm-Message-State: APzg51B2WImATvxlK5KBpwsHBzEsG69yl2iSdmCoc4cH1G9g0CfGyWgJ Q3g9Hk97zOK4cGQidRa44HQ= X-Received: by 2002:a62:174a:: with SMTP id 71-v6mr46075549pfx.217.1537521206174; Fri, 21 Sep 2018 02:13:26 -0700 (PDT) Received: from Eros (104.176.229.35.bc.googleusercontent.com. [35.229.176.104]) by smtp.gmail.com with ESMTPSA id c1-v6sm34330732pfi.142.2018.09.21.02.13.23 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 21 Sep 2018 02:13:25 -0700 (PDT) Date: Fri, 21 Sep 2018 17:13:18 +0800 From: Song Qiang To: Phil Reid Cc: jic23@kernel.org, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, robh+dt@kernel.org, mark.rutland@arm.com, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] iio: magnetometer: Add support for PNI RM3100 9-axis magnetometer Message-ID: <20180921091318.GA2151@Eros> References: <20180920131340.6699-1-songqiang1304521@gmail.com> <4633d30b-b493-d70b-dd7b-3f5bc3e16e78@electromag.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4633d30b-b493-d70b-dd7b-3f5bc3e16e78@electromag.com.au> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 21, 2018 at 10:05:38AM +0800, Phil Reid wrote: > On 20/09/2018 9:13 PM, Song Qiang wrote: > > PNI RM3100 magnetometer is a high resolution, large signal immunity > > magnetometer, composed of 3 single sensors and a processing chip. > > PNI is currently not in the vendors list, so this is also adding it. > > > > In the subject: Isn't the RM3100 a 3axis mag. > The 9axis bit comes when you combine it with an accel / gryo I think. > > ... snip > Hi Phil, That's right! The first time I got this sensor I googled it on the internet and the abstract of the first webpage told me that it's a 9-axis sensor, and it's from its offcial website! I just googled it and saw it's still there, but after I entered the website, there isn't anything on the webpage about '9-axis', maybe I just saw the old wrong web cache of google. Newer websites do say it's a 3-axis magnetometer sensor, and it only has three channels of data can be read. 3-axis it is. > > +++ b/Documentation/devicetree/bindings/iio/magnetometer/pni,rm3100.txt > > @@ -0,0 +1,57 @@ > > +* PNI RM3100 9-axis magnetometer sensor > > + > > +I2C Bus: > > + > > +Required properties: > > + > > +- compatible : should be "pni,rm3100-i2c" > > +- reg : the I2C address of the magnetometer > > + > > ... snip > > > +SPI Bus: > > + > > +Required properties: > > + > > +- compatible : should be "pni,rm3100-spi" > > +- reg : address of sensor, usually 0 or 1. > > + > > Looking at other drivers supporting i2c / spi. > They use the same compatible for both. > > eg: see iio/accel/adxl345_*.c > > and it's binding doc: > > Required properties: > - compatible : should be "adi,adxl345" > - reg : the I2C address or SPI chip select number of the sensor > Agreed, since nodes of this sensor should be already on the bus where it should be in DT, there's no need for compitable string to identify which bus it's on. yours, Song Qiang