From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9400FC5CFE7 for ; Tue, 10 Jul 2018 21:12:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 57EBA208EB for ; Tue, 10 Jul 2018 21:12:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 57EBA208EB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.vnet.ibm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732455AbeGJVN3 (ORCPT ); Tue, 10 Jul 2018 17:13:29 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:59490 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732272AbeGJVN2 (ORCPT ); Tue, 10 Jul 2018 17:13:28 -0400 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w6AKxHNN037050 for ; Tue, 10 Jul 2018 16:59:47 -0400 Received: from e34.co.us.ibm.com (e34.co.us.ibm.com [32.97.110.152]) by mx0a-001b2d01.pphosted.com with ESMTP id 2k53w2gwvk-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 10 Jul 2018 16:59:47 -0400 Received: from localhost by e34.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 10 Jul 2018 14:59:47 -0600 Received: from b03cxnp07029.gho.boulder.ibm.com (9.17.130.16) by e34.co.us.ibm.com (192.168.1.134) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 10 Jul 2018 14:59:42 -0600 Received: from b03ledav003.gho.boulder.ibm.com (b03ledav003.gho.boulder.ibm.com [9.17.130.234]) by b03cxnp07029.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w6AKxfjB6685114 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 10 Jul 2018 13:59:41 -0700 Received: from b03ledav003.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B6D9C6A04F; Tue, 10 Jul 2018 14:59:41 -0600 (MDT) Received: from b03ledav003.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5350D6A051; Tue, 10 Jul 2018 14:59:27 -0600 (MDT) Received: from oc6728276242.ibm.com (unknown [9.80.208.154]) by b03ledav003.gho.boulder.ibm.com (Postfix) with ESMTP; Tue, 10 Jul 2018 14:59:26 -0600 (MDT) Subject: Re: [PATCH v11 5/8] i2c: fsi: Add transfer implementation To: Wolfram Sang Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, robh+dt@kernel.org, benh@kernel.crashing.org, joel@jms.id.au, mark.rutland@arm.com, gregkh@linuxfoundation.org, rdunlap@infradead.org, andy.shevchenko@gmail.com, peda@axentia.se References: <1530816030-13010-1-git-send-email-eajames@linux.vnet.ibm.com> <1530816030-13010-6-git-send-email-eajames@linux.vnet.ibm.com> <20180709224114.4h47enyt4tucqcou@ninjato> <20180710185042.x3slnms5wzocobqu@ninjato> <20180710193944.34phe4zafzvwjm5v@ninjato> From: Eddie James Date: Tue, 10 Jul 2018 15:59:23 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20180710193944.34phe4zafzvwjm5v@ninjato> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-TM-AS-GCONF: 00 x-cbid: 18071020-0016-0000-0000-0000090656A1 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009346; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000266; SDB=6.01059465; UDB=6.00543746; IPR=6.00837385; MB=3.00022092; MTD=3.00000008; XFM=3.00000015; UTC=2018-07-10 20:59:46 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18071020-0017-0000-0000-00003F95CD26 Message-Id: <479b3c82-ffe7-9e6a-569c-64fcb1b43d32@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-07-10_07:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1807100223 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/10/2018 02:39 PM, Wolfram Sang wrote: >> Sorry, what do you mean "show up as"? Yes, we could first shift all our >> addresses in user-space before passing them to the driver, so that the >> msg->addr field is exactly what the hardware expects already... This would >> be non-trivial for our users considering all our documentation represents >> the addresses as the top 7 bits of a byte :( > Ah, now I understand the whole situation! Good that I asked. But I have > bad news for you: > > msg->addr is 7 bit and LSB aligned. No way around that. This is how > Linux I2C worked since the beginning. You have to adapt to it. > > I know what you mean. Most doumentation I get has the addresses in 8 > bit, i.e. 7 bit address shifted + RW bit. But sorry again, the Linux > representation is different and all drivers have to adhere to that. > > An EEPROM ist at 0x50 in Linux. There is no write addr 0xa0 and read > addr 0xa1. OK, I understand! Will test and resend with conforming addressing. Thanks for all the feedback! Eddie > >>>> Indeed, real 10-bit addresses require some additional manipulation of this >>>> I2C master in order to work. We don't support it right now. >>> Then you should remove the associated FUNC flag. >> Ah, but due to the addressing situation, tools like i2cget don't work with >> our addresses unless the 10 bit flag is specified. For example, we may want >> to access 0xA0. > This is a kinda dirty workaround to the above problem. It is even wrong > because 10-bit addresses look totally different on the wire. > > Sorry for the hazzle with the docs, but there is no way around that. >