devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 0/4] hwmon: add lan9668 driver
@ 2022-03-26 19:23 Michael Walle
  2022-03-26 19:23 ` [PATCH v1 1/4] lib: add generic polynomial calculation Michael Walle
                   ` (3 more replies)
  0 siblings, 4 replies; 16+ messages in thread
From: Michael Walle @ 2022-03-26 19:23 UTC (permalink / raw)
  To: Jean Delvare, Guenter Roeck, Rob Herring, Krzysztof Kozlowski
  Cc: linux-hwmon, devicetree, linux-kernel, Michael Walle

Add a temperature and fan controller driver for the Microchip LAN9668 SoC.

The temperature sensor uses a polynomial to calculate the actual
temperature. Fortunately, the bt1-pvt already has such a calculation.
It seems that the LAN9668 uses the same Analog Bits sensor as the
BT1 although with a different characteristic. To be able to reuse the
code move it to lib/ as it seems pretty generic to calculate any
polynomial using integers only, which might also be used by other parts
of the kernel. Another option might be to move the code to hwmon-poly.c,
I'm not sure. Thoughts?

I also plan on submitting patches to add temperature sensor support for
the GPYxxx and LAN8814 PHYs which also use polynomial_calc().

The last two patches adds the actual driver and the dt-binding for it.

Michael Walle (4):
  lib: add generic polynomial calculation
  hwmon: (bt1-pvt) use generic polynomial functions
  dt-bindings: hwmon: add Microchip LAN966x bindings
  hwmon: add driver for the Microchip LAN966x SoC

 .../bindings/hwmon/microchip,lan966x.yaml     |  53 +++
 drivers/hwmon/Kconfig                         |  12 +
 drivers/hwmon/Makefile                        |   1 +
 drivers/hwmon/bt1-pvt.c                       |  50 +--
 drivers/hwmon/lan966x-hwmon.c                 | 384 ++++++++++++++++++
 include/linux/polynomial.h                    |  35 ++
 lib/Kconfig                                   |   3 +
 lib/Makefile                                  |   2 +
 lib/polynomial.c                              |  95 +++++
 9 files changed, 598 insertions(+), 37 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/hwmon/microchip,lan966x.yaml
 create mode 100644 drivers/hwmon/lan966x-hwmon.c
 create mode 100644 include/linux/polynomial.h
 create mode 100644 lib/polynomial.c

-- 
2.30.2


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2022-03-28 16:38 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-26 19:23 [PATCH v1 0/4] hwmon: add lan9668 driver Michael Walle
2022-03-26 19:23 ` [PATCH v1 1/4] lib: add generic polynomial calculation Michael Walle
2022-03-27  1:21   ` Guenter Roeck
2022-03-26 19:23 ` [PATCH v1 2/4] hwmon: (bt1-pvt) use generic polynomial functions Michael Walle
2022-03-27  0:49   ` kernel test robot
2022-03-27  1:10   ` kernel test robot
2022-03-27  1:22   ` Guenter Roeck
2022-03-26 19:23 ` [PATCH v1 3/4] dt-bindings: hwmon: add Microchip LAN966x bindings Michael Walle
2022-03-27 11:17   ` Krzysztof Kozlowski
2022-03-26 19:23 ` [PATCH v1 4/4] hwmon: add driver for the Microchip LAN966x SoC Michael Walle
2022-03-27  1:34   ` Guenter Roeck
2022-03-27 14:18     ` Michael Walle
2022-03-27 18:22       ` Guenter Roeck
2022-03-28 11:28         ` Michael Walle
2022-03-28 16:37           ` Guenter Roeck
2022-03-27  3:13   ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).