Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1576668yba; Tue, 2 Apr 2019 11:29:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqxowhHMiFzgJIWzXK62GPLuizjEhoDLuacPHrIS6k0Lce4kZH11yGd1yU8KKdVz+o3YBh8k X-Received: by 2002:a62:1d94:: with SMTP id d142mr40014317pfd.83.1554229760900; Tue, 02 Apr 2019 11:29:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554229760; cv=none; d=google.com; s=arc-20160816; b=Bs1apG9xjfrb28fPhUpvlwGt0pDetef8jtDfplcjSOlZBOPWPrj/SJ6RCb5iVMbSur ycKm5SoHmTsEdkB26StVVWgA3CTi3bE+y2UEoTGU+wzqzjGj3ioRJ9AsAwaFsF9vfIae QGurFZpykWHI3l9ij73xIT538suYG5lKEcwR7Va9d68w2qdcGT1NXgzDGPtDwXR7ZMAe clBqsZH903p9uCrxuBXSyKpcPnRucYhsH+sormCCrfp0oYjvXmI0FBL7qtPY2EjvOfPe N0OrC+Ws217nVYngB9j11I8APp4TgHDwYCS5y019zBo5hdr+YdDzbvLYYWvHTt8JIory ky9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=2d9K9JUUlUqo7KV2H4/IAzjMAbwM+ocor4KxdYwAt1E=; b=kzqXBoKLEKJTiRx/3TXyZ6nVylFFKhO+jWbNqtpgU+XOxcz1ZvpTHLcMgKMEZNbCSg 3OUrsRqymmcKoWx1P+GatUtHCQHxJoIsM8Mve95TedO44UAsESkWEtX5RXLXiJTITYwQ BZV1ILGtNlkb6LAbh3WwiY+0Sp+yjQfjtWValvZEBkf+3p4GhE1val1T3UrtrjaBHIro SQLDaeCRROZSuO1rIbPV6aQBQVQdOwLEFOATqmeyqajEI60VadxpURuEBxX61RxiwCsf TH6qp7uBTG3o88pKlH7UIjPofUdBDxULFyrA/uHdZWoGFx7edc5G2UeenlvKze/DB72h KWwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b="OSP/mj/Q"; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n22si11536761plp.296.2019.04.02.11.29.05; Tue, 02 Apr 2019 11:29:20 -0700 (PDT) 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=@broadcom.com header.s=google header.b="OSP/mj/Q"; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729428AbfDBR5j (ORCPT + 99 others); Tue, 2 Apr 2019 13:57:39 -0400 Received: from mail-yb1-f193.google.com ([209.85.219.193]:45620 "EHLO mail-yb1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726582AbfDBR5j (ORCPT ); Tue, 2 Apr 2019 13:57:39 -0400 Received: by mail-yb1-f193.google.com with SMTP id b18so5146774yba.12 for ; Tue, 02 Apr 2019 10:57:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=2d9K9JUUlUqo7KV2H4/IAzjMAbwM+ocor4KxdYwAt1E=; b=OSP/mj/Q43obVdXvQ57TjzVvFutjUvARj/fwj7KwQbAGYyhMFLmt+xaCFRQ2gFX5wH UolTLDXM2nO1GNy0xLGQvjSqBfxb1glIYRzt//1E+1EpDhqDFPhMpRlyHYQxJOMNgMDu ceXfkzEkoJp16tAo59KKj/qtDNvKX55VkTRC4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=2d9K9JUUlUqo7KV2H4/IAzjMAbwM+ocor4KxdYwAt1E=; b=RTN8Xmadj5zLHaUH7v2G3ZD6v26aUrf/KeugdN6675uo6rUqoMLDu7s3WxrPKYKAWw hyfKYnq9281/KrSocSJ9hLszi1V9GYKCmPifpH9rYEjShfgLVQe8rhzJzbf0AIiCcWUn HxPIy7IDEKNRCLLYf0foCB571U0bdfToNxBNCRszwvVvQA1ASpNxw5iukqf9S1Iz0+p0 iwr5c0ELKCPqbpTgFBnvpO6ur3cK2avH6w8wNmgtJmD+24ZckNTwGrygqCzmCzBlW/IL 2+vpotnz9RKumBWHsIp1k/TWZqrftwbUUINNiatWPAeuZ2Fqy6Lrv7pbG6K/CM15pSJ3 9MMA== X-Gm-Message-State: APjAAAVRx06/BKZ4znLbrjFBNN2N89OM3gCwIdh9K9sBavlC49cPdb0R 1ZfuySjr99Pf1SaevhQjYEzGRA== X-Received: by 2002:a25:9941:: with SMTP id n1mr58710999ybo.85.1554227857972; Tue, 02 Apr 2019 10:57:37 -0700 (PDT) Received: from [10.136.8.252] ([192.19.228.250]) by smtp.gmail.com with ESMTPSA id c206sm4681079ywc.71.2019.04.02.10.57.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Apr 2019 10:57:36 -0700 (PDT) Subject: Re: [PATCH v5 7/8] i2c: iproc: add NIC I2C support To: Wolfram Sang Cc: Rob Herring , Mark Rutland , linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, Rayagonda Kokatanur References: <20190214175725.60462-1-ray.jui@broadcom.com> <20190214175725.60462-8-ray.jui@broadcom.com> <20190402102733.GD2960@kunai> From: Ray Jui Message-ID: Date: Tue, 2 Apr 2019 10:57:33 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.0 MIME-Version: 1.0 In-Reply-To: <20190402102733.GD2960@kunai> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/2/2019 3:27 AM, Wolfram Sang wrote: > >> +#define IDM_CTRL_DIRECT_OFFSET 0x00 > > And this IDM thing is also never used outside of the I2C context? In > other words, it also doesn't need a seperate DT node? > > That is correct. Only in the I2C context in our use case. >> + /* indicates no slave mode support */ >> + bool no_slave; > > I would suggest to not use a flag, but to nullify the {un}reg_slave > callbacks in probe depending on the type. That will also tell the > i2c-core that slave functionality is not supported. And you can use if > (!algo->reg_slave) as a flag, too. > Yes. Great idea. I'll make the change and remove reg_slave. >> + iproc_i2c->type = >> + (enum bcm_iproc_i2c_type) of_device_get_match_data(&pdev->dev); > > No need to cast a void*. > Yes will fix. Thanks, Ray