Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2468648pxb; Fri, 5 Feb 2021 20:25:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJw+eUoD/UR/2asekh9VVF9jQyosR73eKZaACF+fwkkw5jeDznAeEkppzVWGZpRoK7Z65oo0 X-Received: by 2002:a17:907:2ace:: with SMTP id fm14mr1286907ejc.475.1612585521190; Fri, 05 Feb 2021 20:25:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612585521; cv=none; d=google.com; s=arc-20160816; b=kXdR6BluQMqdXdXmUOnK1wgEs1EYtOxBfdbToSuROYggw2uuPnmxBJlmLNEdpPQ0sU BBBnLR0wZ6f3RLDXPgm1nIUwnzaxXqil4/V8td/QKE7bkEEiNQNQqFO3zYV46VVKl77X 022Ddf6OAtR3fGk1tUyUaOfx3IQB3u/6wgjkG++yQu5KwnO1IhImvyg0zv97A7y53I3n yR+CQUTE5BJ6huGy9OPJ5UK/WUrdXPCTEOAohsPtppLbi3AGsWhZte3MCX7J2motBuLv wagPZbfW//F9LJO0QcRWq6VJ6i3IPdmu2SEZ8ZOw7t3VpaGfP69TAnPWztFmLZuArGWh Di2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:mail-followup-to:message-id:subject:cc:to:from:date :dkim-signature; bh=fCKDXwlXBPOEi7a6J6qk8+yK6J3VWaedukKP3VYip90=; b=t7o+6KHWTOuV1x/VXlKJzGX7C8ZpUU5WA5EBE/39OKe0xQCopn8eXfWxKlc4SMLfMv ZXQYOhKM6jwnW39U7O658iga0Yrshj4wJKrHG+ouikj4b9qnQWHKM71s5KFu/o1bQ0Hg yMFy8jeyxYH295r4eQs/rU1WF8yuQZnZ2xCX4VJjGpZRvcuDgowpLKBPJgmWZ3iDF2Lf 7eSIU+ECuGR9w8vUb3IFvrA8UkwBsEWp2D6qDVdikwA25vFRJzD5p4DvHkQv3fpe5Gn+ xmu47qalM9B2HEesg9zhMb46DcFCIrTSDdzkdcp9D59xFwUwSHQ8AbKccvLmIfIShnwY z8nQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="SPqxf/zk"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x7si4497866eje.585.2021.02.05.20.24.56; Fri, 05 Feb 2021 20:25:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="SPqxf/zk"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231265AbhBFEVj (ORCPT + 99 others); Fri, 5 Feb 2021 23:21:39 -0500 Received: from mail.kernel.org ([198.145.29.99]:42598 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230332AbhBFDL5 (ORCPT ); Fri, 5 Feb 2021 22:11:57 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 737AB65017; Sat, 6 Feb 2021 01:16:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1612574169; bh=47TCTpDoco8sYPN7xESPWiOcB3X4kzZp/SX8nMmphNw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=SPqxf/zkGL+RVQJqGA9xo1BoHI+L+SmO9mNtCtQiXyLK2gtd6qi1V0o+xGmilpoVf UAsY3V5A2QurZ7YpfI3NhfPaA0Y37i+mvmNNGskebCMiDlkRa4btqO9zGNwg7YkMkF n2sXFSLejuqY2l9IVv4D2Wu4anm3DOBp58zJm/EOQiM+dvKczYgflrdlgJZVwjzJY9 wCAlTa/WVY6g+/frOXmbC+LfFV/AcZsIeE6uPROLMijYolperSDOn49abTJhzob9v3 Y63H3U7dcjLcyIS399x6SN1mxl79TexRr1BGYYi4cWs/t8GOM2SJ67wfeomgAFARNK uUa10TkSnSPtA== Date: Sat, 6 Feb 2021 02:16:01 +0100 From: Wolfram Sang To: Mark Jonas Cc: Support Opensource , Lee Jones , linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, Adam.Thomson.Opensource@diasemi.com, stwiss.opensource@diasemi.com, marek.vasut@gmail.com, tingquan.ruan@cn.bosch.com, hubert.streidl@de.bosch.com Subject: Re: [PATCH v3] mfd: da9063: Support SMBus and I2C mode Message-ID: <20210206011601.GA3847@kunai> Mail-Followup-To: Wolfram Sang , Mark Jonas , Support Opensource , Lee Jones , linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, Adam.Thomson.Opensource@diasemi.com, stwiss.opensource@diasemi.com, marek.vasut@gmail.com, tingquan.ruan@cn.bosch.com, hubert.streidl@de.bosch.com References: <20210205155006.130458-1-mark.jonas@de.bosch.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="EeQfGwPcQSOJBaQU" Content-Disposition: inline In-Reply-To: <20210205155006.130458-1-mark.jonas@de.bosch.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --EeQfGwPcQSOJBaQU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline > + if (i2c_check_functionality(i2c->adapter, I2C_FUNC_I2C)) { > + dev_info(da9063->dev, "I2C mode"); > + busmode = 0; > + } else { > + dev_info(da9063->dev, "SMBus mode"); > + busmode = DA9063_TWOWIRE_TO; > + } In principle, this looks good and is sane to do. I'd just suggest to leave out the dev_info calls and maybe just do: busmode = i2c_check_functionality(i2c->adapter, I2C_FUNC_I2C) ? 0 : DA9063_TWOWIRE_TO; --EeQfGwPcQSOJBaQU Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAmAd7c0ACgkQFA3kzBSg KbajFA/+Oqb7AZKnYdcHwZR9dhbxEb0ufEPQqLEG5l9GJWcAfIYeZFWU4lVtqC0g BQMoW5PS1Mbiz4Lka+YV+BH4u4VgaUX4O8qdNP+KE+sCrLWwxatrRd/GfkhKSUU0 yTxjoJD8D1v3Jr2EgIVTj3jCWpwMc+aPK9JKT2BzcFnmT9wOWG12eHF5O01gyznL ro0cq9drL1oi1SYsVuHypz91YaM0fcSQ4J2wFheeJF5aNo65wLX2Sr+cAPp2iXla fdnV+VDspGB1BQH7XZxkOolBtMnVe6Vc0/cmeAScbAf7MqwC50Kf70vWAkhNC7rg 9zqllsiG823sAe7gODaLed5omnE4/rsI07sSQnJjnXmjSigXN4L0E/RTZC3GC4BC Otv+UpciOtTFCX8//w9e4i/SijoEVA4S/S58kad1D1LWoG9wqtZNn6wXCZ0GmX3w E+srC3U19wh0a8YpXT7RePlIQtfKSRRJXTz5aI6YJVxDZkqyMXZFlBFxy1cohw/m oM+3eQG38Ut9gZHVMZ8uUdFPeBcL0TawGhn1H6uzDs6ocspFGXOpKi58KWuOoiM/ u6ja/DtIyTkGnx/ON3Q7+lgoVuTG/U+H//F+0tdyZ26MBOsa89f6GqomxfHvyyKs HgTnvh+2lBhK4e2gJQl8431fgPWK7UbyDKUPH6HMErDBrelS9zg= =iZRs -----END PGP SIGNATURE----- --EeQfGwPcQSOJBaQU--