diff options
| author | Mark Brown <broonie@kernel.org> | 2024-05-06 10:05:06 +0900 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2024-05-06 10:05:06 +0900 |
| commit | 48b6faae69a432b76e453c73ff5210bf5affa936 (patch) | |
| tree | 4c1920e1cc5c748238c2763c13f043166fdd5963 /kernel/module | |
| parent | 38bcec0e7cbbd6566c12ae4f2b7a48bd50cd215c (diff) | |
| parent | d72fd5228c9f2136a3143daf5c7822140211883a (diff) | |
regulator: new API for voltage reference supplies
Merge series from David Lechner <dlechner@baylibre.com>:
In the IIO subsystem, we noticed a pattern in many drivers where we need
to get, enable and get the voltage of a supply that provides a reference
voltage. In these cases, we only need the voltage and not a handle to
the regulator. Another common pattern is for chips to have an internal
reference voltage that is used when an external reference is not
available. There are also a few drivers outside of IIO that do the same.
So we would like to propose a new regulator consumer API to handle these
specific cases to avoid repeating the same boilerplate code in multiple
drivers.
As an example of how these functions are used, I have included a few
patches to consumer drivers. But to avoid a giant patch bomb, I have
omitted the iio/adc and iio/dac patches I have prepared from this
series. I will send those separately but these will add 36 more users
of devm_regulator_get_enable_read_voltage() in addition to the 6 here.
In total, this will eliminate nearly 1000 lines of similar code and will
simplify writing and reviewing new drivers in the future.
Diffstat (limited to 'kernel/module')
| -rw-r--r-- | kernel/module/Kconfig | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/module/Kconfig b/kernel/module/Kconfig index c3ced519e14b..f3e0329337f6 100644 --- a/kernel/module/Kconfig +++ b/kernel/module/Kconfig @@ -236,6 +236,10 @@ choice possible to load a signed module containing the algorithm to check the signature on that module. +config MODULE_SIG_SHA1 + bool "Sign modules with SHA-1" + select CRYPTO_SHA1 + config MODULE_SIG_SHA256 bool "Sign modules with SHA-256" select CRYPTO_SHA256 @@ -265,6 +269,7 @@ endchoice config MODULE_SIG_HASH string depends on MODULE_SIG || IMA_APPRAISE_MODSIG + default "sha1" if MODULE_SIG_SHA1 default "sha256" if MODULE_SIG_SHA256 default "sha384" if MODULE_SIG_SHA384 default "sha512" if MODULE_SIG_SHA512 |
