From patchwork Thu Aug 30 15:44:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Rossak X-Patchwork-Id: 10582151 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 54BEF14BD for ; Thu, 30 Aug 2018 15:48:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 436B52BDD0 for ; Thu, 30 Aug 2018 15:48:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3772E2BDF1; Thu, 30 Aug 2018 15:48:43 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 A1F1D2BDF6 for ; Thu, 30 Aug 2018 15:48:42 +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=IWtlvHsZnrLpI45/TLzjpetbVJMPVuDwFYzyhLSl2EE=; b=iWcwUy4wJL6fxIdF0WFdDD1eed Cnevw4xd2iWdX9iS5Rq+061bgm2UOY2pi9DJI+xIPD+BON/rvOk/vp5MdpLKTEn1fzIE/aYxWVsDF ClcEqZ/CEx5ljFRNgWoxnH/JX3o/ZZHKrFXpBw+Y5mX5+F3HfmpAZNqW3JfLuPMpFKmvJ7GdP4K2b 9fAWJOIFzg2dO+6selJALRQ6OdgXEPBPhZL0seK2xDofc3QH9/TUkmaqhPsfoVmIBy6RiUJlGAlwb wqls3xkih7iMgc32miGzUfQRuVKOyGuiKt1hKLTFupKA+EXo94j26wO2pk2Rc7+uMsOCS7a3jplgA UcxQKXFg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fvPBS-0002mE-87; Thu, 30 Aug 2018 15:48:34 +0000 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fvP8Y-0001as-3N for linux-arm-kernel@lists.infradead.org; Thu, 30 Aug 2018 15:45:37 +0000 Received: by mail-wr1-x443.google.com with SMTP id v16-v6so8505701wro.11 for ; Thu, 30 Aug 2018 08:45:29 -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=5XND9vHjfuJCOwJpFz7zMX/u/hpV4Qa0BGP58J/DvOk=; b=TNWOp0PAQHFrUDVCcHK0c4JtKL0NoAr5sk9Sj+OC0whe1rqb0aWUX2gGlSE0Vm+aMp j5Ti6Sc7JwEFNxgodD1mBSZDfxesQvlBe6cqTSBS8eHPj8NkJ4X6gqUUfC4et2Rih3SR TNVIpnaevlZtr2lMfAVo7sGUg/dvjSfUO3V73cTNsDLBctf2ET2j1nth9a05CdtkdlZ9 o+U/hl+6+3TM83z0q2vQXzMSen+DzFC10If2E2/1lGhCrZP9kSt4ZRiQc+6E2+3Z1nhL KnIXLIcBGl8+0l4QawJdXQeGcIiZFMz6B+Fj9e0HgsLXQ8ELyS0qruBhznyrSX/cTRpp ddKg== 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=5XND9vHjfuJCOwJpFz7zMX/u/hpV4Qa0BGP58J/DvOk=; b=QHDVqsjKzN4tlipIhs7+G3ZnMRUr+4z2VJ71imNFv9ejs+6gsv44P0aF8m7D/yFS7p MD2sbtT+xI0PgS84ZfnuCoMeoRDbCS/iuhXaj10y+qpNrYOeszKnd0v3BDJfPQ0Nxwbg wRqDH1FDDLJtpRGf7l7xe52TM1rTuG8kKm/Qfqg4MSFnvbuKIjgngOEBT+ad34OecCLK tIlc+XSK4SC5cpDB+++eSOHXNYL/0wINW2UnjL7EMI57LbchUo3Ej04FezykrAbv1e0D PcbjP0RG9ypBhIsbpHe6CAO5CZfNXLoPmIxixiFiZ+NyrEmxZuPIJJGgntSFJwIUIcRa vJdw== X-Gm-Message-State: APzg51CP8oItiGJDWf3pEksJsFbKrQI8VqI87MMQa0F82Bq3e1WXOUkF KrO0wwBTKd5GbqoMTKnmxqw= X-Google-Smtp-Source: ANB0VdbimhtaitKvqHvNaGjItKwbG+oI0Tg7BVULZDbnbRdQ/1/LwDiOKY96rI7o/z4NQ0cRTyM6xQ== X-Received: by 2002:adf:e648:: with SMTP id b8-v6mr8388682wrn.254.1535643928697; Thu, 30 Aug 2018 08:45:28 -0700 (PDT) Received: from debian-hp.wlan.uni-ulm.de (eduroam170-020.wlan.uni-ulm.de. [134.60.170.20]) by smtp.gmail.com with ESMTPSA id j20-v6sm1362759wmh.9.2018.08.30.08.45.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Aug 2018 08:45:28 -0700 (PDT) From: Philipp Rossak To: lee.jones@linaro.org, robh+dt@kernel.org, mark.rutland@arm.com, maxime.ripard@bootlin.com, wens@csie.org, linux@armlinux.org.uk, jic23@kernel.org, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, eugen.hristev@microchip.com, rdunlap@infradead.org, vilhelm.gray@gmail.com, clabbe.montjoie@gmail.com, quentin.schulz@bootlin.com, geert+renesas@glider.be, lukas@wunner.de, icenowy@aosc.io, arnd@arndb.de, broonie@kernel.org, arnaud.pouliquen@st.com Subject: [PATCH v3 09/30] iio: adc: Threat A33 as thermal sensor and remove non thermal sun4i channel Date: Thu, 30 Aug 2018 17:44:57 +0200 Message-Id: <20180830154518.29507-10-embed3d@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180830154518.29507-1-embed3d@gmail.com> References: <20180830154518.29507-1-embed3d@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180830_084534_174425_88848D45 X-CRM114-Status: GOOD ( 12.63 ) 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: linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-sunxi@googlegroups.com, linux-kernel@vger.kernel.org, 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 We want to use this driver mostly as thermal sensor, that still supports the adc for the older chips, thus we threat the A33 as thermal sensor. We also remove the adc channel without thermal support. Signed-off-by: Philipp Rossak --- drivers/iio/adc/sun4i-gpadc-iio.c | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/drivers/iio/adc/sun4i-gpadc-iio.c b/drivers/iio/adc/sun4i-gpadc-iio.c index ab474ce86fb6..658a7e3e3370 100644 --- a/drivers/iio/adc/sun4i-gpadc-iio.c +++ b/drivers/iio/adc/sun4i-gpadc-iio.c @@ -123,23 +123,6 @@ static const struct iio_chan_spec sun4i_gpadc_channels[] = { }, }; -static const struct iio_chan_spec sun4i_gpadc_channels_no_temp[] = { - SUN4I_GPADC_ADC_CHANNEL(0, "adc_chan0"), - SUN4I_GPADC_ADC_CHANNEL(1, "adc_chan1"), - SUN4I_GPADC_ADC_CHANNEL(2, "adc_chan2"), - SUN4I_GPADC_ADC_CHANNEL(3, "adc_chan3"), -}; - -static const struct iio_chan_spec sun8i_a33_gpadc_channels[] = { - { - .type = IIO_TEMP, - .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | - BIT(IIO_CHAN_INFO_SCALE) | - BIT(IIO_CHAN_INFO_OFFSET), - .datasheet_name = "temp_adc", - }, -}; - static const struct regmap_config sun4i_gpadc_regmap_config = { .reg_bits = 32, .val_bits = 32, @@ -444,8 +427,6 @@ static int sun4i_gpadc_probe_dt(struct platform_device *pdev, return -ENODEV; info->no_irq = true; - indio_dev->num_channels = ARRAY_SIZE(sun8i_a33_gpadc_channels); - indio_dev->channels = sun8i_a33_gpadc_channels; mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); base = devm_ioremap_resource(&pdev->dev, mem);