lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <135199c5-19ef-4daf-bc88-410f6849a6a2@roeck-us.net>
Date:   Wed, 5 May 2021 21:04:02 -0700
From:   Guenter Roeck <linux@...ck-us.net>
To:     Erik Rosen <erik.rosen@...ormote.com>,
        Jean Delvare <jdelvare@...e.com>,
        Jonathan Corbet <corbet@....net>, linux-hwmon@...r.kernel.org,
        linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3] hwmon: (pmbus) Add documentation for new flags

On 5/5/21 11:32 AM, Erik Rosen wrote:
> Add documentation for the new pmbus flags PMBUS_WRITE_PROTECTED and
> PMBUS_READ_STATUS_AFTER_FAILED_CHECK
> 
> Signed-off-by: Erik Rosen <erik.rosen@...ormote.com>
> ---
>  Documentation/hwmon/pmbus-core.rst | 24 ++++++++++++++++++++++--
>  1 file changed, 22 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/hwmon/pmbus-core.rst b/Documentation/hwmon/pmbus-core.rst
> index 73e23ab42cc3..001c64f0f8c0 100644
> --- a/Documentation/hwmon/pmbus-core.rst
> +++ b/Documentation/hwmon/pmbus-core.rst
> @@ -289,9 +289,13 @@ PMBus driver platform data
>  ==========================
>  
>  PMBus platform data is defined in include/linux/pmbus.h. Platform data
> -currently only provides a flag field with a single bit used::
> +currently only provides a flag field with three bits used::
>  
> -	#define PMBUS_SKIP_STATUS_CHECK (1 << 0)
> +	#define PMBUS_SKIP_STATUS_CHECK  BIT(0)
> +
> +  #define PMBUS_WRITE_PROTECTED BIT(1)
> +
> +  #define PMBUS_READ_STATUS_AFTER_FAILED_CHECK  BIT(2)
>  
>  	struct pmbus_platform_data {
>  		u32 flags;              /* Device specific flags */
> @@ -315,3 +319,19 @@ status register must be disabled.
>  Some i2c controllers do not support single-byte commands (write commands with
>  no data, i2c_smbus_write_byte()). With such controllers, clearing the status
>  register is impossible, and the PMBUS_SKIP_STATUS_CHECK flag must be set.
> +
> +PMBUS_WRITE_PROTECTED
> +
> +Set if the chip is write protected and write protection is not determined
> +by the standard WRITE_PROTECT command.
> +
> +PMBUS_READ_STATUS_AFTER_FAILED_CHECK
> +  Read the STATUS register after each failed register check.
> +
> +Some PMBus chips end up in an undefined state when trying to read an
> +unsupported register. For such chips, it is necessary to reset the
> +chip pmbus controller to a known state after a failed register check.
> +This can be done by reading a known register. By setting this flag the
> +driver will try to read the STATUS register after each failed
> +register check. This read may fail, but it will put the chip into a
> +known state.
> \ No newline at end of file
> 

Formatting looks way off in this file. Please update to have
it look nice.

Thanks,
Guenter


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ