Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1515778imu; Sat, 12 Jan 2019 01:44:58 -0800 (PST) X-Google-Smtp-Source: ALg8bN6r1BH5C7O3yxuSg8dZK0ZU7qj53SB5f4SRqdLGOy78gmmHVIIh4YxHMBkbwg478KzejqOq X-Received: by 2002:a63:3e05:: with SMTP id l5mr15305323pga.96.1547286298693; Sat, 12 Jan 2019 01:44:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547286298; cv=none; d=google.com; s=arc-20160816; b=otzKDrAlsrAZIikdWi6xVcBX7TgFFpVGl69CMFHpEqMQb6dW+BCastWo+F3SSuHuWA Ty669UgvVF5/0H0t/ad6DyBYCc3elKzUslvs0xRFXkkSVY1M6SwqD06iDedy1dcs1Gu+ YuzaLG2mXK5LT0DAbyQR5YVj+R/A3TcW/IP2mkz1AR6bpmYH2chBiznB8DTKzhgySzXp G+PS2gQTt5eRek2Nrudus22iVO/BTy+mFKgKcEoq1bF1glz/vV2l/1aIWhGMgM/0M2bE WxZtvtdegWEvYWfunLjuIKb9IXKOeyfKIE2gkSKNt3K9XWXwDCWF6K5vKVE149juiZEx 8zoQ== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=X1nWV4nBzlRo77/xlbjpztD7qUJA/hTJMXekGf8rO3M=; b=ZtpUwBRHcvsr73nuN/hh1OOibiUq3RbvuJ9jjGEJVAEmw08IcYcPRHGLPl1DSbeO92 b4T8UpA2Klp8KLp9AlUPm2Vl7DJf4/gx/84YhJcvXipuvu47GkdBdIHKX/S9S0HDWveU iBafcTWr6SAIG7/DnEgc+shIF1o7IuAxV9JnUbFRKC0Z8qw6Gx7u3Bs+hb5hYr5NdlvC 5BOptk9XyPctz3dXk0Ze6Skbac8C9xtaBIIeKGevF0ikQpRLGKO7+Xb5QnmTw+PxM1Y3 9wmw5XVNFt5JG/ab2fwgZlIg1miLkrF/2N8F7DpuYGD72v9e7e0/9eECQt6dQe8DmtVG +7Ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=fVj6E578; 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 e126si4412721pfh.185.2019.01.12.01.44.29; Sat, 12 Jan 2019 01:44:58 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=fVj6E578; 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 S1725861AbfALJmh (ORCPT + 99 others); Sat, 12 Jan 2019 04:42:37 -0500 Received: from mail-pg1-f196.google.com ([209.85.215.196]:39027 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725816AbfALJmg (ORCPT ); Sat, 12 Jan 2019 04:42:36 -0500 Received: by mail-pg1-f196.google.com with SMTP id w6so7366916pgl.6; Sat, 12 Jan 2019 01:42:36 -0800 (PST) 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:content-transfer-encoding:in-reply-to :user-agent; bh=X1nWV4nBzlRo77/xlbjpztD7qUJA/hTJMXekGf8rO3M=; b=fVj6E578g6OPv+K0qvR9DJatp+zMDOtYwl9amt3nykdmlugNae95tpFO4y5yW/vPHL 6IOZtC7hZy+UuFRXB7ubaRiGIeU05yfdql1Wfp6aL2WEtsT5s9wkMp7W2BYp8k17bb9v g3uN95VAAlohZ1QXRUYHaKZb0JTlU5MNotjSC9H7HR8ezIp0351SvHOfM7XtdeycdLzQ /Rrv9nRPormG5Vp5lr86XxfX/pYUPRjLCZUJqEPTYPeU0vJmAm8oT1QVzEYtDfFhtQUf 9NbPLlF4ZqrxRmk0We2NB9cqcxkWu70gNO5fdHjrL7K1jcn7JI82fX9jSrigQHb404Ev /azQ== 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:content-transfer-encoding :in-reply-to:user-agent; bh=X1nWV4nBzlRo77/xlbjpztD7qUJA/hTJMXekGf8rO3M=; b=MBrLB4aDwLX7BTewAOD8btio0R3WuhCPbyna0sJ4u196tqmkP7sHl9U0KhX0gt1bl1 L9sFaSIfCyJ1V9ejY9yqXJjak8vddJ0H7qRpbbdRBOHNDQlf8L3RWLJ/BHiCTYTGBwSL 9FvLjOHd7AVhlen5kYER9yi3w5V7JZIDSMKArE0OUo6l0Xe7YAG+j9ZfGT1mSSwzcyYt VpfLEQGMeoBCV52QiyNsmd3wIW0BU59HN9UZ9j2gP42p2SadpkHKBucWU6Go/mjWrxov lQotg5pSSzF31quAe49+9AQOFgtAubMK7z2NVtF48L0DMENstIwiUXwyBBro62X3HwuZ yYSg== X-Gm-Message-State: AJcUuked0rTpNSFwIUdrGMoAIrp+Z56NE5Zp6uZs3ZdgyvNelJ+anPpH VjXT9H1L0b353W5OXIFh7ew= X-Received: by 2002:a63:f615:: with SMTP id m21mr16682707pgh.428.1547286155648; Sat, 12 Jan 2019 01:42:35 -0800 (PST) Received: from himanshu-Vostro-3559 ([103.233.116.134]) by smtp.gmail.com with ESMTPSA id m67sm112806550pfm.73.2019.01.12.01.42.30 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 12 Jan 2019 01:42:34 -0800 (PST) Date: Sat, 12 Jan 2019 15:12:26 +0530 From: Himanshu Jha To: Sebastien Bourdelin Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-iio@vger.kernel.org, mark.rutland@arm.com, robh+dt@kernel.org, pmeerw@pmeerw.net, lars@metafoo.de, knaack.h@gmx.de, jic23@kernel.org Subject: Re: [PATCH v2 1/2] iio: chemical: bme680: Add device-tree support Message-ID: <20190112094226.GA910@himanshu-Vostro-3559> References: <20190111205359.14158-1-sebastien.bourdelin@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190111205359.14158-1-sebastien.bourdelin@gmail.com> 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, Jan 11, 2019 at 03:53:58PM -0500, Sebastien Bourdelin wrote: > This commit allow the driver to work with device-tree. > > Signed-off-by: Sebastien Bourdelin > --- I get the following compilation failure: Below I have `allyesconfig` except 'BME680' configure as [M] in case you wish to reproduce. himanshu@himanshu-Vostro-3559:~/linux-next$ grep -i -w 'CONFIG_BME680\|CONFIG_ACPI\|CONFIG_OF' .config CONFIG_ACPI=y CONFIG_OF=y CONFIG_BME680=m himanshu@himanshu-Vostro-3559:~/linux-next$ sudo make drivers/iio/chemical/bme680_spi.o make[1]: Nothing to be done for 'all'. CALL scripts/checksyscalls.sh DESCEND objtool CC [M] drivers/iio/chemical/bme680_spi.o In file included from ./include/linux/acpi.h:41:0, from drivers/iio/chemical/bme680_spi.c:7: ./include/linux/module.h:213:1: error: expected ‘,’ or ‘;’ before ‘extern’ extern typeof(name) __mod_##type##__##name##_device_table \ ^ drivers/iio/chemical/bme680_spi.c:119:1: note: in expansion of macro ‘MODULE_DEVICE_TABLE’ MODULE_DEVICE_TABLE(of, bme680_of_spi_match); ^~~~~~~~~~~~~~~~~~~ scripts/Makefile.build:291: recipe for target 'drivers/iio/chemical/bme680_spi.o' failed make[1]: *** [drivers/iio/chemical/bme680_spi.o] Error 1 Makefile:1741: recipe for target 'drivers/iio/chemical/bme680_spi.o' failed make: *** [drivers/iio/chemical/bme680_spi.o] Error 2 BUT if: himanshu@himanshu-Vostro-3559:~/linux-next$ make allyesconfig scripts/kconfig/conf --allyesconfig Kconfig # # configuration written to .config # himanshu@himanshu-Vostro-3559:~/linux-next$ sudo make drivers/iio/chemical/bme680_spi.o scripts/kconfig/conf --syncconfig Kconfig make[1]: Nothing to be done for 'all'. HOSTCC scripts/dtc/dtc.o HOSTCC scripts/dtc/flattree.o HOSTCC scripts/dtc/fstree.o HOSTCC scripts/dtc/data.o HOSTCC scripts/dtc/livetree.o HOSTCC scripts/dtc/treesource.o HOSTCC scripts/dtc/srcpos.o HOSTCC scripts/dtc/checks.o HOSTCC scripts/dtc/util.o LEX scripts/dtc/dtc-lexer.lex.c YACC scripts/dtc/dtc-parser.tab.h HOSTCC scripts/dtc/dtc-lexer.lex.o YACC scripts/dtc/dtc-parser.tab.c HOSTCC scripts/dtc/dtc-parser.tab.o HOSTLD scripts/dtc/dtc CC scripts/mod/empty.o MKELF scripts/mod/elfconfig.h HOSTCC scripts/mod/modpost.o CC scripts/mod/devicetable-offsets.s HOSTCC scripts/mod/file2alias.o HOSTCC scripts/mod/sumversion.o HOSTLD scripts/mod/modpost CC kernel/bounds.s CC arch/x86/kernel/asm-offsets.s CALL scripts/checksyscalls.sh DESCEND objtool CC drivers/iio/chemical/bme680_spi.o Compiles without any issues. Also, wondering when is 0x77 i2c address used, since I tested this on 3 different boards with 0x76(when SDO is connected to GND) And why do I connect SDO to ground everytime ? It is because if SDO pin is left floating then I2C address will be undefined as said in datasheet + I have observed this while testing. Actallly, I don't understand what "VDIDO" is, as explained in the datasheet. Anyway, if the above compilation issue is not a problem, then Acked-by: Himanshu Jha Thanks -- Himanshu Jha Undergraduate Student Department of Electronics & Communication Guru Tegh Bahadur Institute of Technology