2020-09-04 16:02:19

by Ivan Zaentsev

[permalink] [raw]
Subject: [PATCH 2/2] w1: w1_therm: Add support for GXCAS GX20MH01 device.

GX20MH01 device shares family number 0x28 with DS18B20. The device
is generally compatible with DS18B20. Added are the lowest 2^-5, 2^-6
temperature bits in Config register; R2 bit in Config register
enabling 13 and 14 bit resolutions. It is powered up in 14 bit mode.

Signed-off-by: Ivan Zaentsev <[email protected]>
---
.../ABI/testing/sysfs-driver-w1_therm | 4 +-
Documentation/w1/slaves/w1_therm.rst | 15 ++-
drivers/w1/slaves/w1_therm.c | 106 +++++++++++++-----
3 files changed, 92 insertions(+), 33 deletions(-)

diff --git a/Documentation/ABI/testing/sysfs-driver-w1_therm b/Documentation/ABI/testing/sysfs-driver-w1_therm
index b44b51a88c5e..9f05bcdcd762 100644
--- a/Documentation/ABI/testing/sysfs-driver-w1_therm
+++ b/Documentation/ABI/testing/sysfs-driver-w1_therm
@@ -49,7 +49,7 @@ Description:
will be changed only in device RAM, so it will be cleared when
power is lost. Trigger a 'save' to EEPROM command to keep
values after power-on. Read or write are :
- * '9..12': device resolution in bit
+ * '9..14': device resolution in bit
or resolution to set in bit
* '-xx': xx is kernel error when reading the resolution
* Anything else: do nothing
@@ -89,7 +89,7 @@ Description:
*write* :
* '0' : save the 2 or 3 bytes to the device EEPROM
(i.e. TH, TL and config register)
- * '9..12' : set the device resolution in RAM
+ * '9..14' : set the device resolution in RAM
(if supported)
* Anything else: do nothing
refer to Documentation/w1/slaves/w1_therm.rst for detailed
diff --git a/Documentation/w1/slaves/w1_therm.rst b/Documentation/w1/slaves/w1_therm.rst
index f1148181f53e..00376501a5ef 100644
--- a/Documentation/w1/slaves/w1_therm.rst
+++ b/Documentation/w1/slaves/w1_therm.rst
@@ -6,6 +6,7 @@ Supported chips:

* Maxim ds18*20 based temperature sensors.
* Maxim ds1825 based temperature sensors.
+ * GXCAS GC20MH01 temperature sensor.

Author: Evgeniy Polyakov <[email protected]>

@@ -13,8 +14,8 @@ Author: Evgeniy Polyakov <[email protected]>
Description
-----------

-w1_therm provides basic temperature conversion for ds18*20 devices, and the
-ds28ea00 device.
+w1_therm provides basic temperature conversion for ds18*20, ds28ea00, GX20MH01
+devices.

Supported family codes:

@@ -130,4 +131,12 @@ conversion and temperature reads 85.00 (powerup value) or 127.94 (insufficient
power), the driver returns a conversion error. Bit mask ``2`` enables poll for
conversion completion (normal power only) by generating read cycles on the bus
after conversion starts. In parasite power mode this feature is not available.
-Feature bit masks may be combined (OR).
+Feature bit masks may be combined (OR). See accompanying sysfs documentation:
+:ref:`Documentation/w1/slaves/w1_therm.rst <w1_therm>`
+
+GX20MH01 device shares family number 0x28 with DS18*20. The device is generally
+compatible with DS18B20. Added are lowest 2^-5, 2^-6 temperature bits in Config
+register; R2 bit in Config register enabling 13 and 14 bit resolutions. The
+device is powered up in 14-bit resolution mode. The conversion times specified
+in the datasheet are too low and have to be increased. The device supports
+driver features ``1`` and ``2``.
diff --git a/drivers/w1/slaves/w1_therm.c b/drivers/w1/slaves/w1_therm.c
index 9b2d96335a70..f6b0e0320ffc 100644
--- a/drivers/w1/slaves/w1_therm.c
+++ b/drivers/w1/slaves/w1_therm.c
@@ -80,6 +80,18 @@ static u16 bulk_read_device_counter; /* =0 as per C standard */
#define W1_POLL_CONVERT_TEMP 2000 /* Timeout for W1_CONVERT_TEMP, ms */
#define W1_POLL_RECALL_EEPROM 500 /* Timeout for W1_RECALL_EEPROM, ms*/

+/* Masks for resolution functions, work with all devices */
+/* Bit mask for config register for all devices, bits 7,6,5 */
+#define W1_THERM_RESOLUTION_MASK 0xE0
+/* Bit offset of resolution in config register for all devices */
+#define W1_THERM_RESOLUTION_SHIFT 5
+/* Bit offset of resolution in config register for all devices */
+#define W1_THERM_RESOLUTION_SHIFT 5
+/* Add this to bit value to get resolution */
+#define W1_THERM_RESOLUTION_MIN 9
+/* Maximum allowed value */
+#define W1_THERM_RESOLUTION_MAX 14
+
/* Helpers Macros */

/*
@@ -523,7 +535,9 @@ static inline int w1_DS18B20_convert_time(struct w1_slave *sl)
if (SLAVE_CONV_TIME_OVERRIDE(sl) != CONV_TIME_DEFAULT)
return SLAVE_CONV_TIME_OVERRIDE(sl);

- /* Return the conversion time from datasheet, depending on resolution */
+ /* Return the conversion time, depending on resolution,
+ * select maximum conversion time among all compatible devices
+ */
switch (SLAVE_RESOLUTION(sl)) {
case 9:
ret = 95;
@@ -535,6 +549,14 @@ static inline int w1_DS18B20_convert_time(struct w1_slave *sl)
ret = 375;
break;
case 12:
+ ret = 750;
+ break;
+ case 13:
+ ret = 850; /* GX20MH01 only. Datasheet says 500ms, but that's not enough. */
+ break;
+ case 14:
+ ret = 1600; /* GX20MH01 only. Datasheet says 1000ms - not enough */
+ break;
default:
ret = 750;
}
@@ -568,62 +590,71 @@ static inline int w1_DS18S20_write_data(struct w1_slave *sl,
static inline int w1_DS18B20_set_resolution(struct w1_slave *sl, int val)
{
int ret;
- u8 new_config_register[3]; /* array of data to be written */
struct therm_info info, info2;

- /* resolution of DS18B20 is in the range [9..12] bits */
- if (val < 9 || val > 12)
+ /* DS18B20 resolution is 9 to 12 bits */
+ /* GX20MH01 resolution is 9 to 14 bits */
+ if (val < W1_THERM_RESOLUTION_MIN || val > W1_THERM_RESOLUTION_MAX)
return -EINVAL;

- val -= 9; /* soustract 9 the lowest resolution in bit */
- val = (val << 5); /* shift to position bit 5 & bit 6 */
+ /* Calc bit value from resolution */
+ val = (val - W1_THERM_RESOLUTION_MIN) << W1_THERM_RESOLUTION_SHIFT;

/*
* Read the scratchpad to change only the required bits
* (bit5 & bit 6 from byte 4)
*/
ret = read_scratchpad(sl, &info);
- if (!ret) {
- new_config_register[0] = info.rom[2];
- new_config_register[1] = info.rom[3];
- /* config register is byte 4 & mask 0b10011111*/
- new_config_register[2] = (info.rom[4] & 0x9F) |
- (u8) val;
- } else
+
+ if (ret)
return ret;

+
+ info.rom[4] &= ~W1_THERM_RESOLUTION_MASK;
+ info.rom[4] |= val;
+
/* Write data in the device RAM */
- ret = w1_DS18B20_write_data(sl, new_config_register);
+ ret = w1_DS18B20_write_data(sl, info.rom + 2);
if (ret)
return ret;

- /* Some DS18B20 clones don't support resolution change, read back to verify */
+ /* Have to read back the resolution to verify an actual value
+ * GX20MH01 and DS18B20 are indistinguishable by family number, but resolutions differ
+ * Some DS18B20 clones don't support resolution change
+ */
ret = read_scratchpad(sl, &info2);
if (ret)
+ /* Scratchpad read fail */
return ret;

- if ((info2.rom[4] & 0x9F) == (info.rom[4] & 0x9F))
+ if ((info2.rom[4] & W1_THERM_RESOLUTION_MASK) == (info.rom[4] & W1_THERM_RESOLUTION_MASK))
return 0;
- else
- return -EIO;
+
+ /* Resolution verify error */
+ return -EIO;
}

static inline int w1_DS18B20_get_resolution(struct w1_slave *sl)
{
int ret;
- u8 config_register;
+ int resolution;
struct therm_info info;

ret = read_scratchpad(sl, &info);

- if (!ret) {
- config_register = info.rom[4]; /* config register is byte 4 */
- config_register &= 0x60; /* 0b01100000 keep only bit 5 & 6 */
- config_register = (config_register >> 5); /* shift */
- config_register += 9; /* add 9 the lowest resolution in bit */
- ret = (int) config_register;
- }
- return ret;
+ if (ret)
+ return ret;
+
+ resolution = ((info.rom[4] & W1_THERM_RESOLUTION_MASK) >> W1_THERM_RESOLUTION_SHIFT)
+ + W1_THERM_RESOLUTION_MIN;
+ /* GX20MH01 has one special case:
+ * >=14 means 14 bits when getting resolution from bit value.
+ * Other devices have no more then 12 bits.
+ */
+ if (resolution > W1_THERM_RESOLUTION_MAX)
+ resolution = W1_THERM_RESOLUTION_MAX;
+
+ return resolution;
}

/**
@@ -636,11 +667,28 @@ static inline int w1_DS18B20_get_resolution(struct w1_slave *sl)
*/
static inline int w1_DS18B20_convert_temp(u8 rom[9])
{
- s16 t = le16_to_cpup((__le16 *)rom);
+ int t;
+ u32 bv;
+
+ /* Config register bit R2 = 1 - GX20MH01 in 13 or 14 bit resolution mode */
+ if (rom[4] & 0x80) {
+ /* Signed 16-bit value to unsigned, cpu order */
+ bv = le16_to_cpup((__le16 *)rom);
+
+ /* Insert two temperature bits from config register */
+ /* Avoid arithmetic shift of signed value */
+ bv = (bv << 2) | (rom[4] & 3);

+ t = (int) sign_extend32(bv, 17); /* Degrees, lowest bit is 2^-6 */
+ return (t*1000)/64; /* Millidegrees */
+ }
+
+ t = (int)le16_to_cpup((__le16 *)rom);
return t*1000/16;
}

+
+
/**
* w1_DS18S20_convert_temp() - temperature computation for DS18S20
* @rom: data read from device RAM (8 data bytes + 1 CRC byte)
@@ -672,6 +720,7 @@ static inline int w1_DS18S20_convert_temp(u8 rom[9])
}

/* Device capability description */
+/* GX20MH01 device shares family number and structure with DS18B20 */

static struct w1_therm_family_converter w1_therm_families[] = {
{
@@ -693,6 +742,7 @@ static struct w1_therm_family_converter w1_therm_families[] = {
.bulk_read = true
},
{
+ /* Also used for GX20MH01 */
.f = &w1_therm_family_DS18B20,
.convert = w1_DS18B20_convert_temp,
.get_conversion_time = w1_DS18B20_convert_time,
--
2.25.1


2020-10-06 13:22:18

by Mauro Carvalho Chehab

[permalink] [raw]
Subject: Re: [PATCH 2/2] w1: w1_therm: Add support for GXCAS GX20MH01 device.

Em Fri, 4 Sep 2020 19:00:04 +0300
Ivan Zaentsev <[email protected]> escreveu:

> diff --git a/Documentation/w1/slaves/w1_therm.rst b/Documentation/w1/slaves/w1_therm.rst
> index f1148181f53e..00376501a5ef 100644
> --- a/Documentation/w1/slaves/w1_therm.rst
> +++ b/Documentation/w1/slaves/w1_therm.rst

>
> @@ -130,4 +131,12 @@ conversion and temperature reads 85.00 (powerup value) or 127.94 (insufficient
> power), the driver returns a conversion error. Bit mask ``2`` enables poll for
> conversion completion (normal power only) by generating read cycles on the bus
> after conversion starts. In parasite power mode this feature is not available.
> -Feature bit masks may be combined (OR).
> +Feature bit masks may be combined (OR). See accompanying sysfs documentation:
> +:ref:`Documentation/w1/slaves/w1_therm.rst <w1_therm>`
> +

As warned by Sphinx, this cross-reference is broken:

.../Documentation/w1/slaves/w1_therm.rst:125: WARNING: undefined label: w1_therm (if the link has no caption the label must precede a section header)

Not sure what you wanted to point here.


Thanks,
Mauro

2020-10-07 07:35:18

by Ivan Zaentsev

[permalink] [raw]
Subject: Re: [PATCH 2/2] w1: w1_therm: Add support for GXCAS GX20MH01 device.

Tuesday, October 6, 2020, 4:19:15 PM, Mauro Carvalho Chehab wrote:

>> diff --git a/Documentation/w1/slaves/w1_therm.rst b/Documentation/w1/slaves/w1_therm.rst
>> index f1148181f53e..00376501a5ef 100644
>> --- a/Documentation/w1/slaves/w1_therm.rst
>> +++ b/Documentation/w1/slaves/w1_therm.rst

>>
>> @@ -130,4 +131,12 @@ conversion and temperature reads 85.00 (powerup value) or 127.94 (insufficient
>> power), the driver returns a conversion error. Bit mask ``2`` enables poll for
>> conversion completion (normal power only) by generating read cycles on the bus
>> after conversion starts. In parasite power mode this feature is not available.
>> -Feature bit masks may be combined (OR).
>> +Feature bit masks may be combined (OR). See accompanying sysfs documentation:
>> +:ref:`Documentation/w1/slaves/w1_therm.rst <w1_therm>`
>> +

> As warned by Sphinx, this cross-reference is broken:

> .../Documentation/w1/slaves/w1_therm.rst:125: WARNING:
> undefined label: w1_therm (if the link has no caption the label must precede a section header)

Would this be ok?

"More details in Documentation/ABI/testing/sysfs-driver-w1_therm"

> Not sure what you wanted to point here.

A link to a driver's sysfs interface, but sysfs docs are text
files and seem to not be included in Sphynx Docs.

--
Best regards,
Ivan mailto:[email protected]

2020-10-07 08:59:47

by Mauro Carvalho Chehab

[permalink] [raw]
Subject: Re: [PATCH 2/2] w1: w1_therm: Add support for GXCAS GX20MH01 device.

Em Wed, 7 Oct 2020 10:32:27 +0300
Ivan Zaentsev <[email protected]> escreveu:

> Tuesday, October 6, 2020, 4:19:15 PM, Mauro Carvalho Chehab wrote:
>
> >> diff --git a/Documentation/w1/slaves/w1_therm.rst b/Documentation/w1/slaves/w1_therm.rst
> >> index f1148181f53e..00376501a5ef 100644
> >> --- a/Documentation/w1/slaves/w1_therm.rst
> >> +++ b/Documentation/w1/slaves/w1_therm.rst
>
> >>
> >> @@ -130,4 +131,12 @@ conversion and temperature reads 85.00 (powerup value) or 127.94 (insufficient
> >> power), the driver returns a conversion error. Bit mask ``2`` enables poll for
> >> conversion completion (normal power only) by generating read cycles on the bus
> >> after conversion starts. In parasite power mode this feature is not available.
> >> -Feature bit masks may be combined (OR).
> >> +Feature bit masks may be combined (OR). See accompanying sysfs documentation:
> >> +:ref:`Documentation/w1/slaves/w1_therm.rst <w1_therm>`
> >> +
>
> > As warned by Sphinx, this cross-reference is broken:
>
> > .../Documentation/w1/slaves/w1_therm.rst:125: WARNING:
> > undefined label: w1_therm (if the link has no caption the label must precede a section header)
>
> Would this be ok?

Yeah, sure!

>
> "More details in Documentation/ABI/testing/sysfs-driver-w1_therm"
>
> > Not sure what you wanted to point here.
>
> A link to a driver's sysfs interface, but sysfs docs are text
> files and seem to not be included in Sphynx Docs.

I sent upstream sometime ago a patch series adding ABI to Sphinx, but I
was not merged, not sure why:

https://git.linuxtv.org/mchehab/experimental.git/log/?h=abi_patches_v5.6

Yet, the approach such series took were not to convert ABI files
to ReST, but, instead, to use a script that would do that.

The rationale were to avoid needing to touch all ABI files at
the same time[1].

In any case, with such approach a cross-reference won't work.

So, I guess that the next best thing to do is to just mention
the file like what you suggested.

[1] It would be easy to run the script I wrote to convert the
files to ReST directly.

Thanks,
Mauro

2020-10-07 09:09:27

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH 2/2] w1: w1_therm: Add support for GXCAS GX20MH01 device.

On Wed, Oct 07, 2020 at 10:57:02AM +0200, Mauro Carvalho Chehab wrote:
> Em Wed, 7 Oct 2020 10:32:27 +0300
> Ivan Zaentsev <[email protected]> escreveu:
>
> > Tuesday, October 6, 2020, 4:19:15 PM, Mauro Carvalho Chehab wrote:
> >
> > >> diff --git a/Documentation/w1/slaves/w1_therm.rst b/Documentation/w1/slaves/w1_therm.rst
> > >> index f1148181f53e..00376501a5ef 100644
> > >> --- a/Documentation/w1/slaves/w1_therm.rst
> > >> +++ b/Documentation/w1/slaves/w1_therm.rst
> >
> > >>
> > >> @@ -130,4 +131,12 @@ conversion and temperature reads 85.00 (powerup value) or 127.94 (insufficient
> > >> power), the driver returns a conversion error. Bit mask ``2`` enables poll for
> > >> conversion completion (normal power only) by generating read cycles on the bus
> > >> after conversion starts. In parasite power mode this feature is not available.
> > >> -Feature bit masks may be combined (OR).
> > >> +Feature bit masks may be combined (OR). See accompanying sysfs documentation:
> > >> +:ref:`Documentation/w1/slaves/w1_therm.rst <w1_therm>`
> > >> +
> >
> > > As warned by Sphinx, this cross-reference is broken:
> >
> > > .../Documentation/w1/slaves/w1_therm.rst:125: WARNING:
> > > undefined label: w1_therm (if the link has no caption the label must precede a section header)
> >
> > Would this be ok?
>
> Yeah, sure!
>
> >
> > "More details in Documentation/ABI/testing/sysfs-driver-w1_therm"
> >
> > > Not sure what you wanted to point here.
> >
> > A link to a driver's sysfs interface, but sysfs docs are text
> > files and seem to not be included in Sphynx Docs.
>
> I sent upstream sometime ago a patch series adding ABI to Sphinx, but I
> was not merged, not sure why:
>
> https://git.linuxtv.org/mchehab/experimental.git/log/?h=abi_patches_v5.6

I think the raft of different patches floating around at the time made
me totally confused as to what was, and was not, the latest versions.

I'll be glad to look at them again, if you want to rebase after 5.10-rc1
is out and resend them, as I think this should be showing up in the
documentation.

thanks,

greg k-h

2020-10-07 11:13:45

by Mauro Carvalho Chehab

[permalink] [raw]
Subject: Re: [PATCH 2/2] w1: w1_therm: Add support for GXCAS GX20MH01 device.

Em Wed, 7 Oct 2020 11:06:19 +0200
Greg Kroah-Hartman <[email protected]> escreveu:

> On Wed, Oct 07, 2020 at 10:57:02AM +0200, Mauro Carvalho Chehab wrote:
> > Em Wed, 7 Oct 2020 10:32:27 +0300
> > Ivan Zaentsev <[email protected]> escreveu:
> >
> > > Tuesday, October 6, 2020, 4:19:15 PM, Mauro Carvalho Chehab wrote:
> > >
> > > >> diff --git a/Documentation/w1/slaves/w1_therm.rst b/Documentation/w1/slaves/w1_therm.rst
> > > >> index f1148181f53e..00376501a5ef 100644
> > > >> --- a/Documentation/w1/slaves/w1_therm.rst
> > > >> +++ b/Documentation/w1/slaves/w1_therm.rst
> > >
> > > >>
> > > >> @@ -130,4 +131,12 @@ conversion and temperature reads 85.00 (powerup value) or 127.94 (insufficient
> > > >> power), the driver returns a conversion error. Bit mask ``2`` enables poll for
> > > >> conversion completion (normal power only) by generating read cycles on the bus
> > > >> after conversion starts. In parasite power mode this feature is not available.
> > > >> -Feature bit masks may be combined (OR).
> > > >> +Feature bit masks may be combined (OR). See accompanying sysfs documentation:
> > > >> +:ref:`Documentation/w1/slaves/w1_therm.rst <w1_therm>`
> > > >> +
> > >
> > > > As warned by Sphinx, this cross-reference is broken:
> > >
> > > > .../Documentation/w1/slaves/w1_therm.rst:125: WARNING:
> > > > undefined label: w1_therm (if the link has no caption the label must precede a section header)
> > >
> > > Would this be ok?
> >
> > Yeah, sure!
> >
> > >
> > > "More details in Documentation/ABI/testing/sysfs-driver-w1_therm"
> > >
> > > > Not sure what you wanted to point here.
> > >
> > > A link to a driver's sysfs interface, but sysfs docs are text
> > > files and seem to not be included in Sphynx Docs.
> >
> > I sent upstream sometime ago a patch series adding ABI to Sphinx, but I
> > was not merged, not sure why:
> >
> > https://git.linuxtv.org/mchehab/experimental.git/log/?h=abi_patches_v5.6
>
> I think the raft of different patches floating around at the time made
> me totally confused as to what was, and was not, the latest versions.

Yeah, there were lots of patches floating around that time.

I also recall that someone (Jeni?) asked if the best wouldn't be to
just convert the ABI files to ReST directly.

> I'll be glad to look at them again, if you want to rebase after 5.10-rc1
> is out and resend them, as I think this should be showing up in the
> documentation.

Surely. I'll rebase them after 5.10-rc1 and re-submit.

What strategy do you prefer? Keep the files with the same format as
today (allowing them to optionally have ReST markups) or to convert
them to .rst directly?

In the latter case, the best would be to apply it as early as possible
after 5.10-rc1, as it may cause conflicts with other patches being
submitted for 5.11.

In the former case, as there are a few other places like w1_therm that want
cross-references to ABI, I'll try to automate a way to generate identifiers
for processed ABI files.

Thanks,
Mauro

2020-10-07 11:48:34

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH 2/2] w1: w1_therm: Add support for GXCAS GX20MH01 device.

On Wed, Oct 07, 2020 at 01:05:49PM +0200, Mauro Carvalho Chehab wrote:
> Em Wed, 7 Oct 2020 11:06:19 +0200
> Greg Kroah-Hartman <[email protected]> escreveu:
>
> > On Wed, Oct 07, 2020 at 10:57:02AM +0200, Mauro Carvalho Chehab wrote:
> > > Em Wed, 7 Oct 2020 10:32:27 +0300
> > > Ivan Zaentsev <[email protected]> escreveu:
> > >
> > > > Tuesday, October 6, 2020, 4:19:15 PM, Mauro Carvalho Chehab wrote:
> > > >
> > > > >> diff --git a/Documentation/w1/slaves/w1_therm.rst b/Documentation/w1/slaves/w1_therm.rst
> > > > >> index f1148181f53e..00376501a5ef 100644
> > > > >> --- a/Documentation/w1/slaves/w1_therm.rst
> > > > >> +++ b/Documentation/w1/slaves/w1_therm.rst
> > > >
> > > > >>
> > > > >> @@ -130,4 +131,12 @@ conversion and temperature reads 85.00 (powerup value) or 127.94 (insufficient
> > > > >> power), the driver returns a conversion error. Bit mask ``2`` enables poll for
> > > > >> conversion completion (normal power only) by generating read cycles on the bus
> > > > >> after conversion starts. In parasite power mode this feature is not available.
> > > > >> -Feature bit masks may be combined (OR).
> > > > >> +Feature bit masks may be combined (OR). See accompanying sysfs documentation:
> > > > >> +:ref:`Documentation/w1/slaves/w1_therm.rst <w1_therm>`
> > > > >> +
> > > >
> > > > > As warned by Sphinx, this cross-reference is broken:
> > > >
> > > > > .../Documentation/w1/slaves/w1_therm.rst:125: WARNING:
> > > > > undefined label: w1_therm (if the link has no caption the label must precede a section header)
> > > >
> > > > Would this be ok?
> > >
> > > Yeah, sure!
> > >
> > > >
> > > > "More details in Documentation/ABI/testing/sysfs-driver-w1_therm"
> > > >
> > > > > Not sure what you wanted to point here.
> > > >
> > > > A link to a driver's sysfs interface, but sysfs docs are text
> > > > files and seem to not be included in Sphynx Docs.
> > >
> > > I sent upstream sometime ago a patch series adding ABI to Sphinx, but I
> > > was not merged, not sure why:
> > >
> > > https://git.linuxtv.org/mchehab/experimental.git/log/?h=abi_patches_v5.6
> >
> > I think the raft of different patches floating around at the time made
> > me totally confused as to what was, and was not, the latest versions.
>
> Yeah, there were lots of patches floating around that time.
>
> I also recall that someone (Jeni?) asked if the best wouldn't be to
> just convert the ABI files to ReST directly.
>
> > I'll be glad to look at them again, if you want to rebase after 5.10-rc1
> > is out and resend them, as I think this should be showing up in the
> > documentation.
>
> Surely. I'll rebase them after 5.10-rc1 and re-submit.
>
> What strategy do you prefer? Keep the files with the same format as
> today (allowing them to optionally have ReST markups) or to convert
> them to .rst directly?
>
> In the latter case, the best would be to apply it as early as possible
> after 5.10-rc1, as it may cause conflicts with other patches being
> submitted for 5.11.

The existing format if at all possible, doing wholesale changes is a
mess and wouldn't be recommended.

I think you already fixed up the entries that had problems being parsed
in the past, if not, we can resolve those as well.

thanks,

greg k-h

2020-10-07 12:01:56

by Mauro Carvalho Chehab

[permalink] [raw]
Subject: Re: [PATCH 2/2] w1: w1_therm: Add support for GXCAS GX20MH01 device.

Em Wed, 7 Oct 2020 13:43:59 +0200
Greg Kroah-Hartman <[email protected]> escreveu:

> On Wed, Oct 07, 2020 at 01:05:49PM +0200, Mauro Carvalho Chehab wrote:
> > Em Wed, 7 Oct 2020 11:06:19 +0200
> > Greg Kroah-Hartman <[email protected]> escreveu:
> >
> > > On Wed, Oct 07, 2020 at 10:57:02AM +0200, Mauro Carvalho Chehab wrote:
> > > > Em Wed, 7 Oct 2020 10:32:27 +0300
> > > > Ivan Zaentsev <[email protected]> escreveu:
> > > >
> > > > > Tuesday, October 6, 2020, 4:19:15 PM, Mauro Carvalho Chehab wrote:
> > > > >
> > > > > >> diff --git a/Documentation/w1/slaves/w1_therm.rst b/Documentation/w1/slaves/w1_therm.rst
> > > > > >> index f1148181f53e..00376501a5ef 100644
> > > > > >> --- a/Documentation/w1/slaves/w1_therm.rst
> > > > > >> +++ b/Documentation/w1/slaves/w1_therm.rst
> > > > >
> > > > > >>
> > > > > >> @@ -130,4 +131,12 @@ conversion and temperature reads 85.00 (powerup value) or 127.94 (insufficient
> > > > > >> power), the driver returns a conversion error. Bit mask ``2`` enables poll for
> > > > > >> conversion completion (normal power only) by generating read cycles on the bus
> > > > > >> after conversion starts. In parasite power mode this feature is not available.
> > > > > >> -Feature bit masks may be combined (OR).
> > > > > >> +Feature bit masks may be combined (OR). See accompanying sysfs documentation:
> > > > > >> +:ref:`Documentation/w1/slaves/w1_therm.rst <w1_therm>`
> > > > > >> +
> > > > >
> > > > > > As warned by Sphinx, this cross-reference is broken:
> > > > >
> > > > > > .../Documentation/w1/slaves/w1_therm.rst:125: WARNING:
> > > > > > undefined label: w1_therm (if the link has no caption the label must precede a section header)
> > > > >
> > > > > Would this be ok?
> > > >
> > > > Yeah, sure!
> > > >
> > > > >
> > > > > "More details in Documentation/ABI/testing/sysfs-driver-w1_therm"
> > > > >
> > > > > > Not sure what you wanted to point here.
> > > > >
> > > > > A link to a driver's sysfs interface, but sysfs docs are text
> > > > > files and seem to not be included in Sphynx Docs.
> > > >
> > > > I sent upstream sometime ago a patch series adding ABI to Sphinx, but I
> > > > was not merged, not sure why:
> > > >
> > > > https://git.linuxtv.org/mchehab/experimental.git/log/?h=abi_patches_v5.6
> > >
> > > I think the raft of different patches floating around at the time made
> > > me totally confused as to what was, and was not, the latest versions.
> >
> > Yeah, there were lots of patches floating around that time.
> >
> > I also recall that someone (Jeni?) asked if the best wouldn't be to
> > just convert the ABI files to ReST directly.
> >
> > > I'll be glad to look at them again, if you want to rebase after 5.10-rc1
> > > is out and resend them, as I think this should be showing up in the
> > > documentation.
> >
> > Surely. I'll rebase them after 5.10-rc1 and re-submit.
> >
> > What strategy do you prefer? Keep the files with the same format as
> > today (allowing them to optionally have ReST markups) or to convert
> > them to .rst directly?
> >
> > In the latter case, the best would be to apply it as early as possible
> > after 5.10-rc1, as it may cause conflicts with other patches being
> > submitted for 5.11.
>
> The existing format if at all possible, doing wholesale changes is a
> mess and wouldn't be recommended.

Yeah, merging it would indeed be a mess. At long term, though, it could
be easier to maintain.

> I think you already fixed up the entries that had problems being parsed
> in the past, if not, we can resolve those as well.

Yes. The series start with fixes. I suspect several of them
(if not all) were already merged, but if anything is missing, I can fix
at the upcoming rebased series.

Thanks,
Mauro

2020-10-22 11:00:37

by Mauro Carvalho Chehab

[permalink] [raw]
Subject: Adding ABI to htmldocs - Was: Re: [PATCH 2/2] w1: w1_therm: Add support for GXCAS GX20MH01 device.

Hi greg,

Em Wed, 7 Oct 2020 13:59:34 +0200
Mauro Carvalho Chehab <[email protected]> escreveu:

> Em Wed, 7 Oct 2020 13:43:59 +0200
> Greg Kroah-Hartman <[email protected]> escreveu:
>
> > On Wed, Oct 07, 2020 at 01:05:49PM +0200, Mauro Carvalho Chehab wrote:
> > > Em Wed, 7 Oct 2020 11:06:19 +0200
> > > Greg Kroah-Hartman <[email protected]> escreveu:
> > >
> > > > On Wed, Oct 07, 2020 at 10:57:02AM +0200, Mauro Carvalho Chehab wrote:
> > > > > Em Wed, 7 Oct 2020 10:32:27 +0300
> > > > > Ivan Zaentsev <[email protected]> escreveu:
> > > > >
> > > > > > Tuesday, October 6, 2020, 4:19:15 PM, Mauro Carvalho Chehab wrote:
> > > > > >
> > > > > > >> diff --git a/Documentation/w1/slaves/w1_therm.rst b/Documentation/w1/slaves/w1_therm.rst
> > > > > > >> index f1148181f53e..00376501a5ef 100644
> > > > > > >> --- a/Documentation/w1/slaves/w1_therm.rst
> > > > > > >> +++ b/Documentation/w1/slaves/w1_therm.rst
> > > > > >
> > > > > > >>
> > > > > > >> @@ -130,4 +131,12 @@ conversion and temperature reads 85.00 (powerup value) or 127.94 (insufficient
> > > > > > >> power), the driver returns a conversion error. Bit mask ``2`` enables poll for
> > > > > > >> conversion completion (normal power only) by generating read cycles on the bus
> > > > > > >> after conversion starts. In parasite power mode this feature is not available.
> > > > > > >> -Feature bit masks may be combined (OR).
> > > > > > >> +Feature bit masks may be combined (OR). See accompanying sysfs documentation:
> > > > > > >> +:ref:`Documentation/w1/slaves/w1_therm.rst <w1_therm>`
> > > > > > >> +
> > > > > >
> > > > > > > As warned by Sphinx, this cross-reference is broken:
> > > > > >
> > > > > > > .../Documentation/w1/slaves/w1_therm.rst:125: WARNING:
> > > > > > > undefined label: w1_therm (if the link has no caption the label must precede a section header)
> > > > > >
> > > > > > Would this be ok?
> > > > >
> > > > > Yeah, sure!
> > > > >
> > > > > >
> > > > > > "More details in Documentation/ABI/testing/sysfs-driver-w1_therm"
> > > > > >
> > > > > > > Not sure what you wanted to point here.
> > > > > >
> > > > > > A link to a driver's sysfs interface, but sysfs docs are text
> > > > > > files and seem to not be included in Sphynx Docs.
> > > > >
> > > > > I sent upstream sometime ago a patch series adding ABI to Sphinx, but I
> > > > > was not merged, not sure why:
> > > > >
> > > > > https://git.linuxtv.org/mchehab/experimental.git/log/?h=abi_patches_v5.6
> > > >
> > > > I think the raft of different patches floating around at the time made
> > > > me totally confused as to what was, and was not, the latest versions.
> > >
> > > Yeah, there were lots of patches floating around that time.
> > >
> > > I also recall that someone (Jeni?) asked if the best wouldn't be to
> > > just convert the ABI files to ReST directly.
> > >
> > > > I'll be glad to look at them again, if you want to rebase after 5.10-rc1
> > > > is out and resend them, as I think this should be showing up in the
> > > > documentation.
> > >
> > > Surely. I'll rebase them after 5.10-rc1 and re-submit.
> > >
> > > What strategy do you prefer? Keep the files with the same format as
> > > today (allowing them to optionally have ReST markups) or to convert
> > > them to .rst directly?
> > >
> > > In the latter case, the best would be to apply it as early as possible
> > > after 5.10-rc1, as it may cause conflicts with other patches being
> > > submitted for 5.11.
> >
> > The existing format if at all possible, doing wholesale changes is a
> > mess and wouldn't be recommended.
>
> Yeah, merging it would indeed be a mess. At long term, though, it could
> be easier to maintain.
>
> > I think you already fixed up the entries that had problems being parsed
> > in the past, if not, we can resolve those as well.
>
> Yes. The series start with fixes. I suspect several of them
> (if not all) were already merged, but if anything is missing, I can fix
> at the upcoming rebased series.

Rebasing the patch series was easier than what I expected:

https://git.linuxtv.org/mchehab/experimental.git/log/?h=abi_patches_v6

Yet, while fixing one build issue, I noticed that there are multiple
files defining the same ABI, with different contents.

Right now, scripts/get_abi.pl assumes that "what" is unique. Well, sorts
of. When it finds a duplicated entry, it merges the description,
preserving the fields from the last parsed entry.

I ended adding a patch to detect those ABI duplication:

https://git.linuxtv.org/mchehab/experimental.git/commit/?h=abi_patches_v6&id=6868914605cb0ebffe3fd07d344c246e1e4cd94e

I'm enclosing the results.

One such example is this one:

3 duplicated entries for /sys/class/leds/<led>/hw_pattern: on file(s) sysfs-class-led-trigger-pattern sysfs-class-led-driver-sc27xx sysfs-class-led-driver-el15203000

It sounds that different drivers define and use this ABI, but
each one with different meanings.

There are even some cases where the same file define the same ABI twice:

2 duplicated entries for /sys/class/power_supply/<supply_name>/temp_alert_min: on file(s) sysfs-class-power

Not sure what's the best way to document things like that, or if
the fix would be to drop/merge those.

Any ideas?

Thanks,
Mauro

$ ./scripts/get_abi.pl validate
2 duplicated entries for /sys/class/infiniband/<device>/ports/<port-num>/counters/symbol_error, /sys/class/infiniband/<device>/ports/<port-num>/counters/port_rcv_errors, /sys/class/infiniband/<device>/ports/<port-num>/counters/port_rcv_remote_physical_errors, /sys/class/infiniband/<device>/ports/<port-num>/counters/port_rcv_switch_relay_errors, /sys/class/infiniband/<device>/ports/<port-num>/counters/link_error_recovery, /sys/class/infiniband/<device>/ports/<port-num>/counters/port_xmit_constraint_errors, /sys/class/infiniband/<device>/ports/<port-num>/counters/port_rcv_contraint_errors, /sys/class/infiniband/<device>/ports/<port-num>/counters/local_link_integrity_errors, /sys/class/infiniband/<device>/ports/<port-num>/counters/excessive_buffer_overrun_errors, /sys/class/infiniband/<device>/ports/<port-num>/counters/port_xmit_data, /sys/class/infiniband/<device>/ports/<port-num>/counters/port_rcv_data, /sys/class/infiniband/<device>/ports/<port-num>/counters/port_xmit_packets, /sys/c
lass/infiniband/<device>/ports/<port-num>/counters/port_rcv_packets, /sys/class/infiniband/<device>/ports/<port-num>/counters/unicast_rcv_packets, /sys/class/infiniband/<device>/ports/<port-num>/counters/unicast_xmit_packets, /sys/class/infiniband/<device>/ports/<port-num>/counters/multicast_rcv_packets, /sys/class/infiniband/<device>/ports/<port-num>/counters/multicast_xmit_packets, /sys/class/infiniband/<device>/ports/<port-num>/counters/link_downed, /sys/class/infiniband/<device>/ports/<port-num>/counters/port_xmit_discards, /sys/class/infiniband/<device>/ports/<port-num>/counters/VL15_dropped, /sys/class/infiniband/<device>/ports/<port-num>/counters/port_xmit_wait: on file(s) sysfs-class-infiniband sysfs-class-infiniband.org
2 duplicated entries for /sys/class/infiniband/qibX/ports/N/sl2vl/[0-15]: on file(s) sysfs-class-infiniband sysfs-class-infiniband.org
2 duplicated entries for /sys/class/infiniband_verbs/abi_version: on file(s) sysfs-class-infiniband sysfs-class-infiniband.org
2 duplicated entries for /sys/class/backlight/<backlight>/ambient_light_zone: on file(s) sysfs-class-backlight-adp8860 sysfs-class-backlight-driver-adp8870
3 duplicated entries for /sys/class/leds/<led>/hw_pattern: on file(s) sysfs-class-led-trigger-pattern sysfs-class-led-driver-sc27xx sysfs-class-led-driver-el15203000
2 duplicated entries for /sys/bus/vmbus/devices/<UUID>/channels/<N>/cpu: on file(s) sysfs-bus-vmbus
2 duplicated entries for /sys/class/infiniband/qibX/ports/N/CCMgtA/cc_settings_bin, /sys/class/infiniband/qibX/ports/N/CCMgtA/cc_table_bin: on file(s) sysfs-class-infiniband sysfs-class-infiniband.org
2 duplicated entries for /sys/class/infiniband/hfi1_X/hw_rev, /sys/class/infiniband/hfi1_X/board_id, /sys/class/infiniband/hfi1_X/nctxts, /sys/class/infiniband/hfi1_X/serial, /sys/class/infiniband/hfi1_X/chip_reset, /sys/class/infiniband/hfi1_X/boardversion, /sys/class/infiniband/hfi1_X/nfreectxts, /sys/class/infiniband/hfi1_X/tempsense: on file(s) sysfs-class-infiniband sysfs-class-infiniband.org
2 duplicated entries for /sys/class/infiniband/<hca>/ports/<port-number>/gid_attrs/ndevs/<gid-index>: on file(s) sysfs-class-infiniband sysfs-class-infiniband.org
2 duplicated entries for /sys/class/infiniband/hfi1_X/sdma_N/cpu_list, /sys/class/infiniband/hfi1_X/sdma_N/vl: on file(s) sysfs-class-infiniband sysfs-class-infiniband.org
2 duplicated entries for /sys/bus/iio/devices/iio:deviceX/out_currentY_raw: on file(s) sysfs-bus-iio-light-lm3533-als sysfs-bus-iio-health-afe440x
2 duplicated entries for /sys/class/infiniband/vmw_pvrdmaX/hw_rev, /sys/class/infiniband/vmw_pvrdmaX/hca_type, /sys/class/infiniband/vmw_pvrdmaX/board_id: on file(s) sysfs-class-infiniband sysfs-class-infiniband.org
2 duplicated entries for /sys/class/infiniband/ocrdmaX/hw_rev: on file(s) sysfs-class-infiniband sysfs-class-infiniband.org
2 duplicated entries for /sys/class/infiniband/mlx4_X/iov/<pci-slot-num>/ports/<m>/smi_enabled, /sys/class/infiniband/mlx4_X/iov/<pci-slot-num>/ports/<m>/enable_smi_admin: on file(s) sysfs-class-infiniband sysfs-class-infiniband.org
2 duplicated entries for /sys/class/infiniband/mlx4_X/iov/ports/<port-num>/gids/<n>, /sys/class/infiniband/mlx4_X/iov/ports/<port-num>/admin_guids/<n>, /sys/class/infiniband/mlx4_X/iov/ports/<port-num>/pkeys/<n>, /sys/class/infiniband/mlx4_X/iov/ports/<port-num>/mcgs/, /sys/class/infiniband/mlx4_X/iov/ports/<pci-slot-num>/ports/<m>/gid_idx/0, /sys/class/infiniband/mlx4_X/iov/ports/<pci-slot-num>/ports/<m>/pkey_idx/<n>: on file(s) sysfs-class-infiniband sysfs-class-infiniband.org
2 duplicated entries for /sys/class/infiniband/qibX/ports/N/linkstate/loopback, /sys/class/infiniband/qibX/ports/N/linkstate/led_override, /sys/class/infiniband/qibX/ports/N/linkstate/hrtbt_enable, /sys/class/infiniband/qibX/ports/N/linkstate/status, /sys/class/infiniband/qibX/ports/N/linkstate/status_str: on file(s) sysfs-class-infiniband sysfs-class-infiniband.org
2 duplicated entries for /sys/class/infiniband_mad/umadN/ibdev, /sys/class/infiniband_mad/umadN/port, /sys/class/infiniband_mad/issmN/ibdev, /sys/class/infiniband_mad/issmN/port: on file(s) sysfs-class-infiniband sysfs-class-infiniband.org
2 duplicated entries for /sys/class/power_supply/<supply_name>/temp_alert_max: on file(s) sysfs-class-power
2 duplicated entries for /sys/class/infiniband/mlx4_X/hw_rev, /sys/class/infiniband/mlx4_X/hca_type, /sys/class/infiniband/mlx4_X/board_id: on file(s) sysfs-class-infiniband sysfs-class-infiniband.org
2 duplicated entries for /sys/class/infiniband/<hca>/ports/<port-number>/gid_attrs/types/<gid-index>: on file(s) sysfs-class-infiniband sysfs-class-infiniband.org
2 duplicated entries for /sys/class/power_supply/<supply_name>/current_max: on file(s) sysfs-class-power
2 duplicated entries for /sys/class/infiniband/<device>/ports/<port-num>/link_layer: on file(s) sysfs-class-infiniband sysfs-class-infiniband.org
2 duplicated entries for /sys/class/infiniband/qedrX/hw_rev, /sys/class/infiniband/qedrX/hca_type: on file(s) sysfs-class-infiniband sysfs-class-infiniband.org
2 duplicated entries for /sys/class/power_supply/<supply_name>/current_avg: on file(s) sysfs-class-power
2 duplicated entries for /sys/class/infiniband/qibX/version, /sys/class/infiniband/qibX/hw_rev, /sys/class/infiniband/qibX/hca_type, /sys/class/infiniband/qibX/board_id, /sys/class/infiniband/qibX/boardversion, /sys/class/infiniband/qibX/nctxts, /sys/class/infiniband/qibX/localbus_info, /sys/class/infiniband/qibX/tempsense, /sys/class/infiniband/qibX/serial, /sys/class/infiniband/qibX/nfreectxts, /sys/class/infiniband/qibX/chip_reset: on file(s) sysfs-class-infiniband sysfs-class-infiniband.org
2 duplicated entries for /sys/bus/iio/devices/iio:deviceX/sensor_sensitivity: on file(s) sysfs-bus-iio-distance-srf08 sysfs-bus-iio-proximity-as3935
2 duplicated entries for /sys/class/infiniband/usnic_X/qpn/summary, /sys/class/infiniband/usnic_X/qpn/context: on file(s) sysfs-class-infiniband sysfs-class-infiniband.org
2 duplicated entries for /sys/kernel/iommu_groups/reserved_regions: on file(s) sysfs-kernel-iommu_groups
2 duplicated entries for /sys/class/power_supply/<supply_name>/temp_max: on file(s) sysfs-class-power
2 duplicated entries for /sys/class/infiniband_verbs/uverbsN/ibdev, /sys/class/infiniband_verbs/uverbsN/abi_version: on file(s) sysfs-class-infiniband sysfs-class-infiniband.org
2 duplicated entries for /sys/class/infiniband/bnxt_reX/hw_rev, /sys/class/infiniband/bnxt_reX/hca_type: on file(s) sysfs-class-infiniband sysfs-class-infiniband.org
2 duplicated entries for /sys/class/infiniband/mlx5_X/hw_rev, /sys/class/infiniband/mlx5_X/hca_type, /sys/class/infiniband/mlx5_X/reg_pages, /sys/class/infiniband/mlx5_X/fw_pages: on file(s) sysfs-class-infiniband sysfs-class-infiniband.org
2 duplicated entries for /sys/class/infiniband/<device-name>/hw_counters/lifespan, /sys/class/infiniband/<device-name>/ports/<port-num>/hw_counters/lifespan: on file(s) sysfs-class-infiniband sysfs-class-infiniband.org
2 duplicated entries for /sys/class/infiniband/cxgb4_X/hw_rev, /sys/class/infiniband/cxgb4_X/hca_type, /sys/class/infiniband/cxgb4_X/board_id: on file(s) sysfs-class-infiniband sysfs-class-infiniband.org
2 duplicated entries for /sys/class/infiniband/usnic_X/board_id, /sys/class/infiniband/usnic_X/config, /sys/class/infiniband/usnic_X/qp_per_vf, /sys/class/infiniband/usnic_X/max_vf, /sys/class/infiniband/usnic_X/cq_per_vf, /sys/class/infiniband/usnic_X/iface: on file(s) sysfs-class-infiniband sysfs-class-infiniband.org
2 duplicated entries for /sys/class/leds/<led>/brightness: on file(s) sysfs-class-led sysfs-class-led-multicolor
2 duplicated entries for /sys/class/infiniband/qibX/ports/N/diag_counters/rc_resends, /sys/class/infiniband/qibX/ports/N/diag_counters/seq_naks, /sys/class/infiniband/qibX/ports/N/diag_counters/rdma_seq, /sys/class/infiniband/qibX/ports/N/diag_counters/rnr_naks, /sys/class/infiniband/qibX/ports/N/diag_counters/other_naks, /sys/class/infiniband/qibX/ports/N/diag_counters/rc_timeouts, /sys/class/infiniband/qibX/ports/N/diag_counters/look_pkts, /sys/class/infiniband/qibX/ports/N/diag_counters/pkt_drops, /sys/class/infiniband/qibX/ports/N/diag_counters/dma_wait, /sys/class/infiniband/qibX/ports/N/diag_counters/unaligned: on file(s) sysfs-class-infiniband sysfs-class-infiniband.org
2 duplicated entries for /sys/bus/iio/devices/iio:deviceX/in_count0_quadrature_mode: on file(s) sysfs-bus-iio-timer-stm32 sysfs-bus-iio-lptimer-stm32
2 duplicated entries for /sys/bus/iio/devices/iio:deviceX/out_altvoltageY_frequency: on file(s) sysfs-bus-iio-frequency-adf4371 sysfs-bus-iio
2 duplicated entries for /sys/class/power_supply/<supply_name>/current_now: on file(s) sysfs-class-power
2 duplicated entries for /sys/class/infiniband/ocrdmaX/hca_type: on file(s) sysfs-class-infiniband sysfs-class-infiniband.org
2 duplicated entries for /sys/class/infiniband/hfi1_X/ports/N/sc2vl/[0-31], /sys/class/infiniband/hfi1_X/ports/N/sl2sc/[0-31], /sys/class/infiniband/hfi1_X/ports/N/vl2mtu/[0-15]: on file(s) sysfs-class-infiniband sysfs-class-infiniband.org
2 duplicated entries for /sys/class/c2port/c2portX/flash_erase: on file(s) sysfs-c2port
2 duplicated entries for /sys/class/infiniband/i40iwX/hw_rev, /sys/class/infiniband/i40iwX/hca_type, /sys/class/infiniband/i40iwX/board_id: on file(s) sysfs-class-infiniband sysfs-class-infiniband.org
2 duplicated entries for /sys/class/power_supply/<supply_name>/temp_min: on file(s) sysfs-class-power
2 duplicated entries for /sys/bus/w1/devices/.../eeprom: on file(s) sysfs-driver-w1_ds28e04 sysfs-driver-w1_therm
2 duplicated entries for /sys/bus/iio/devices/iio:deviceX/in_count0_preset: on file(s) sysfs-bus-iio-timer-stm32 sysfs-bus-iio-lptimer-stm32
2 duplicated entries for /sys/class/infiniband/<device>/ports/<port-num>/lid, /sys/class/infiniband/<device>/ports/<port-num>/rate, /sys/class/infiniband/<device>/ports/<port-num>/lid_mask_count, /sys/class/infiniband/<device>/ports/<port-num>/sm_sl, /sys/class/infiniband/<device>/ports/<port-num>/sm_lid, /sys/class/infiniband/<device>/ports/<port-num>/state, /sys/class/infiniband/<device>/ports/<port-num>/phys_state, /sys/class/infiniband/<device>/ports/<port-num>/cap_mask: on file(s) sysfs-class-infiniband sysfs-class-infiniband.org
2 duplicated entries for /sys/class/infiniband/<device>/node_desc: on file(s) sysfs-class-infiniband sysfs-class-infiniband.org
2 duplicated entries for /sys/class/infiniband/mthcaX/hw_rev, /sys/class/infiniband/mthcaX/hca_type, /sys/class/infiniband/mthcaX/board_id: on file(s) sysfs-class-infiniband sysfs-class-infiniband.org
2 duplicated entries for /sys/class/leds/<led>/repeat: on file(s) sysfs-class-led-trigger-pattern sysfs-class-led-driver-el15203000
2 duplicated entries for /sys/class/power_supply/<supply_name>/temp_alert_min: on file(s) sysfs-class-power
2 duplicated entries for /sys/class/infiniband/hfi1_X/ports/N/CCMgtA/cc_settings_bin, /sys/class/infiniband/hfi1_X/ports/N/CCMgtA/cc_table_bin, /sys/class/infiniband/hfi1_X/ports/N/CCMgtA/cc_prescan: on file(s) sysfs-class-infiniband sysfs-class-infiniband.org
2 duplicated entries for /sys/class/power_supply/<supply_name>/temp: on file(s) sysfs-class-power
2 duplicated entries for /sys/bus/iio/devices/iio:deviceX/out_current_heater_raw, /sys/bus/iio/devices/iio:deviceX/out_current_heater_raw_available: on file(s) sysfs-bus-iio-humidity-hdc2010 sysfs-bus-iio-humidity-hdc100x
2 duplicated entries for /sys/class/infiniband_mad/abi_version: on file(s) sysfs-class-infiniband sysfs-class-infiniband.org
2 duplicated entries for /sys/class/infiniband/<device>/fw_ver: on file(s) sysfs-class-infiniband sysfs-class-infiniband.org
2 duplicated entries for /sys/class/infiniband/<device>/node_type, /sys/class/infiniband/<device>/node_guid, /sys/class/infiniband/<device>/sys_image_guid: on file(s) sysfs-class-infiniband sysfs-class-infiniband.org
2 duplicated entries for /sys/class/backlight/<backlight>/ambient_light_level: on file(s) sysfs-class-backlight-adp8860 sysfs-class-backlight-driver-adp8870
2 duplicated entries for /sys/bus/iio/devices/iio:deviceX/in_count_quadrature_mode_available: on file(s) sysfs-bus-iio-timer-stm32 sysfs-bus-iio-lptimer-stm32