Linux Documentation
 help / color / mirror / Atom feed
* [PATCH 0/5] hwmon: (pmbus/core) support write protected pmbus regulators
@ 2024-09-20 16:47 Jerome Brunet
  2024-09-20 16:47 ` [PATCH 1/5] regulator: core: add callback to perform runtime init Jerome Brunet
                   ` (4 more replies)
  0 siblings, 5 replies; 18+ messages in thread
From: Jerome Brunet @ 2024-09-20 16:47 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Jean Delvare, Guenter Roeck,
	Jonathan Corbet
  Cc: linux-kernel, linux-hwmon, linux-doc, Jerome Brunet

Some PMBus chips may boot in write protected mode by default. If the PMBus
chip is protected, it essentially becomes a read-only chip. Writing
protected register will be ignored by the chips and a communication fault
raised.

PMBus chips may also provide regulators, but protected chip are not
properly supported, since write are performed regardless of the protection.

This patchset adds callback in the regulator framework for drivers to
perform runtime init, such as checking the write protection status and
adjust the regulator constraints accordingly.

PMBus then make use of the added callback to adjust the validity of the
ops. In the future, PMBus could even use this callback to adjust the
constraints based on the supported registers.

Last, a module parameter is added to allow to set or clear the pmbus write
protection if necessary. These are 2 simple mode, more could be added
later.

The patchset targets 2 different subsystems. Please let me know if you
prefer a respin with 2 patchsets, one for each subsystem.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
Jerome Brunet (5):
      regulator: core: add callback to perform runtime init
      regulator: core: remove machine init callback from config
      hwmon: (pmbus/core) allow drivers to override WRITE_PROTECT
      hwmon: (pmbus/core) improve handling of write protected regulators
      hwmon: (pmbus/core) add wp module param

 Documentation/admin-guide/kernel-parameters.txt |  4 ++
 drivers/hwmon/pmbus/pmbus.h                     |  4 ++
 drivers/hwmon/pmbus/pmbus_core.c                | 83 ++++++++++++++++++++++---
 drivers/regulator/core.c                        | 13 ++--
 include/linux/pmbus.h                           | 14 +++++
 include/linux/regulator/driver.h                |  2 +
 include/linux/regulator/machine.h               |  3 +-
 7 files changed, 106 insertions(+), 17 deletions(-)
---
base-commit: cd87a98b53518e44cf3c1a7c1c07c869ce33bf83
change-id: 20240920-pmbus-wp-0281f54b7fe2

Best regards,
-- 
Jerome


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

end of thread, other threads:[~2024-10-08 12:44 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-20 16:47 [PATCH 0/5] hwmon: (pmbus/core) support write protected pmbus regulators Jerome Brunet
2024-09-20 16:47 ` [PATCH 1/5] regulator: core: add callback to perform runtime init Jerome Brunet
2024-09-20 16:47 ` [PATCH 2/5] regulator: core: remove machine init callback from config Jerome Brunet
2024-09-24  8:12   ` Mark Brown
2024-09-20 16:47 ` [PATCH 3/5] hwmon: (pmbus/core) allow drivers to override WRITE_PROTECT Jerome Brunet
2024-09-20 16:47 ` [PATCH 4/5] hwmon: (pmbus/core) improve handling of write protected regulators Jerome Brunet
2024-09-20 21:13   ` Guenter Roeck
2024-09-21 11:32     ` Jerome Brunet
2024-09-21 15:22       ` Guenter Roeck
2024-09-21 16:49         ` Jerome Brunet
2024-09-21 17:16           ` Guenter Roeck
2024-09-23 12:21           ` Mark Brown
2024-09-23 16:53             ` Jerome Brunet
2024-09-24  8:11               ` Mark Brown
2024-09-23 13:21   ` Mark Brown
2024-09-23 16:44     ` Guenter Roeck
2024-10-08 12:44       ` Jerome Brunet
2024-09-20 16:47 ` [PATCH 5/5] hwmon: (pmbus/core) add wp module param Jerome Brunet

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