mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/1] Enable fan monitoring support for Simatic IPC BX-59A
@ 2026-09-28 13:31 Benedikt Niedermayr
  2026-09-28 13:31 ` [PATCH v2 1/2] i2c: i2c-nct6126: add support for NCT6126D Super I/O Benedikt Niedermayr
  2026-09-28 13:31 ` [PATCH v2 2/2] platform/x86/siemens: simatic-ipc: add fan monitoring support for BX-59A Benedikt Niedermayr
  0 siblings, 2 replies; 4+ messages in thread
From: Benedikt Niedermayr @ 2026-09-28 13:31 UTC (permalink / raw)
  To: andi.shyti, hansg, ilpo.jarvinen
  Cc: baocheng.su, tobias.schaffner, linux-kernel, linux-i2c,
	platform-driver-x86

Changes since v1:

- Refactored commit message of Patch 1/2 (Removed "TODO:")
- Use SZ_32 and include required header
- Use include for BIT() (linux/bits.h)
- Fix inconsistent spacing all over the code and use reverse xmas
  tree ordering
- Replaced BIT(0) with appropriate and meaningful define
- Check via IS_ALIGNED for smbus master base address
- Remove verbose info message (success path should be quiet)
- Use iopoll.h instead of own polling implementation
- Simplify struct nct6126_pdev pointer assignment (just use a simple
  single pointer)

Regarding the write access during initialization I would like to add what I
already answered in the original submission:

Regarding this specific point, I'm not entirely sure. I wasn't considering
that during implementation because I was leaning heavily on the
gpio-f7188x.c driver, which implements the GPIO part of this chip.
It performs the probing/init in a very similar way.
Since the driver **must be loaded explicitly** by the user or by other platform
detection mechanisms (like the simatic-ipc.c detection driver in this case),
I felt safe copying this logic.

I'm not sure if using DMI_MATCH tables would be the right choice here?

While it would restrict write access to only whitelisted platforms,
it wouldn't scale well as the number of supported platforms increases.

The request_muxed_region() call at least helps by locking against other drivers
already using this region.
The critical scenario would be if no other driver has gained access to the
region yet, but that would generally only happen if the user intentionally
loaded the driver.

Using ACPI-based detection seems impossible on this platform
(no proper ACPI table support for this chip).

IIRC, these Super I/O chips generally aren't suitable for probing via ACPI if
they need to be shared across different drivers, as ACPI detection would
exclusively occupy the I/O port region [1].

How should I proceed here?
And in case this is a no-go, what about the *gpio-f7188x.c* approach, which is
mainline?

[1] https://lore.kernel.org/linux-watchdog/df8d53db-0056-434d-953b-991025e6cd34@roeck-us.net/

Benedikt Niedermayr (2):
  i2c: i2c-nct6126: add support for NCT6126D Super I/O
  platform/x86/siemens: simatic-ipc: add fan monitoring support for
    BX-59A

 MAINTAINERS                                |   5 +
 drivers/i2c/busses/Kconfig                 |  11 +
 drivers/i2c/busses/Makefile                |   1 +
 drivers/i2c/busses/i2c-nct6126.c           | 441 +++++++++++++++++++++
 drivers/platform/x86/siemens/simatic-ipc.c |  14 +-
 5 files changed, 465 insertions(+), 7 deletions(-)
 create mode 100644 drivers/i2c/busses/i2c-nct6126.c

--
2.43.0

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

end of thread, other threads:[~2026-11-23 12:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-28 13:31 [PATCH v2 0/1] Enable fan monitoring support for Simatic IPC BX-59A Benedikt Niedermayr
2026-09-28 13:31 ` [PATCH v2 1/2] i2c: i2c-nct6126: add support for NCT6126D Super I/O Benedikt Niedermayr
2026-11-23 12:56   ` Niedermayr, Benedikt
2026-09-28 13:31 ` [PATCH v2 2/2] platform/x86/siemens: simatic-ipc: add fan monitoring support for BX-59A Benedikt Niedermayr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®