From patchwork Wed Feb 12 16:58:06 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 24554 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f70.google.com (mail-yh0-f70.google.com [209.85.213.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B2427203F3 for ; Wed, 12 Feb 2014 16:58:29 +0000 (UTC) Received: by mail-yh0-f70.google.com with SMTP id c41sf21937520yho.9 for ; Wed, 12 Feb 2014 08:58:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=m1usj6a84hCFmlfHcJ77TQU54JeXhi8z3qHniCO5Xq4=; b=C0lMqeHCaeiAxRi0M6kkLQ2eZEVBmZ8D7qnex9ftZNEZbUcEf0ht7saXWxJ4c60nlB IlxPM1cpaPRxjo6nHmtGBy31CZTBHOcEJmBquV8w7wIkpodZRen9rVQ/0ivfOXbc2yZ+ d+J3tjUyETZM/JUzzspB4/bRH3ta9lp5FixCq+fIdvSTWqcliTUBdYKAC3Q2m1DxtEmW mpGhZ2ch3/cX3Yx7c1EdsiHVfowiJ6T2PhQiVe1Bu7ojrQGhSMfwskppgy3Z5jvkgXHd 5EErxV8HY3/u5IGzyZ8Y8UmwzdIKjnpIbaVVYveR6kTgJnQvYehArHqqAGjoI5xHpW17 DkKw== X-Gm-Message-State: ALoCoQlBJno48cN1sDBSDZH4m8qz2bI8E9MDA/f5fegWR+Xb6dKhtj8vc2g9ezatLDGh1B6/LcEF X-Received: by 10.224.163.71 with SMTP id z7mr2053157qax.5.1392224308722; Wed, 12 Feb 2014 08:58:28 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.93.71 with SMTP id c65ls2937914qge.4.gmail; Wed, 12 Feb 2014 08:58:28 -0800 (PST) X-Received: by 10.52.61.133 with SMTP id p5mr24432928vdr.4.1392224308582; Wed, 12 Feb 2014 08:58:28 -0800 (PST) Received: from mail-vb0-f48.google.com (mail-vb0-f48.google.com [209.85.212.48]) by mx.google.com with ESMTPS id si7si7520551vdc.37.2014.02.12.08.58.28 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 12 Feb 2014 08:58:28 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.48 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.48; Received: by mail-vb0-f48.google.com with SMTP id q16so7113870vbe.21 for ; Wed, 12 Feb 2014 08:58:28 -0800 (PST) X-Received: by 10.52.156.232 with SMTP id wh8mr28081406vdb.23.1392224308428; Wed, 12 Feb 2014 08:58:28 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp15263vcz; Wed, 12 Feb 2014 08:58:28 -0800 (PST) X-Received: by 10.194.6.164 with SMTP id c4mr2128636wja.38.1392224307598; Wed, 12 Feb 2014 08:58:27 -0800 (PST) Received: from mail-wi0-f173.google.com (mail-wi0-f173.google.com [209.85.212.173]) by mx.google.com with ESMTPS id t13si11916450wju.91.2014.02.12.08.58.27 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 12 Feb 2014 08:58:27 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.173 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=209.85.212.173; Received: by mail-wi0-f173.google.com with SMTP id hn9so7282688wib.6 for ; Wed, 12 Feb 2014 08:58:27 -0800 (PST) X-Received: by 10.180.11.233 with SMTP id t9mr210258wib.1.1392224306947; Wed, 12 Feb 2014 08:58:26 -0800 (PST) Received: from localhost.localdomain ([80.76.198.141]) by mx.google.com with ESMTPSA id q15sm53757481wjw.18.2014.02.12.08.58.24 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 12 Feb 2014 08:58:25 -0800 (PST) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: linus.walleij@linaro.org, linux@roeck-us.net, lpapp@kde.org, khali@linux-fr.org, Lee Jones Subject: [PATCH 1/1] mfd: max665x: Differentiate between MAX665X devices Date: Wed, 12 Feb 2014 16:58:06 +0000 Message-Id: <1392224286-31084-1-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.8.3.2 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: lee.jones@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.48 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , This driver is pretty sparse at the moment, but once we start to add more functionality it's highly probable that we'll be required to differentiate between supported devices. To enable us to do that efficiently via Device Tree we need to separate out the compatible strings, one per variant. Signed-off-by: Lee Jones --- drivers/mfd/max665x.c | 3 ++- include/linux/mfd/max665x-private.h | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/mfd/max665x.c b/drivers/mfd/max665x.c index 54fdc11..3bcb765b0 100644 --- a/drivers/mfd/max665x.c +++ b/drivers/mfd/max665x.c @@ -71,7 +71,8 @@ static int max665x_remove(struct i2c_client *i2c) } static struct of_device_id max665x_dt_match[] = { - { .compatible = "maxim,max665x" }, + { .compatible = "maxim,max6650", .data = (void *)MAX6550 }, + { .compatible = "maxim,max6651", .data = (void *)MAX6551 }, {}, }; MODULE_DEVICE_TABLE(of, max665x_dt_match); diff --git a/include/linux/mfd/max665x-private.h b/include/linux/mfd/max665x-private.h index 293db4b..1578a04 100644 --- a/include/linux/mfd/max665x-private.h +++ b/include/linux/mfd/max665x-private.h @@ -23,6 +23,11 @@ #include #include +enum max655x_id { + MAX6550 = 0, + MAX6551, +} + struct max665x_dev { struct device *dev; struct mutex iolock;