From patchwork Sun Sep 3 17:43:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 9936479 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 829836037D for ; Sun, 3 Sep 2017 17:50:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 75C3228565 for ; Sun, 3 Sep 2017 17:50:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6AA33285CA; Sun, 3 Sep 2017 17:50:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1951828565 for ; Sun, 3 Sep 2017 17:50:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=4b8KkBm1DU/8uSfKh3hZG7kGH4/ZJBBMenPJrNUjkho=; b=HMpdc9/AeTyeHcGCY/JIbbHnmw NYZ/5e81Pa26drBBwx/gz3SaNg6wyLCDHvwracDOjL6vPU1vuUsAM9kY7S7UgzGQBHQd2w9OeXF7S 3fmL5rQCF3Ddukgj2qDNFD5A9EgF2ByhJsNG3vv5IQ+rWjlRTvVpyJO5vBbrRTJIr6W8mtcVaXzzE honWzsbwPgU20YImpRUR/BDoIWK1ZQl7C6xNTlneAJWoTUI6Mw2jaqeSWhDW0UCer3cCXq+tssqIJ xelHrrAUFdsSPJTXF7PU+BKttTBMQ/wXALhyhrAP3eqUY9BZ5vHduZC+9KSJ86K1oGJEWPgU6Lgpo s4i7fcVw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1doZ2J-0003T2-JD; Sun, 03 Sep 2017 17:50:19 +0000 Received: from mail-oi0-x241.google.com ([2607:f8b0:4003:c06::241]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1doYwd-0007mk-90 for linux-arm-kernel@lists.infradead.org; Sun, 03 Sep 2017 17:44:34 +0000 Received: by mail-oi0-x241.google.com with SMTP id x184so3578224oia.3 for ; Sun, 03 Sep 2017 10:44:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=VfRJAuMcHFYXb7Vl0ArE6c+3aklN0Q5wiFc+TnIwbCQ=; b=Ov4BeAwVRr/tH2hgacPGMkYkmxkLBy5wPyTsGFjstQWI4+eS1RscwsTnvc6gBHKTj0 XAmV3sTEtrs5whV23h64f2T76weA6JPNYnkP4hvgipqbiTiSCybFZCv+7N6h5FKK0J6w LXfETaZ+9maAjscI3wNEsfCxPBI5J0VzhI9AcrDMtympr5A+dC9gInbwmL8P5/ODy7yu aW8LezNZgGpNbzCxNxzTvOIJZst6fwmxv5sUrJglQ0C6mfaqRqLb7n946LgqeZ6oQory /R/Fymuyq8TloPMsipzGdUWN8sxP4UTXbhupomMvFxRLyrOfljkbjw7SOd46JkvWoxeu ll0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=VfRJAuMcHFYXb7Vl0ArE6c+3aklN0Q5wiFc+TnIwbCQ=; b=ehyeTThTJiLa+8hE5TLafQxKaw4QuybqM8RAuBjN8PWVfJEjmP2JJIGyCdjkVXh1UB SjaEiRzRzG3tFcN1yIcfa6r7/oNux2spPF2yDygVCaiIVgyr3pY6Z/K0S+lhT8CqQGVZ +YuzQzq3IXQDaBi4X0l/oMem7gjyFFeQoiNW7w+dviIM4LL/c91Cld3KM3rqRcyohVk2 hvIS3SnyigLDSCwa2+0prrGAt/dk8wF2OLKdngd8f4JMwNaYvvYdIcqy9uXTaLXjq5b6 xiF/RpJVBikeONRlPAr9/dw+DzVHyhbNf2qk5B1a+CUYU4s2WfJ6VrnbJ7Cn9+k6d4j6 3IaA== X-Gm-Message-State: AHPjjUitnKXUsQDpm72H2KGXo/MgKQC2hAjxZJDki2lrxhA38wr15tXa g5/elFgmXBCrmg== X-Google-Smtp-Source: ADKCNb7Gri/Y0Iy6PIerIJSi34l6hTwMmMy199b0WDbVqL6Ns0uEC05XHkjrw7uD+OVxBcQFSGa74A== X-Received: by 10.202.104.40 with SMTP id d40mr7055765oic.75.1504460645139; Sun, 03 Sep 2017 10:44:05 -0700 (PDT) Received: from bender.lan ([2001:470:d:73f:2009:4728:a05f:e0dd]) by smtp.gmail.com with ESMTPSA id o7sm5726215oia.44.2017.09.03.10.44.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 03 Sep 2017 10:44:04 -0700 (PDT) From: Florian Fainelli To: arm@kernel.org Subject: [PATCH v2 4/4] ARM: ep93xx: Add lm70 HWMON sensor to TS-72xx boards Date: Sun, 3 Sep 2017 10:43:47 -0700 Message-Id: <20170903174347.6148-5-f.fainelli@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170903174347.6148-1-f.fainelli@gmail.com> References: <20170903174347.6148-1-f.fainelli@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170903_104427_636464_AA79F989 X-CRM114-Status: GOOD ( 13.14 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: hsweeten@visionengravers.com, linus.walleij@linaro.org, Florian Fainelli , alexander.sverdlin@gmail.com, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: H Hartley Sweeten Register the TI TMP122 (lm70) temperature sensor driver for the TS-72xx boards. Originaly from Florian Fainelli. Updated to the new spi-ep93xx chip select method. Signed-off-by: H Hartley Sweeten Signed-off-by: Florian Fainelli Reviewed-by: Alexander Sverdlin --- arch/arm/mach-ep93xx/ts72xx.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/arch/arm/mach-ep93xx/ts72xx.c b/arch/arm/mach-ep93xx/ts72xx.c index 55ca3b375952..4b8fefbf62dd 100644 --- a/arch/arm/mach-ep93xx/ts72xx.c +++ b/arch/arm/mach-ep93xx/ts72xx.c @@ -18,7 +18,10 @@ #include #include #include +#include +#include +#include #include #include @@ -230,6 +233,27 @@ static struct platform_device ts73xx_fpga_device = { #endif +/************************************************************************* + * SPI Bus + *************************************************************************/ +static struct spi_board_info ts72xx_spi_devices[] __initdata = { + { + .modalias = "tmp122", + .max_speed_hz = 2 * 1000 * 1000, + .bus_num = 0, + .chip_select = 0, + }, +}; + +static int ts72xx_spi_chipselects[] __initdata = { + EP93XX_GPIO_LINE_F(2), /* DIO_17 */ +}; + +static struct ep93xx_spi_info ts72xx_spi_info __initdata = { + .chipselect = ts72xx_spi_chipselects, + .num_chipselect = ARRAY_SIZE(ts72xx_spi_chipselects), +}; + static void __init ts72xx_init_machine(void) { ep93xx_init_devices(); @@ -242,6 +266,8 @@ static void __init ts72xx_init_machine(void) if (board_is_ts7300()) platform_device_register(&ts73xx_fpga_device); #endif + ep93xx_register_spi(&ts72xx_spi_info, ts72xx_spi_devices, + ARRAY_SIZE(ts72xx_spi_devices)); } MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC")