Received: by 10.223.185.116 with SMTP id b49csp6410299wrg; Wed, 28 Feb 2018 08:58:41 -0800 (PST) X-Google-Smtp-Source: AG47ELtwBPWQnU9PQsxu3QlgPmJAcWQALxIbw+sEssuCgHBykR5PsBfZs/gPDL51365TDrREbj1M X-Received: by 2002:a17:902:7608:: with SMTP id k8-v6mr160300pll.95.1519837121236; Wed, 28 Feb 2018 08:58:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519837121; cv=none; d=google.com; s=arc-20160816; b=qR+58hlQ09pRk4upvB/IzK7bZqtRbnBZe+ExrFY3auOrYRJZb8jovR9qQwArKSnP44 1nQSWzL5Jg2H2tv/pxVvxsgn1IYOY0jbaXmiPXf8I8+x39TJIIIv+w7K06t1vsN25BJ7 TMPGIfHcftT2eKdSZay/ByXzUNT9yHu4FEbZPDw617H99eg/gBdTrPcWVeCQducYLs2G MXAaFut6EB5nyrQlRQmyKaPfCMXMAjLObP0i+uVu/WDXF95LRRm/TybMKddc7kXMFWA7 y52WI6D1kJADJ5OdRvbQIvfYHjyyFywfW3YC5aKyFyh4CXfvaQ1V3NChhiKcxrZevUrw Rckg== 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:arc-authentication-results; bh=M2gauJ9xp+nvEU1hhSpqK8fSWkv+jgjSmqwnAdb1cDg=; b=SkMvw7WOMx6DMzTHkhDML82C9juFIui2U9J+7FZX0Jpo0exKKkrTjr6QbS+C2skJxE nKs3WOP/5XYKSoyAt0dq5enwIpq95SVj91oJk/9UaJlccV57qR8Qt2inX2ZVfpdalIMI UOiOFv4V6YLwEGhZOwokearfl8iE38xdSqRTjjo+ieHSsCZ6rBVnghF+Bcjys/qdIVnC 747YMiTrzRbEzrVrStOo/QZoRiah2tS93IN7AlX3mbwbzv1IiFW3AbpwBLH4/R2UZ3oI ucMVAnh/azEaSOxASNec1j1FSbZPJW/28iesrxw0AaPw8nJEH7LRmiwX0oWnQLRxh72K TnRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=2Ct5MuOD; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p1-v6si1553753pld.80.2018.02.28.08.58.26; Wed, 28 Feb 2018 08:58:41 -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=@lunn.ch header.s=20171124 header.b=2Ct5MuOD; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933077AbeB1Q40 (ORCPT + 99 others); Wed, 28 Feb 2018 11:56:26 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:40565 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932164AbeB1Q4Y (ORCPT ); Wed, 28 Feb 2018 11:56:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=M2gauJ9xp+nvEU1hhSpqK8fSWkv+jgjSmqwnAdb1cDg=; b=2Ct5MuOD5vGww5w/dWukRgOLM/Bkl+XkEyTlY8GevOGZa10M35JDHpMZBEW+v9H1k+5u8fJbQ9c8ocFZdrzgzVJb0HCdnNLz85dtrHN8b+tAqj9ymYe8lHn48dcREB9y1jAeyTgIiAQUYUgPlJ+wr6ngHvahmOUm+unCZun1t6E=; Received: from andrew by vps0.lunn.ch with local (Exim 4.84_2) (envelope-from ) id 1er51e-0000B2-8w; Wed, 28 Feb 2018 17:56:18 +0100 Date: Wed, 28 Feb 2018 17:56:18 +0100 From: Andrew Lunn To: Tim Harvey Cc: Lee Jones , Rob Herring , Mark Rutland , Mark Brown , Dmitry Torokhov , linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-input@vger.kernel.org Subject: Re: [RFC 0/4] Add support for the Gateworks System Controller Message-ID: <20180228165618.GC29484@lunn.ch> References: <1519780874-8558-1-git-send-email-tharvey@gateworks.com> <20180228144424.GC12303@lunn.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Tim Cool. I would say this is done right. > One issue I'm trying to figure out the best way to deal with is the > fact that the GSC can 'NAK' transactions occasionally which is why I > override the regmap read/write functions and provide retries. This > resolves the issue for the mfd core driver and sub-module drivers but > doesn't resolve the issue with these 'emulated devices' which have > their own stand-alone drivers. I'm not sure how to best deal with that > yet. I tried to add retires to the i2c adapter but that wasn't > accepted upstream because it was too generic and I was told I need to > work around it in device-drivers. How about writing an i2c bus driver which sits directly on top of another i2c bus? Basically a one port i2c mux. The current mux code does not seem to directly allow it, since it calls i2c_transfer() directly on the parent, where as you want it to call your own i2c_transfer function. But maybe you could expended the core mux code to allow the i2c_mux_core structure to contain a transfer function? Andrew