Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp11375938ybi; Thu, 25 Jul 2019 15:17:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqz9u+KeKCez+S8HJ2Bgya24D2Zbz7ksyhDn7NWfSIX9hpp61Omuoo2ObTak63YAV+6AjabI X-Received: by 2002:a63:c751:: with SMTP id v17mr73068367pgg.264.1564093068506; Thu, 25 Jul 2019 15:17:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564093068; cv=none; d=google.com; s=arc-20160816; b=f/UmaMQVOSMsnOuPvLz5bQTBNr5XC1l1d4L0o8IznAJYpM3XiIi9PuiaU1O1XXW++y zcSNePLTRH9T/50tOOrzlXG/5fZcN4M7wmFReUJNlxXY1SpRnpt3Hy6HczCdS0iCD00b xFoHmUfu1LuRIzAuNrnHaP/C1ETX22HO5SCkZ7K+T+oOggAbdOCM6Gx5zEBs7B6jOzPu kpTZNXVH+eMM7+BURs5xaXwfx8hT0yOsEFazteIDnSIjcmTYfIE033IXGWHq5BMXJ+gi rmFZYjuYI3jZ8xrpoUoR0/TYNJqUj7Y9ontyA/wifpC3HMTR+cUKoiFIQQiJn6hZA57Q zwBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=f+t6jbc1e2fwX6vAlkrzuMXuLiicaUEhNVvQHHY1xA0=; b=do+Nh7YRpzCVKEpsknV+PRigVZlNgpImsFGFvWk8UIjOUsDBDtIqJ6l9BZ+lbI0RYG jaIebaUmU5RKZ4owPmVNX/3fsKolMo7IS+GzYDv9rcSbTfuoNN7jTBZmvq6PGu0O3sX/ oMuAPqPuR9FN+fNEerDgRu0yoxzHQs499pWnX5jgLeNJABxwgBfZwc03uywUUJYHws3U saaOg+QdpV+93p2HITKhQXgpJs+J1sL6Pj/cKxyzelncNZ+mHF0XBEtPEzlOWD+SiWn7 LE0jZALuCF7/G/e/2RRHAcERSWsCRDEm0qAZ8z59IwgJ4BNmiZWBvBY3croKfX3sSzYt qiPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b="tBxt6As/"; 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 188si19421269pgd.404.2019.07.25.15.17.29; Thu, 25 Jul 2019 15:17:48 -0700 (PDT) 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=@gmail.com header.s=20161025 header.b="tBxt6As/"; 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 S1726803AbfGYWQ4 (ORCPT + 99 others); Thu, 25 Jul 2019 18:16:56 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:32894 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726747AbfGYWQz (ORCPT ); Thu, 25 Jul 2019 18:16:55 -0400 Received: by mail-pl1-f193.google.com with SMTP id c14so23866603plo.0; Thu, 25 Jul 2019 15:16:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=f+t6jbc1e2fwX6vAlkrzuMXuLiicaUEhNVvQHHY1xA0=; b=tBxt6As/HYsgjOazvloK9O0Mjop6Bn56B5HpXHSoqdI5WVRldDkFUpbbjL4TopoZd2 J7vYPmE/m4aVBfZE48gzykZH2pLoAk/ENWS8OsjZL5gyAcIWf8nMAkci8B/raK29BWFO KIDyd+zcF3jL6kQ4DqoI8CLwuCWFnpLEyoQ+wSyHr2322Q940asEEMMtPIRQWBf3NA5t vy386+OJGM44cNKMiWm5wKAzU3beuPa1wWQ16i4RAA3464n6OjLqHnJ9EooueRxK3ARL j24WiDLZH/M2wWET5e+S7Sl2S5dFOBOX6VnaGI6RVLNjfHZelJxZkuRmG+E0Wx/w36dm yf1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=f+t6jbc1e2fwX6vAlkrzuMXuLiicaUEhNVvQHHY1xA0=; b=GSKpG3VQB19uuImb+2Zi15kMU6y32OUMxOrQds0F4V3QBfVzgOFozpCOK76pwpo6DU 0Z6e63E3uvZRPGp0DYsaQiaJ7LoFfC5kVGjHgJSep77SQO200m2YFQEQ+ug3P4RIn8xa NBpdHmbkNaBphXArXjRx8iHB/QdSmUmyKx5lguREmcZfPNc6AAZOBdC/+s4fDUprObQt GxXVmO9CSeHIRmqEpIBJFZqNh/fwIa+lF2k4+FucKkdIHcATfKBsOJyNOk/uwXM9IN5l tcVGI9NbFMN7+dW24rq8LvZyk0YV/l1igUMyKM4kaDbeuyRercS656o8pBCxp7OY5N6T 7+ZA== X-Gm-Message-State: APjAAAWQJSKFDuUD5GC9kDzUCRu/wVUZeKx7Y2YhcrSn5foum/OhVrkd WNjsWP5R5HOqR3mq6i42I2k= X-Received: by 2002:a17:902:d917:: with SMTP id c23mr93058293plz.248.1564093014781; Thu, 25 Jul 2019 15:16:54 -0700 (PDT) Received: from localhost ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id g8sm49495815pgk.1.2019.07.25.15.16.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Jul 2019 15:16:53 -0700 (PDT) Date: Thu, 25 Jul 2019 15:16:52 -0700 From: Guenter Roeck To: Paul Cercueil Cc: Ralf Baechle , Paul Burton , James Hogan , Rob Herring , Mark Rutland , Vinod Koul , Jean Delvare , Lee Jones , Miquel Raynal , Richard Weinberger , Sebastian Reichel , Bartlomiej Zolnierkiewicz , Liam Girdwood , Mark Brown , od@zcrc.me, devicetree@vger.kernel.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org, linux-hwmon@vger.kernel.org, linux-mtd@lists.infradead.org, linux-pm@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, alsa-devel@alsa-project.org, Artur Rojek Subject: Re: [PATCH 09/11] hwmon: Drop obsolete JZ4740 driver Message-ID: <20190725221652.GA31672@roeck-us.net> References: <20190725220215.460-1-paul@crapouillou.net> <20190725220215.460-10-paul@crapouillou.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190725220215.460-10-paul@crapouillou.net> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 25, 2019 at 06:02:13PM -0400, Paul Cercueil wrote: > The JZ4740 boards now use the iio-hwmon driver. > > Signed-off-by: Paul Cercueil > Tested-by: Artur Rojek Acked-by: Guenter Roeck > --- > drivers/hwmon/Kconfig | 10 --- > drivers/hwmon/Makefile | 1 - > drivers/hwmon/jz4740-hwmon.c | 135 ----------------------------------- > 3 files changed, 146 deletions(-) > delete mode 100644 drivers/hwmon/jz4740-hwmon.c > > diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig > index 650dd71f9724..2199ac1d0ba7 100644 > --- a/drivers/hwmon/Kconfig > +++ b/drivers/hwmon/Kconfig > @@ -660,16 +660,6 @@ config SENSORS_IT87 > This driver can also be built as a module. If so, the module > will be called it87. > > -config SENSORS_JZ4740 > - tristate "Ingenic JZ4740 SoC ADC driver" > - depends on MACH_JZ4740 && MFD_JZ4740_ADC > - help > - If you say yes here you get support for reading adc values from the ADCIN > - pin on Ingenic JZ4740 SoC based boards. > - > - This driver can also be built as a module. If so, the module will be > - called jz4740-hwmon. > - > config SENSORS_JC42 > tristate "JEDEC JC42.4 compliant memory module temperature sensors" > depends on I2C > diff --git a/drivers/hwmon/Makefile b/drivers/hwmon/Makefile > index 8db472ea04f0..1e82e912a5c4 100644 > --- a/drivers/hwmon/Makefile > +++ b/drivers/hwmon/Makefile > @@ -85,7 +85,6 @@ obj-$(CONFIG_SENSORS_INA2XX) += ina2xx.o > obj-$(CONFIG_SENSORS_INA3221) += ina3221.o > obj-$(CONFIG_SENSORS_IT87) += it87.o > obj-$(CONFIG_SENSORS_JC42) += jc42.o > -obj-$(CONFIG_SENSORS_JZ4740) += jz4740-hwmon.o > obj-$(CONFIG_SENSORS_K8TEMP) += k8temp.o > obj-$(CONFIG_SENSORS_K10TEMP) += k10temp.o > obj-$(CONFIG_SENSORS_LINEAGE) += lineage-pem.o > diff --git a/drivers/hwmon/jz4740-hwmon.c b/drivers/hwmon/jz4740-hwmon.c > deleted file mode 100644 > index bec5befd1d8b..000000000000 > --- a/drivers/hwmon/jz4740-hwmon.c > +++ /dev/null > @@ -1,135 +0,0 @@ > -// SPDX-License-Identifier: GPL-2.0-or-later > -/* > - * Copyright (C) 2009-2010, Lars-Peter Clausen > - * JZ4740 SoC HWMON driver > - */ > - > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > - > -#include > -#include > - > -#include > - > -struct jz4740_hwmon { > - void __iomem *base; > - int irq; > - const struct mfd_cell *cell; > - struct platform_device *pdev; > - struct completion read_completion; > - struct mutex lock; > -}; > - > -static irqreturn_t jz4740_hwmon_irq(int irq, void *data) > -{ > - struct jz4740_hwmon *hwmon = data; > - > - complete(&hwmon->read_completion); > - return IRQ_HANDLED; > -} > - > -static ssize_t in0_input_show(struct device *dev, > - struct device_attribute *dev_attr, char *buf) > -{ > - struct jz4740_hwmon *hwmon = dev_get_drvdata(dev); > - struct platform_device *pdev = hwmon->pdev; > - struct completion *completion = &hwmon->read_completion; > - long t; > - unsigned long val; > - int ret; > - > - mutex_lock(&hwmon->lock); > - > - reinit_completion(completion); > - > - enable_irq(hwmon->irq); > - hwmon->cell->enable(pdev); > - > - t = wait_for_completion_interruptible_timeout(completion, HZ); > - > - if (t > 0) { > - val = readw(hwmon->base) & 0xfff; > - val = (val * 3300) >> 12; > - ret = sprintf(buf, "%lu\n", val); > - } else { > - ret = t ? t : -ETIMEDOUT; > - } > - > - hwmon->cell->disable(pdev); > - disable_irq(hwmon->irq); > - > - mutex_unlock(&hwmon->lock); > - > - return ret; > -} > - > -static DEVICE_ATTR_RO(in0_input); > - > -static struct attribute *jz4740_attrs[] = { > - &dev_attr_in0_input.attr, > - NULL > -}; > - > -ATTRIBUTE_GROUPS(jz4740); > - > -static int jz4740_hwmon_probe(struct platform_device *pdev) > -{ > - int ret; > - struct device *dev = &pdev->dev; > - struct jz4740_hwmon *hwmon; > - struct device *hwmon_dev; > - > - hwmon = devm_kzalloc(dev, sizeof(*hwmon), GFP_KERNEL); > - if (!hwmon) > - return -ENOMEM; > - > - hwmon->cell = mfd_get_cell(pdev); > - > - hwmon->irq = platform_get_irq(pdev, 0); > - if (hwmon->irq < 0) { > - dev_err(&pdev->dev, "Failed to get platform irq: %d\n", > - hwmon->irq); > - return hwmon->irq; > - } > - > - hwmon->base = devm_platform_ioremap_resource(pdev, 0); > - if (IS_ERR(hwmon->base)) > - return PTR_ERR(hwmon->base); > - > - hwmon->pdev = pdev; > - init_completion(&hwmon->read_completion); > - mutex_init(&hwmon->lock); > - > - ret = devm_request_irq(dev, hwmon->irq, jz4740_hwmon_irq, 0, > - pdev->name, hwmon); > - if (ret) { > - dev_err(&pdev->dev, "Failed to request irq: %d\n", ret); > - return ret; > - } > - disable_irq(hwmon->irq); > - > - hwmon_dev = devm_hwmon_device_register_with_groups(dev, "jz4740", hwmon, > - jz4740_groups); > - return PTR_ERR_OR_ZERO(hwmon_dev); > -} > - > -static struct platform_driver jz4740_hwmon_driver = { > - .probe = jz4740_hwmon_probe, > - .driver = { > - .name = "jz4740-hwmon", > - }, > -}; > - > -module_platform_driver(jz4740_hwmon_driver); > - > -MODULE_DESCRIPTION("JZ4740 SoC HWMON driver"); > -MODULE_AUTHOR("Lars-Peter Clausen "); > -MODULE_LICENSE("GPL"); > -MODULE_ALIAS("platform:jz4740-hwmon"); > -- > 2.21.0.593.g511ec345e18 >