Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

hwmon: (twl4030-madc) drop driver

This driver is no longer needed:

* It has no mainline users
* It has no DT support and OMAP is DT only
* iio-hwmon can be used for madc, which also works with DT

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>

authored by

Sebastian Reichel and committed by
Guenter Roeck
09d9d827 39c382a3

-129
-10
drivers/hwmon/Kconfig
··· 1652 1652 This driver can also be built as a module. If so, the module 1653 1653 will be called tmp421. 1654 1654 1655 - config SENSORS_TWL4030_MADC 1656 - tristate "Texas Instruments TWL4030 MADC Hwmon" 1657 - depends on TWL4030_MADC 1658 - help 1659 - If you say yes here you get hwmon support for triton 1660 - TWL4030-MADC. 1661 - 1662 - This driver can also be built as a module. If so it will be called 1663 - twl4030-madc-hwmon. 1664 - 1665 1655 config SENSORS_VEXPRESS 1666 1656 tristate "Versatile Express" 1667 1657 depends on VEXPRESS_CONFIG
-1
drivers/hwmon/Makefile
··· 158 158 obj-$(CONFIG_SENSORS_TMP108) += tmp108.o 159 159 obj-$(CONFIG_SENSORS_TMP401) += tmp401.o 160 160 obj-$(CONFIG_SENSORS_TMP421) += tmp421.o 161 - obj-$(CONFIG_SENSORS_TWL4030_MADC)+= twl4030-madc-hwmon.o 162 161 obj-$(CONFIG_SENSORS_VEXPRESS) += vexpress-hwmon.o 163 162 obj-$(CONFIG_SENSORS_VIA_CPUTEMP)+= via-cputemp.o 164 163 obj-$(CONFIG_SENSORS_VIA686A) += via686a.o
-118
drivers/hwmon/twl4030-madc-hwmon.c
··· 1 - /* 2 - * 3 - * TWL4030 MADC Hwmon driver-This driver monitors the real time 4 - * conversion of analog signals like battery temperature, 5 - * battery type, battery level etc. User can ask for the conversion on a 6 - * particular channel using the sysfs nodes. 7 - * 8 - * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ 9 - * J Keerthy <j-keerthy@ti.com> 10 - * 11 - * This program is free software; you can redistribute it and/or 12 - * modify it under the terms of the GNU General Public License 13 - * version 2 as published by the Free Software Foundation. 14 - * 15 - * This program is distributed in the hope that it will be useful, but 16 - * WITHOUT ANY WARRANTY; without even the implied warranty of 17 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18 - * General Public License for more details. 19 - * 20 - * You should have received a copy of the GNU General Public License 21 - * along with this program; if not, write to the Free Software 22 - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 23 - * 02110-1301 USA 24 - * 25 - */ 26 - #include <linux/init.h> 27 - #include <linux/module.h> 28 - #include <linux/kernel.h> 29 - #include <linux/i2c/twl.h> 30 - #include <linux/device.h> 31 - #include <linux/platform_device.h> 32 - #include <linux/i2c/twl4030-madc.h> 33 - #include <linux/hwmon.h> 34 - #include <linux/hwmon-sysfs.h> 35 - #include <linux/stddef.h> 36 - #include <linux/sysfs.h> 37 - #include <linux/err.h> 38 - #include <linux/types.h> 39 - 40 - /* 41 - * sysfs hook function 42 - */ 43 - static ssize_t madc_read(struct device *dev, 44 - struct device_attribute *devattr, char *buf) 45 - { 46 - struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); 47 - struct twl4030_madc_request req = { 48 - .channels = 1 << attr->index, 49 - .method = TWL4030_MADC_SW2, 50 - .type = TWL4030_MADC_WAIT, 51 - }; 52 - long val; 53 - 54 - val = twl4030_madc_conversion(&req); 55 - if (val < 0) 56 - return val; 57 - 58 - return sprintf(buf, "%d\n", req.rbuf[attr->index]); 59 - } 60 - 61 - /* sysfs nodes to read individual channels from user side */ 62 - static SENSOR_DEVICE_ATTR(in0_input, S_IRUGO, madc_read, NULL, 0); 63 - static SENSOR_DEVICE_ATTR(temp1_input, S_IRUGO, madc_read, NULL, 1); 64 - static SENSOR_DEVICE_ATTR(in2_input, S_IRUGO, madc_read, NULL, 2); 65 - static SENSOR_DEVICE_ATTR(in3_input, S_IRUGO, madc_read, NULL, 3); 66 - static SENSOR_DEVICE_ATTR(in4_input, S_IRUGO, madc_read, NULL, 4); 67 - static SENSOR_DEVICE_ATTR(in5_input, S_IRUGO, madc_read, NULL, 5); 68 - static SENSOR_DEVICE_ATTR(in6_input, S_IRUGO, madc_read, NULL, 6); 69 - static SENSOR_DEVICE_ATTR(in7_input, S_IRUGO, madc_read, NULL, 7); 70 - static SENSOR_DEVICE_ATTR(in8_input, S_IRUGO, madc_read, NULL, 8); 71 - static SENSOR_DEVICE_ATTR(in9_input, S_IRUGO, madc_read, NULL, 9); 72 - static SENSOR_DEVICE_ATTR(curr10_input, S_IRUGO, madc_read, NULL, 10); 73 - static SENSOR_DEVICE_ATTR(in11_input, S_IRUGO, madc_read, NULL, 11); 74 - static SENSOR_DEVICE_ATTR(in12_input, S_IRUGO, madc_read, NULL, 12); 75 - static SENSOR_DEVICE_ATTR(in15_input, S_IRUGO, madc_read, NULL, 15); 76 - 77 - static struct attribute *twl4030_madc_attrs[] = { 78 - &sensor_dev_attr_in0_input.dev_attr.attr, 79 - &sensor_dev_attr_temp1_input.dev_attr.attr, 80 - &sensor_dev_attr_in2_input.dev_attr.attr, 81 - &sensor_dev_attr_in3_input.dev_attr.attr, 82 - &sensor_dev_attr_in4_input.dev_attr.attr, 83 - &sensor_dev_attr_in5_input.dev_attr.attr, 84 - &sensor_dev_attr_in6_input.dev_attr.attr, 85 - &sensor_dev_attr_in7_input.dev_attr.attr, 86 - &sensor_dev_attr_in8_input.dev_attr.attr, 87 - &sensor_dev_attr_in9_input.dev_attr.attr, 88 - &sensor_dev_attr_curr10_input.dev_attr.attr, 89 - &sensor_dev_attr_in11_input.dev_attr.attr, 90 - &sensor_dev_attr_in12_input.dev_attr.attr, 91 - &sensor_dev_attr_in15_input.dev_attr.attr, 92 - NULL 93 - }; 94 - ATTRIBUTE_GROUPS(twl4030_madc); 95 - 96 - static int twl4030_madc_hwmon_probe(struct platform_device *pdev) 97 - { 98 - struct device *hwmon; 99 - 100 - hwmon = devm_hwmon_device_register_with_groups(&pdev->dev, 101 - "twl4030_madc", NULL, 102 - twl4030_madc_groups); 103 - return PTR_ERR_OR_ZERO(hwmon); 104 - } 105 - 106 - static struct platform_driver twl4030_madc_hwmon_driver = { 107 - .probe = twl4030_madc_hwmon_probe, 108 - .driver = { 109 - .name = "twl4030_madc_hwmon", 110 - }, 111 - }; 112 - 113 - module_platform_driver(twl4030_madc_hwmon_driver); 114 - 115 - MODULE_DESCRIPTION("TWL4030 ADC Hwmon driver"); 116 - MODULE_LICENSE("GPL"); 117 - MODULE_AUTHOR("J Keerthy"); 118 - MODULE_ALIAS("platform:twl4030_madc_hwmon");