Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp2141530ybz; Thu, 23 Apr 2020 12:19:32 -0700 (PDT) X-Google-Smtp-Source: APiQypLTpOHy1Si4i81Rls/TGmdagCPm7v8WSPDaUZ/r+9WEtyHIpFhOvQSeFWquXzdSLMSJesSH X-Received: by 2002:a17:906:e5a:: with SMTP id q26mr3783476eji.261.1587669572689; Thu, 23 Apr 2020 12:19:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587669572; cv=none; d=google.com; s=arc-20160816; b=eT6ptWwMYrNCDN+/kdLRyYycCO4dw9VZXPjYwEZk1Qr/yw0qtSjEilT2afQOP/b19y bU8wbU51C07jdV7I7+yFvwHG0OdEt7Ywf4EsKF7i8xsCMhxao7bJKh9GA2dZewa6tP3C sG6+2c9bczKPdXQRI6ly1VVTZ2IY9rQT2Hm8BLKRAy3IBTe16/KCCsB1w1lLFP+eENsW FCz/ttjNgV/c+94Ht6TjagVKGwj4cKfETL8pEWZlWtTDtksAIEMQ2WwRk3sG3YyN2Jt5 m8EKjfhSWWfFbw5oGH+j75Cf3sxvFX2O+mdZfuh19xnwPTbwf55ZDf3DrmlNi8aKvhIi Uf/w== 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=uzHZNuviBZeCwbTi6fjKy2OtHCbypcJT0Ob8yHY0AVE=; b=ok8KsgmlWYVWKgo6OZLQ92oC3y58S/unS+mLx1D7DERGzHcHGJSaDlE5T4GXpQN3KC gZkXhOi5nd558GtowvHD6/WcM3Wq39rF5osC062p27B49+JRpkN/8q7mQq5tP4zJM6Yg EpkyEzfMgGnsccwG8wJxowOAZY2lxplO849ORzuKrxTq7nJ1idlXEphuU8fxxAmWHknK 0CX7x9YLpJR+MeVg+WBEBIHj6NAGywZU+kU8fmmgFcvEoTDzgK7rRZ/oIL2ysoSLkL7u E2BmogYByt5X2QsWuU6jquUjGpqqqRX/yKoubzzfb9zPTR4Wy2fld+CbGUNufD/djU0Y 3sbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="2GdKcbP/"; 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 d13si733284eds.361.2020.04.23.12.19.07; Thu, 23 Apr 2020 12:19:32 -0700 (PDT) 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=default header.b="2GdKcbP/"; 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 S1728733AbgDWOpc (ORCPT + 99 others); Thu, 23 Apr 2020 10:45:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:50536 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726380AbgDWOpc (ORCPT ); Thu, 23 Apr 2020 10:45:32 -0400 Received: from localhost (fw-tnat.cambridge.arm.com [217.140.96.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0E6D82074F; Thu, 23 Apr 2020 14:45:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587653131; bh=U3TC3bN3p9nhKeritQu2fK5CBI6ltT2H/wZ9X1HyZNI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=2GdKcbP/7Ijdm+VeNN6EOWFzP2+mwXdUap8T5O+nZ0CN6YEiDyTb2byLJ89nA8YSi VDzwLK9iDw/URifFQJrlhb8BH4/8y1m2hox1gF+EIhfuLSiMBuUt0OsfyvubHM/p7q ar2sCqg9tb7xPPSCxfEGFZu0SYh4W7Gg/C/mSyFM= Date: Thu, 23 Apr 2020 15:45:29 +0100 From: Mark Brown To: AceLan Kao Cc: Greg Kroah-Hartman , "Rafael J. Wysocki" , Aaron Sierra , linux-kernel@vger.kernel.org Subject: Re: [PATCH] regmap-i2c: add 16 bits register width support Message-ID: <20200423144529.GM4808@sirena.org.uk> References: <20200423085857.93684-1-acelan.kao@canonical.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="EE8jvUPYYQjJtG7J" Content-Disposition: inline In-Reply-To: <20200423085857.93684-1-acelan.kao@canonical.com> X-Cookie: This unit... must... survive. User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --EE8jvUPYYQjJtG7J Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Apr 23, 2020 at 04:58:57PM +0800, AceLan Kao wrote: > This allows to access data with 16 bits register width > via i2c smbus block functions. > The implementation is inspired by below commit > https://patchwork.ozlabs.org/patch/545292/ Do you actually have a system that needs this or is it just being implemented for completeness? The patch you link to mentions that there are correctness issues with this implementation. Please include human readable descriptions of things like commits and issues being discussed in e-mail in your mails, this makes them much easier for humans to read especially when they have no internet access. I do frequently catch up on my mail on flights or while otherwise travelling so this is even more pressing for me than just being about making things a bit easier to read. > @@ -255,6 +312,10 @@ static const struct regmap_bus *regmap_get_i2c_bus(struct i2c_client *i2c, > i2c_check_functionality(i2c->adapter, > I2C_FUNC_SMBUS_I2C_BLOCK)) > return ®map_i2c_smbus_i2c_block; > + else if (config->val_bits == 8 && config->reg_bits == 16 && > + i2c_check_functionality(i2c->adapter, > + I2C_FUNC_SMBUS_I2C_BLOCK)) > + return ®map_i2c_smbus_i2c_block_reg16; OTOH we'll only use it if the device wouldn't otherwise work so I'm not sure that it's any worse than just hoping the bus is uncontested, hopefully system designers have taken this into account when building systems without real I2C controllers. --EE8jvUPYYQjJtG7J Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAl6hqggACgkQJNaLcl1U h9DIqgf+O6MUgn8IRhVjKqiNm14EY05T45nx9Glldr42oSPuanv/Og8adXetxcNf IJP1xEihOrPMS7DZJl1Vc/jbJR3SMX0cbhDNxQTjXV00R02YeHDieCy/991CaNrY ZwaOEoVjguOHCs9Z5f9jRGTUd2FZ5uLNgpssj3rS4Jugs+GUka5FFQGQMs9ckh1S fynMgFbn1rsAsSsMnjHSUwgSxp/6ZXsXhnUt7twiQf0B7aW9m7NjsZduXE8LRpJA hJC5Aj+Xrm0QqtzUmeb/Us5t5IYoE/u3DXLDfghbHkpzeLki86Vxw9m0IuAm0rMP XhZyIBBMKsTUakQhqffh/aqMFEvckA== =nI9G -----END PGP SIGNATURE----- --EE8jvUPYYQjJtG7J--