Re: [PATCH 1/2] hwmon: Add Synaptics AS370 PVT sensor driver

From: Guenter Roeck
Date: Mon Aug 26 2019 - 23:51:52 EST


On 8/26/19 8:02 PM, Jisheng Zhang wrote:
Hi Guenter,

On Mon, 26 Aug 2019 06:44:34 -0700 Guenter Roeck wrote:



On 8/26/19 3:01 AM, Jisheng Zhang wrote:
Add a new driver for Synaptics AS370 PVT sensors. Currently, only
temperature is supported.

Signed-off-by: Jisheng Zhang <Jisheng.Zhang@xxxxxxxxxxxxx>
---
drivers/hwmon/Kconfig | 10 +++
drivers/hwmon/Makefile | 1 +
drivers/hwmon/as370-hwmon.c | 158 ++++++++++++++++++++++++++++++++++++
3 files changed, 169 insertions(+)
create mode 100644 drivers/hwmon/as370-hwmon.c

diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
index 650dd71f9724..d31610933faa 100644
--- a/drivers/hwmon/Kconfig
+++ b/drivers/hwmon/Kconfig
@@ -246,6 +246,16 @@ config SENSORS_ADT7475
This driver can also be built as a module. If so, the module
will be called adt7475.

+config SENSORS_AS370
+ tristate "Synaptics AS370 SoC hardware monitoring driver"

I think this needs "depends on HAS_IOMEM".

HWMON depends on HAS_IOMEM, so the dependency has been required
by the common HWMON, we don't need it here.


This is so wrong :-(. As if I2C or SPI based sensor chips would
require iomem. Oh well, no one complained in 12+ years, so I guess
we are "fine", at least for the time being.

Thanks for noticing.

Guenter