From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752042AbeAZQeA (ORCPT ); Fri, 26 Jan 2018 11:34:00 -0500 Received: from mail-eopbgr30042.outbound.protection.outlook.com ([40.107.3.42]:47738 "EHLO EUR03-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751855AbeAZQd4 (ORCPT ); Fri, 26 Jan 2018 11:33:56 -0500 Authentication-Results: spf=pass (sender IP is 188.184.36.50) smtp.mailfrom=cern.ch; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=cern.ch; Subject: Re: [RFC PATCH 0/2] check I2C device id for pca984x chips To: Peter Rosin CC: Wolfram Sang , , References: <20180122113657.32094-1-peda@axentia.se> From: Adrian Fiergolski Organization: CERN Message-ID: <04535e9d-9ba4-2f27-e94c-12d877d26cda@cern.ch> Date: Fri, 26 Jan 2018 17:33:29 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180122113657.32094-1-peda@axentia.se> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Language: en-GB X-Originating-IP: [128.141.234.113] X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:188.184.36.50;IPV:NLI;CTRY:CH;EFV:NLI;SFV:NSPM;SFS:(10009020)(376002)(39380400002)(39860400002)(396003)(346002)(2980300002)(438002)(189003)(199004)(2950100002)(478600001)(6916009)(6706004)(86362001)(6246003)(106002)(64126003)(246002)(31696002)(31686004)(229853002)(8936002)(74482002)(83506002)(186003)(5660300001)(65826007)(966005)(8676002)(72206003)(26005)(336011)(16526019)(4326008)(50466002)(53546011)(59450400001)(6306002)(106466001)(76176011)(786003)(54906003)(16576012)(3846002)(6116002)(58126008)(66066001)(65806001)(316002)(65956001)(7736002)(230700001)(956003)(2906002)(356003)(2486003)(23676004)(7636002)(305945005)(36916002)(47776003)(36756003)(3940600001)(217873001);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR0601MB1920;H:cernmxgwlb4.cern.ch;FPR:;SPF:Pass;PTR:cernmx11.cern.ch;MX:1;A:1;LANG:en; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: faa5d51b-9061-4c82-77ad-08d564da9519 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(4608076)(2017052603307)(7153060)(7193020);SRVR:VI1PR0601MB1920; X-MS-TrafficTypeDiagnostic: VI1PR0601MB1920: X-Microsoft-Exchange-Diagnostics: 1;VI1PR0601MB1920;20:7bclwFw/p83puzWz/lxSJOh9/AvAbz0TslpdEgTesh6REq0W0ioTQrW+zOaYEWMZwGsvmHxFy5yS5WdGh6YmArq2rtPUYkNDGrOqorNvtSgKIA9fXOdiW4CXLn6/ZfHT6A5AnfOcT6D+KjugaplnE/z0CdowaaSNc+XLIPmE/GK7dtktJy7ROy2vViOHPB+a04qKD41liE2X3em2okWsaSdCdUgblIerKB2cLmQ8dgS+tVebqk0iplSv0wciaO/FBfqG2/5NCubpiBclOBf9HT4hm06Kz3XuG0DMmsz51U7wtSqKEAMEQ4cI/WFQ4H1iEFggxPo538Xl10uPQqLDMxSGWFZIXadoK2t2PSW7hxqMr/zaNCu6RJyc0m+VlRD2rb7Z7rbPL4iPtbkdTFi68Ne6p2RQB3AK2F+rLfNVRm7OwMaDI+VZzUJ+Aok1fcu+CDNnF2dQlCtmsNY/+0s2K+K+vphu3EWE5nx/pvzOT51YD9UfRnEBW2VAxcTSUnFe;4:XUHpnQS/p8WtcgK8lOWWuz5enJpNHq2GZzUzeByWjN/rlXZeb0Bf4X3ONZGPBz+6SVWY3/oi51eASZVYn/5wTzL0fL5RoEYVVchkfbbQBG5CMHadUE7cKAJRxZOwE/M3GAS+AxuVOKKYpXxsMLhp0KC2RKEn3aOijZBSY9yUNx4jsGD0EbPe6HCHWexntxh2/sLdGCPn6pXFlXsyjnOgA+4uTkSiCFaDM1bCt4wdwjRXzoES/yBfuyN9kpX/R4UhnXKA2RIOMN7L8jbc25hcXy7Usyljo8OnEFe2Xm7cPTBGjxMqPm3QOpn5eQQmmz1i X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(166708455590820); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040501)(2401047)(8121501046)(5005006)(93006095)(93004095)(3231023)(2400081)(944501161)(10201501046)(3002001)(6041288)(201703131423095)(201702281529075)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123564045)(20161123560045)(20161123558120)(6072148)(201708071742011);SRVR:VI1PR0601MB1920;BCL:0;PCL:0;RULEID:;SRVR:VI1PR0601MB1920; X-Forefront-PRVS: 05641FD966 X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtWSTFQUjA2MDFNQjE5MjA7MjM6bDQ3Q1NURUN4TnlQVDN6bUdlT2ZaMnVl?= =?utf-8?B?V0Y4N3NMd2hkaGt0aTlmb1BpY3RKTE40T3BJT2ptNXVvNENKUHYzS2U2UytT?= =?utf-8?B?bHkvSWtmSTA5cTFtZC9XNEtDZENLcG0wTGw4aXAwd3dJdDJIdEhWclc5SjI1?= =?utf-8?B?VGViWmdHZkNweVBsc0Z2S1BRNUNsV2FtU2Q0b1lsMzBmL2N6Nm9mYVhtaHZR?= =?utf-8?B?ejRJZDhlOTNUeFl2ZFhBRkM2R3NmaWZvVUJwUld5aTFHYjI5dWxCV1BHcUlM?= =?utf-8?B?ZEMxWkJ0YUJVM240Uy84bkkxN003N1VwWTdBSGx3UWpQenRlR2t0U3Bhekpz?= =?utf-8?B?N0o0ajhxbTQxaUtlR2RUWkJvOGxXUE15RTk2cTN4eHFhMEJoTjBQdmVleHo3?= =?utf-8?B?d0dMdENzMFJzRldK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LG3be16C2j95awCEg1QX26Nui0ez5rOg77IAbmK0rB/hHhCQv1y+Kmj8dYw8dMU=;5:jPr9bMyMLEA1z4t0aFoafO8J7XTS85p4p+vbL80nWgNSWbfL2zEAwVEfZOSKCPZ2Con66/yI24Pt7YyNTQ8WnRWxEhdgIY1Y9OWGgJrpmI/7p/BLm6bZb2GAWU82SWubOk3Jr4W4fk8A4nZJFXBaz2snyuiA1N4i1vMgdMitHUU=;24:MVyyW8pOjz4iR9DzB2LyhCZwZeOMrSXKVw/tnbqJiLepHrl51XqZem8shoJNyDmnhroomeiiCTRRf4A5ELP0SCfcDnLlrs5M8xJGeAds0YM=;7:APcyIVbXKu+VocVT9RAT0lWd06TGX5g6+oSsuPN/XqGEJEOwr/wJA13emPG0hWtmWHuphUN0y9BmQgdWlKXWB2ueb6h6Xmu8zNAW3tT31Bfz2nipJWfQt/RrEA6DCJc8FENXYg34rbk2SMgyAvBw1KDSuFLe97Dkpttk7/eddQEhYiX2nctFCufRTM7zjxtDniBsCaj2kVvbFCDmMmBI6hOC7LXuJK9SEUGQsP7Lzb4bmGEF3tgVth6ZJgAo+a6P SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cern.ch X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jan 2018 16:33:50.6946 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: faa5d51b-9061-4c82-77ad-08d564da9519 X-MS-Exchange-CrossTenant-Id: c80d3499-4a40-4a8c-986e-abce017d6b19 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=c80d3499-4a40-4a8c-986e-abce017d6b19;Ip=[188.184.36.50];Helo=[cernmxgwlb4.cern.ch] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0601MB1920 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Peter, Sorry for the late reply. Yes, it's true I have one of the chip. However, my yocto based build system depends on https://github.com/Xilinx/linux-xlnx and it's in version 4.9.0-xilinx-v2017.3. Apparently, there were some bigger changes in i2c core between this version and upstream, thus your patches don't apply. Next week I will try to align only me i2c subdirectory with upstream. Provided it compiles, I will try then to apply and confirm your patches. Regards, Adrian On 22.01.2018 at 12:36, Peter Rosin wrote: > Hi! > > This series tries to check the I2C device id, but instead of open > coding the check in the pca954x driver, I have a new function in > the core doing the work. > > The code is only compile-tested, hence the RFC, and I would really > like a Tested-by: tag from Adrian who presumably have one of these > chips. > > Also, I'm not sure if I should list all manufacturers that I know > about in the header, or if I should settle for the one that is > actually used and leave the others to be added by whomever needs > them... > > Cheers, > peda > > Peter Rosin (2): > i2c: add i2c_get_device_id() to get the standard i2c device id > i2c: mux: pca954x: verify the device id of the pca984x chips > > drivers/i2c/i2c-core-base.c | 33 ++++++++++++++++++++++++++++ > drivers/i2c/muxes/i2c-mux-pca954x.c | 43 +++++++++++++++++++++++++++++++++++++ > include/linux/i2c.h | 30 ++++++++++++++++++++++++++ > 3 files changed, 106 insertions(+) > From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adrian Fiergolski Subject: Re: [RFC PATCH 0/2] check I2C device id for pca984x chips Date: Fri, 26 Jan 2018 17:33:29 +0100 Message-ID: <04535e9d-9ba4-2f27-e94c-12d877d26cda@cern.ch> References: <20180122113657.32094-1-peda@axentia.se> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20180122113657.32094-1-peda@axentia.se> Content-Language: en-GB Sender: linux-kernel-owner@vger.kernel.org To: Peter Rosin Cc: Wolfram Sang , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org List-Id: linux-i2c@vger.kernel.org Hi Peter, Sorry for the late reply. Yes, it's true I have one of the chip. However, my yocto based build system depends on https://github.com/Xilinx/linux-xlnx and it's in version 4.9.0-xilinx-v2017.3. Apparently, there were some bigger changes in i2c core between this version and upstream, thus your patches don't apply. Next week I will try to align only me i2c subdirectory with upstream. Provided it compiles, I will try then to apply and confirm your patches. Regards, Adrian On 22.01.2018 at 12:36, Peter Rosin wrote: > Hi! > > This series tries to check the I2C device id, but instead of open > coding the check in the pca954x driver, I have a new function in > the core doing the work. > > The code is only compile-tested, hence the RFC, and I would really > like a Tested-by: tag from Adrian who presumably have one of these > chips. > > Also, I'm not sure if I should list all manufacturers that I know > about in the header, or if I should settle for the one that is > actually used and leave the others to be added by whomever needs > them... > > Cheers, > peda > > Peter Rosin (2): > i2c: add i2c_get_device_id() to get the standard i2c device id > i2c: mux: pca954x: verify the device id of the pca984x chips > > drivers/i2c/i2c-core-base.c | 33 ++++++++++++++++++++++++++++ > drivers/i2c/muxes/i2c-mux-pca954x.c | 43 +++++++++++++++++++++++++++++++++++++ > include/linux/i2c.h | 30 ++++++++++++++++++++++++++ > 3 files changed, 106 insertions(+) >