Received: by 10.223.185.116 with SMTP id b49csp5647447wrg; Tue, 27 Feb 2018 18:01:26 -0800 (PST) X-Google-Smtp-Source: AH8x225Adw6BNXb4UGz/h/hcb3ZhFE9Cc8RapiO4sBnUT42ivl7bVML+XBS8Fv6Kkv7GQNTEDrZ8 X-Received: by 2002:a17:902:a03:: with SMTP id 3-v6mr16214049plo.282.1519783286007; Tue, 27 Feb 2018 18:01:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519783285; cv=none; d=google.com; s=arc-20160816; b=rtV+h8iKcZO7ssrAXP3Zu1ytdWYaMZ/zwPb7+qKonxqjUSfLCg0g9GAl4OwsijgHS1 Fd3qJcBTjXyhQs94Y2OjrYFUdzPp6y1Pdm7GjhyFfb8f2kozDvNH1FAWVMkHonI1+TUc 0QEuFtxPj4xHIOXHO1vA1+0hM3ApTnlhru36t8KjNVxPUjUAC9pA6+aHgcq+mvXPjwgg ivCeiqUrt2CQ1Dvq2dJMqi0JJ6NkNBfYnIil3A0TeRzg+tEQL4fe/ff64jn786GRNe15 BjS9OueeQOmAfDBXk0nX6Exzdz1uJvvTINmSOqW4V8evZ7VAg2OS/mY/YkW4LfTQtsFE pK5w== 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 :arc-authentication-results; bh=EIwWU1yNpb8AdM+zqiMs3u93NxXC1C+TbQpUfZnTzhA=; b=tBud5qtAsqVm6qAt+z9aq81/Xz0DWf6cQK9OLR4T0tFbV2dZ5Jyd0+HCtaJK/g/x7S HXrp0WCjN2q203XZeI48hnGnhqeLlquq5JBFDwGL7hYWsaTq/76bZtfReh5meyXeYG/Z SHYkSsVXXo26fsd3tbpj4wMuoaBptZ0IeVvjN+3yS0rYDzSWTHKwicJYZHcI2zh95+5e HqBCGtCUDfWgBH9cSNS8TXZEyQaJ6LZ+ExwRFO/w0I0vXZovlmq5qbhVF6inmd61K1n1 9baeYpz1O0vdvCFVs80FqrAHaE2q/dPLPha6BCtZzAbkyxaYkCfcBERs5+2YXsDc1S0q ag6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=cEhGy77u; 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 a9si379738pff.263.2018.02.27.18.01.10; Tue, 27 Feb 2018 18:01:25 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=cEhGy77u; 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 S1751764AbeB1CAd (ORCPT + 99 others); Tue, 27 Feb 2018 21:00:33 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:55406 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751634AbeB1CAb (ORCPT ); Tue, 27 Feb 2018 21:00:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To: Subject:Sender:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=EIwWU1yNpb8AdM+zqiMs3u93NxXC1C+TbQpUfZnTzhA=; b=cEhGy77uVEiiknp4riXuYRtRm WtdvtCZaTsNHy7Q8kGxW2cnwl2WOX38WdUIWfgNSHBnsTLnIFcbvxpmib1qzxnnlFQGpZNOylSv3Z BV5IAS8+vaZXA9qduS0MgIs4JNOa+lT1J5C0BpmahkRwja3X/77Fr3O01iXbtaYDZwKKh/Jhs6AoB pHAZnbNH9fIbyP6z+GwgUkndLD3dvs9Ppiy09sJ67wkvUl6xgJnT9xDl9ggE30EMtM5VickT3Kxhh /eWtG+pyW9vzB10Q/c11TWWxZKIC+5kPilU6d45pKd2328tL5Qzn8ViZeBju3YwMPngi18/hQWKyT s/NkZReaA==; Received: from static-50-53-52-16.bvtn.or.frontiernet.net ([50.53.52.16] helo=midway.dunlab) by bombadil.infradead.org with esmtpsa (Exim 4.89 #1 (Red Hat Linux)) id 1eqr2k-0007i0-Se; Wed, 28 Feb 2018 02:00:30 +0000 Subject: Re: [RFC 2/4] mfd: add Gateworks System Controller core driver To: Tim Harvey , Lee Jones , Rob Herring , Mark Rutland , Mark Brown , Dmitry Torokhov Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-hwmon@vger.kernel.org, linux-input@vger.kernel.org References: <1519780874-8558-1-git-send-email-tharvey@gateworks.com> <1519780874-8558-3-git-send-email-tharvey@gateworks.com> From: Randy Dunlap Message-ID: <170c83e1-8a34-5103-3767-139b22081cf9@infradead.org> Date: Tue, 27 Feb 2018 18:00:25 -0800 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: <1519780874-8558-3-git-send-email-tharvey@gateworks.com> Content-Type: text/plain; charset=utf-8 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 02/27/2018 05:21 PM, Tim Harvey wrote: > The Gateworks System Controller (GSC) is an I2C slave controller > implemented with an MSP430 micro-controller whose firmware embeds the > following features: > - I/O expander (16 GPIO's) using PCA955x protocol > - Real Time Clock using DS1672 protocol > - User EEPROM using AT24 protocol > - HWMON using custom protocol > - Interrupt controller with tamper detect, user pushbotton > - Watchdog controller capable of full board power-cycle > - Power Control capable of full board power-cycle > > see http://trac.gateworks.com/wiki/gsc for more details > > Signed-off-by: Tim Harvey > --- > drivers/mfd/Kconfig | 10 ++ > drivers/mfd/Makefile | 1 + > drivers/mfd/gsc.c | 330 ++++++++++++++++++++++++++++++++++++++++++++++++ > include/linux/mfd/gsc.h | 79 ++++++++++++ > 4 files changed, 420 insertions(+) > create mode 100644 drivers/mfd/gsc.c > create mode 100644 include/linux/mfd/gsc.h > > diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig > index 1d20a80..16dd486 100644 > --- a/drivers/mfd/Kconfig > +++ b/drivers/mfd/Kconfig > @@ -341,6 +341,16 @@ config MFD_EXYNOS_LPASS > Select this option to enable support for Samsung Exynos Low Power > Audio Subsystem. > > +config MFD_GSC > + tristate "Gateworks System Controller" > + depends on (I2C && OF) || COMPILE_TEST Do both I2C and OF have stubs so that a driver will build when they are both disabled? I.e., only COMPILE_TEST is enabled? > + select MFD_CORE > + select REGMAP_I2C > + select REGMAP_IRQ > + help > + Enable support for the Gateworks System Controller found > + on Gateworks Single Board Computers. > + > config MFD_MC13XXX > tristate > depends on (SPI_MASTER || I2C) thanks, -- ~Randy