Commit d349626b authored by Guenter Roeck's avatar Guenter Roeck
Browse files

hwmon: (abx500) Decomission abx500 driver



This deletes the ABx500 hwmon driver, the only supported
variant being the AB8500.

This driver has been replaced by generic frameworks. By
inspecting the abx500 sysfs files we see that it contains
things such as temp1_max, temp1_max_alarm, temp1_max_hyst,
temp1_max_hyst_alarm, temp1_min, temp1_min_alarm.

It becomes obvious that the abx500.c is a reimplementation
of thermal zones. This is not very strange as the generic
thermal zones were not invented when this driver was merged
so people were rolling their own.

The ab8500.c driver contains conversion tables for handling
a thermistor on ADC channels AUX1 and AUX2.

I managed to replace the functionality of the driver with:

- Activation of the ntc_thermistor.c driver,
  CONFIG_SENSORS_NTC_THERMISTOR
- Activation of thermal zones, CONFIG_THERMAL
- In the device tree, connecting the NTC driver to the
  processed IIO channels from the AB8500 GPADC ADC forming
  two instances of NTC sensors.
- Connecting the two NTC sensors to a "chassis" thermal zone
  in the device tree and setting that to hit the CPU frequency
  at 50 degrees celsius and do a critical shutdown at 70
  degrees celsius, deploying a policy using the sensors.

After talking to the original authors we concluded that the
driver was never properly parameterized in production so
what we now have in the device tree is already puts the
thermistors to better use than what the hwmon driver did.

The two remaining channels for two battery temperatures is
already handled in the charging algorithms but can be
optionally extended to thermal zones as well if we want
these to trigger critical shutdown for the platform.

Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20201221125521.768082-1-linus.walleij@linaro.org


[groeck: Removed documentation and fixed up Makefile, Kconfig]
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent 5707c8db
Loading
Loading
Loading
Loading

Documentation/hwmon/ab8500.rst

deleted100644 → 0
+0 −26
Original line number Diff line number Diff line
Kernel driver ab8500
====================

Supported chips:

  * ST-Ericsson AB8500

    Prefix: 'ab8500'

    Addresses scanned: -

    Datasheet: http://www.stericsson.com/developers/documentation.jsp

Authors:
	- Martin Persson <martin.persson@stericsson.com>
	- Hongbo Zhang <hongbo.zhang@linaro.org>

Description
-----------

See also Documentation/hwmon/abx500.rst. This is the ST-Ericsson AB8500 specific
driver.

Currently only the AB8500 internal sensor and one external sensor for battery
temperature are monitored. Other GPADC channels can also be monitored if needed
in future.

Documentation/hwmon/abx500.rst

deleted100644 → 0
+0 −32
Original line number Diff line number Diff line
Kernel driver abx500
====================

Supported chips:

  * ST-Ericsson ABx500 series

    Prefix: 'abx500'

    Addresses scanned: -

    Datasheet: http://www.stericsson.com/developers/documentation.jsp

Authors:
	Martin Persson <martin.persson@stericsson.com>
	Hongbo Zhang <hongbo.zhang@linaro.org>

Description
-----------

Every ST-Ericsson Ux500 SOC consists of both ABx500 and DBx500 physically,
this is kernel hwmon driver for ABx500.

There are some GPADCs inside ABx500 which are designed for connecting to
thermal sensors, and there is also a thermal sensor inside ABx500 too, which
raises interrupt when critical temperature reached.

This abx500 is a common layer which can monitor all of the sensors, every
specific abx500 chip has its special configurations in its own file, e.g. some
sensors can be configured invisible if they are not available on that chip, and
the corresponding gpadc_addr should be set to 0, thus this sensor won't be
polled.
+0 −2
Original line number Diff line number Diff line
@@ -18,10 +18,8 @@ Hardware Monitoring Kernel Drivers
.. toctree::
   :maxdepth: 1

   ab8500
   abituguru
   abituguru3
   abx500
   acpi_power_meter
   ad7314
   adc128d818
+0 −13
Original line number Diff line number Diff line
@@ -38,19 +38,6 @@ config HWMON_DEBUG_CHIP

comment "Native drivers"

config SENSORS_AB8500
	tristate "AB8500 thermal monitoring"
	depends on AB8500_GPADC && AB8500_BM && (IIO = y)
	default n
	help
	  If you say yes here you get support for the thermal sensor part
	  of the AB8500 chip. The driver includes thermal management for
	  AB8500 die and two GPADC channels. The GPADC channel are preferably
	  used to access sensors outside the AB8500 chip.

	  This driver can also be built as a module. If so, the module
	  will be called abx500-temp.

config SENSORS_ABITUGURU
	tristate "Abit uGuru (rev 1 & 2)"
	depends on X86 && DMI
+0 −1
Original line number Diff line number Diff line
@@ -21,7 +21,6 @@ obj-$(CONFIG_SENSORS_W83795) += w83795.o
obj-$(CONFIG_SENSORS_W83781D)	+= w83781d.o
obj-$(CONFIG_SENSORS_W83791D)	+= w83791d.o

obj-$(CONFIG_SENSORS_AB8500)	+= abx500.o ab8500.o
obj-$(CONFIG_SENSORS_ABITUGURU)	+= abituguru.o
obj-$(CONFIG_SENSORS_ABITUGURU3)+= abituguru3.o
obj-$(CONFIG_SENSORS_AD7314)	+= ad7314.o
Loading