From patchwork Thu Mar 19 14:52:45 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 46035 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f198.google.com (mail-lb0-f198.google.com [209.85.217.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 35A3A21515 for ; Thu, 19 Mar 2015 14:53:38 +0000 (UTC) Received: by lbdu10 with SMTP id u10sf8588198lbd.3 for ; Thu, 19 Mar 2015 07:53:37 -0700 (PDT) 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:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=p+yDFKSN6WZza9LECLqwGCM89AMX73miEgB5JOhTtCU=; b=TQoIFw+G/MCVN2YxhxXDERiYvmsvTKHsXq4oaWB65nVW1bCbWoMmVMA853MdJvMoqa 2FHwblKIu8Zrb5ReQ4aoPZ1wL8awe28Zb4Ghzgs1ItIixr3pOvq+/3ZPnyFITy5lkVXf eCjd9H9EidnJtTnVnJUrwhdol+WBb63Tlio3OJ+h1+qlXMcOaaOfQpyKw1n3H9Y/WiLs XdWB37NyNPFRS/CVvADy7oairw/WvZEnxcAKjwYYyvMUt2iZvZ0Sgup4oarb3jAd9JBW ACFhiMPNbIQw9Ww5xgipet+bnRiDoGgKvUGb9Tl7CjLu7xMs77/Oro9z0c+ulsHg47zc TOTA== X-Gm-Message-State: ALoCoQmgi2gP55UEMKYypU1DcGi6hG+xV4gXc2zOz4Wv0HgRyXREoUINzt4LHlzBCa/7yfCxU0/D X-Received: by 10.152.19.67 with SMTP id c3mr10850679lae.7.1426776817052; Thu, 19 Mar 2015 07:53:37 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.22.65 with SMTP id b1ls318474laf.99.gmail; Thu, 19 Mar 2015 07:53:36 -0700 (PDT) X-Received: by 10.112.85.165 with SMTP id i5mr70925528lbz.7.1426776816746; Thu, 19 Mar 2015 07:53:36 -0700 (PDT) Received: from mail-lb0-f174.google.com (mail-lb0-f174.google.com. [209.85.217.174]) by mx.google.com with ESMTPS id r10si1137559lag.118.2015.03.19.07.53.36 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Mar 2015 07:53:36 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.174 as permitted sender) client-ip=209.85.217.174; Received: by lbcgn8 with SMTP id gn8so54550201lbc.2 for ; Thu, 19 Mar 2015 07:53:36 -0700 (PDT) X-Received: by 10.112.150.39 with SMTP id uf7mr19407286lbb.72.1426776816608; Thu, 19 Mar 2015 07:53:36 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.35.133 with SMTP id h5csp438624lbj; Thu, 19 Mar 2015 07:53:35 -0700 (PDT) X-Received: by 10.66.166.39 with SMTP id zd7mr158184976pab.117.1426776814592; Thu, 19 Mar 2015 07:53:34 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u6si3618110pds.22.2015.03.19.07.53.33; Thu, 19 Mar 2015 07:53:34 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754638AbbCSOx3 (ORCPT + 27 others); Thu, 19 Mar 2015 10:53:29 -0400 Received: from mail-la0-f48.google.com ([209.85.215.48]:34055 "EHLO mail-la0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752788AbbCSOxH (ORCPT ); Thu, 19 Mar 2015 10:53:07 -0400 Received: by lagg8 with SMTP id g8so64208784lag.1 for ; Thu, 19 Mar 2015 07:53:06 -0700 (PDT) X-Received: by 10.152.28.233 with SMTP id e9mr69088495lah.3.1426776786307; Thu, 19 Mar 2015 07:53:06 -0700 (PDT) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id xq2sm328042lbb.49.2015.03.19.07.53.04 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Mar 2015 07:53:05 -0700 (PDT) From: Linus Walleij To: Samuel Ortiz , Lee Jones , Dmitry Torokhov Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-input@vger.kernel.org, Linus Walleij Subject: [PATCH 2/2] mfd: tc3589x: enforce device-tree only mode Date: Thu, 19 Mar 2015 15:52:45 +0100 Message-Id: <1426776765-18812-3-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1426776765-18812-1-git-send-email-linus.walleij@linaro.org> References: <1426776765-18812-1-git-send-email-linus.walleij@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: linus.walleij@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.174 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , All systems using the TC3589x multifunction expander uses devicetree, so don't clutter the place with a lot of and assume it is there. Cc: Dmitry Torokhov Cc: Lee Jones Signed-off-by: Linus Walleij Acked-by: Lee Jones --- drivers/gpio/Kconfig | 1 + drivers/gpio/gpio-tc3589x.c | 3 --- drivers/input/keyboard/tc3589x-keypad.c | 9 --------- drivers/mfd/Kconfig | 1 + drivers/mfd/tc3589x.c | 9 --------- 5 files changed, 2 insertions(+), 21 deletions(-) diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index c1e2ca3d9a51..dc1aaa83a347 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -669,6 +669,7 @@ config GPIO_STP_XWAY config GPIO_TC3589X bool "TC3589X GPIOs" depends on MFD_TC3589X + depends on OF_GPIO select GPIOLIB_IRQCHIP help This enables support for the GPIOs found on the TC3589X diff --git a/drivers/gpio/gpio-tc3589x.c b/drivers/gpio/gpio-tc3589x.c index 11aed2671065..31b244cffabb 100644 --- a/drivers/gpio/gpio-tc3589x.c +++ b/drivers/gpio/gpio-tc3589x.c @@ -260,10 +260,7 @@ static int tc3589x_gpio_probe(struct platform_device *pdev) tc3589x_gpio->chip.ngpio = tc3589x->num_gpio; tc3589x_gpio->chip.dev = &pdev->dev; tc3589x_gpio->chip.base = -1; - -#ifdef CONFIG_OF_GPIO tc3589x_gpio->chip.of_node = np; -#endif /* Bring the GPIO module out of reset */ ret = tc3589x_set_bits(tc3589x, TC3589x_RSTCTRL, diff --git a/drivers/input/keyboard/tc3589x-keypad.c b/drivers/input/keyboard/tc3589x-keypad.c index 0ccc7de9b59d..08e62e6aeb1b 100644 --- a/drivers/input/keyboard/tc3589x-keypad.c +++ b/drivers/input/keyboard/tc3589x-keypad.c @@ -318,7 +318,6 @@ static void tc3589x_keypad_close(struct input_dev *input) tc3589x_keypad_disable(keypad); } -#ifdef CONFIG_OF static const struct tc3589x_keypad_platform_data * tc3589x_keypad_of_probe(struct device *dev) { @@ -368,14 +367,6 @@ tc3589x_keypad_of_probe(struct device *dev) return plat; } -#else -static inline const struct tc3589x_keypad_platform_data * -tc3589x_keypad_of_probe(struct device *dev) -{ - return ERR_PTR(-ENODEV); -} -#endif - static int tc3589x_keypad_probe(struct platform_device *pdev) { diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig index 38356e39adba..476e63745742 100644 --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig @@ -1210,6 +1210,7 @@ config MFD_TIMBERDALE config MFD_TC3589X bool "Toshiba TC35892 and variants" depends on I2C=y + depends on OF select MFD_CORE help Support for the Toshiba TC35892 and variants I/O Expander. diff --git a/drivers/mfd/tc3589x.c b/drivers/mfd/tc3589x.c index aacb3720065c..cf356395c9e9 100644 --- a/drivers/mfd/tc3589x.c +++ b/drivers/mfd/tc3589x.c @@ -318,7 +318,6 @@ static int tc3589x_device_init(struct tc3589x *tc3589x) return ret; } -#ifdef CONFIG_OF static const struct of_device_id tc3589x_match[] = { /* Legacy compatible string */ { .compatible = "tc3589x", .data = (void *) TC3589X_UNKNOWN }, @@ -359,14 +358,6 @@ tc3589x_of_probe(struct device *dev, enum tc3589x_version *version) return pdata; } -#else -static inline struct tc3589x_platform_data * -tc3589x_of_probe(struct device *dev, enum tc3589x_version *version) -{ - dev_err(dev, "no device tree support\n"); - return ERR_PTR(-ENODEV); -} -#endif static int tc3589x_probe(struct i2c_client *i2c, const struct i2c_device_id *id)