* Re: [PATCH v2 06/12] mfd: sec: add support for S2MU005 PMIC
From: Sander Vanheule @ 2026-02-20 16:56 UTC (permalink / raw)
To: Kaustabh Chakraborty, André Draszik, Lee Jones, Pavel Machek,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, MyungJoo Ham,
Chanwoo Choi, Sebastian Reichel, Krzysztof Kozlowski,
Alexandre Belloni, Jonathan Corbet, Shuah Khan
Cc: linux-leds, devicetree, linux-kernel, linux-pm, linux-samsung-soc,
linux-rtc, linux-doc
In-Reply-To: <DG74Y3QSCLIO.32Q8ZKCTISXXB@disroot.org>
Hi,
On Thu, 2026-02-05 at 21:02 +0530, Kaustabh Chakraborty wrote:
> On 2026-02-04 15:23 +00:00, André Draszik wrote:
> > On Mon, 2026-01-26 at 00:37 +0530, Kaustabh Chakraborty wrote:
> > > +static const struct regmap_config s2mu005_regmap_config = {
> > > + .reg_bits = 8,
> > > + .val_bits = 8,
> > > +};
> >
> > No cache? And what is the .max_register value?
> >
>
> This was in the previous revision, but I ended up removing it because
> (at least I thought at that time) interfered with interrupts firing in
> some way. The actual issue was unrelated, so I will add it back.
>
> However, there is also another thing I see in logs:
>
> sec-pmic-i2c 2-003d: using zero-initialized flat cache, this may cause
> unexpected behavior
>
> This is due to REGCACHE_FLAT, I am not sure if I should just ignore
> this.
Sorry to be late to the party, but I'm somewhat responsible for that warning, so
allow me to chime in :-)
What you are might have been seeing is REGCACHE_FLAT giving you "cached" values
of 0x0, while the hardware actually has something else. This can cause omitted
writes, existing (bootloader) config to overwritten, etc.
As André suggested, using .num_reg_defaults_raw is a possibility, but then you
have to remember that the register defaults are taken to be what the hardware
state is at that moment, including pre-probe changes. These defaults are used to
seed the cache (so far, so good), but this may break the contract of
regmap_sync() if you ever want to use that after actually resetting the PMIC.
If you want to use the flat cache, I would suggest you use REGCACHE_FLAT_S,
which will track what has already been read from/written to hardware. You will
also need to specifiy .max_register.
I see the other regmap_config-s in this driver also use REGCACHE_FLAT, so you
may want to consider switching those over as well if these are also showing the
new warning.
Best,
Sander
^ permalink raw reply
* Re: [PATCH RFC 02/10] rtc: prepare for struct device member groups becoming a constant array
From: Alexandre Belloni @ 2026-02-20 14:38 UTC (permalink / raw)
To: yanjun.zhu
Cc: Heiner Kallweit, Thomas Weißschuh, Greg Kroah-Hartman,
Rafael J. Wysocki, Danilo Krummrich, Jason Gunthorpe,
Leon Romanovsky, driver-core, Linux Kernel Mailing List,
linux-rdma, linux-rtc
In-Reply-To: <392127ee-11ad-4517-bb72-91af64fd191e@linux.dev>
On 18/02/2026 16:53:00-0800, yanjun.zhu wrote:
> On 2/17/26 2:26 PM, Heiner Kallweit wrote:
> > This prepares for making struct device member groups a constant array.
> > The assignment groups = rtc->dev.groups would result in a "discarding
> > const qualifier" warning with this change.
> > No functional change intended.
> >
> > Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
> > ---
> > drivers/rtc/sysfs.c | 8 ++++----
> > 1 file changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/rtc/sysfs.c b/drivers/rtc/sysfs.c
> > index 4ab05e105a7..ae5e1252b4c 100644
> > --- a/drivers/rtc/sysfs.c
> > +++ b/drivers/rtc/sysfs.c
> > @@ -308,7 +308,7 @@ const struct attribute_group **rtc_get_dev_attribute_groups(void)
> > int rtc_add_groups(struct rtc_device *rtc, const struct attribute_group **grps)
> > {
> > size_t old_cnt = 0, add_cnt = 0, new_cnt;
> > - const struct attribute_group **groups, **old;
> > + const struct attribute_group **groups, *const *old;
> > if (grps) {
> > for (groups = grps; *groups; groups++)
> > @@ -320,9 +320,9 @@ int rtc_add_groups(struct rtc_device *rtc, const struct attribute_group **grps)
> > return -EINVAL;
> > }
> > - groups = rtc->dev.groups;
> > - if (groups)
> > - for (; *groups; groups++)
> > + old = rtc->dev.groups;
> > + if (old)
> > + while (*old++)
> > old_cnt++;
>
> The change from for (; *groups; groups++) to while (*old++) is not
> functionally equivalent. In the while version, the post-increment old++
> executes even when *old is NULL. This leaves the pointer old pointing one
> element past the NULL terminator. While old_cnt remains correct, this is a
> side-effect-heavy idiom that differs from standard kernel patterns and could
> be fragile if old is used later in the function.
>
Thanks for pointing this out, I agree we should keep the original for
loop.
With that change,
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
> Best Regards,
> Zhu Yanjun
>
> > new_cnt = old_cnt + add_cnt + 1;
>
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply
* [PATCH v3] dt-bindings: rtc: isl12026: convert to YAML schema
From: Piyush Patle @ 2026-02-20 8:47 UTC (permalink / raw)
To: Alexandre Belloni
Cc: robh, krzk+dt, conor+dt, linux-rtc, devicetree, linux-kernel
In-Reply-To: <20260220-vigorous-holistic-platypus-6ebebd@quoll>
Convert the ISL12026 RTC binding from text format to YAML schema.
Remove the legacy text binding.
The new schema enables dtbs_check validation.
---
Changes in v2:
- Fixed schema validation issues pointed out in review
- Improved example node formatting
- Removed redundant description text
---
Changes in v3:
- Dropped unnecessary block scalar ('|') in description
- Removed unsupported select section to match existing RTC bindings
- Aligned schema structure with other RTC YAML bindings
- Fixed YAML formatting and dt_binding_check errors
Signed-off-by: Piyush Patle <piyushpatle228@gmail.com>
---
.../devicetree/bindings/rtc/isil,isl12026.txt | 28 --------
.../bindings/rtc/isil,isl12026.yaml | 64 +++++++++++++++++++
2 files changed, 64 insertions(+), 28 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/rtc/isil,isl12026.txt
create mode 100644 Documentation/devicetree/bindings/rtc/isil,isl12026.yaml
diff --git a/Documentation/devicetree/bindings/rtc/isil,isl12026.txt b/Documentation/devicetree/bindings/rtc/isil,isl12026.txt
deleted file mode 100644
index 2e0be45193bb..000000000000
--- a/Documentation/devicetree/bindings/rtc/isil,isl12026.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-ISL12026 I2C RTC/EEPROM
-
-ISL12026 is an I2C RTC/EEPROM combination device. The RTC and control
-registers respond at bus address 0x6f, and the EEPROM array responds
-at bus address 0x57. The canonical "reg" value will be for the RTC portion.
-
-Required properties supported by the device:
-
- - "compatible": must be "isil,isl12026"
- - "reg": I2C bus address of the device (always 0x6f)
-
-Optional properties:
-
- - "isil,pwr-bsw": If present PWR.BSW bit must be set to the specified
- value for proper operation.
-
- - "isil,pwr-sbib": If present PWR.SBIB bit must be set to the specified
- value for proper operation.
-
-
-Example:
-
- rtc@6f {
- compatible = "isil,isl12026";
- reg = <0x6f>;
- isil,pwr-bsw = <0>;
- isil,pwr-sbib = <1>;
- }
diff --git a/Documentation/devicetree/bindings/rtc/isil,isl12026.yaml b/Documentation/devicetree/bindings/rtc/isil,isl12026.yaml
new file mode 100644
index 000000000000..a6822605fd72
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/isil,isl12026.yaml
@@ -0,0 +1,64 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/rtc/isil,isl12026.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Intersil ISL12026 I2C RTC/EEPROM
+
+maintainers:
+ - Piyush Patle <piyushpatle228@gmail.com>
+
+description: |
+ The ISL12026 is a combination RTC and EEPROM device connected via I2C.
+ The RTC and control registers respond at address 0x6f, while the EEPROM
+ array responds at address 0x57. The "reg" property refers to the RTC
+ portion of the device.
+
+select:
+ properties:
+ compatible:
+ const: isil,isl12026
+ required:
+ - compatible
+
+allOf:
+ - $ref: rtc.yaml#
+
+properties:
+ compatible:
+ const: isil,isl12026
+
+ reg:
+ maxItems: 1
+ description: I2C address of the RTC portion (must be 0x6f)
+
+ isil,pwr-bsw:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ Value written to the PWR.BSW bit for proper device operation.
+
+ isil,pwr-sbib:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ Value written to the PWR.SBIB bit for proper device operation.
+
+required:
+ - compatible
+ - reg
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ rtc@6f {
+ compatible = "isil,isl12026";
+ reg = <0x6f>;
+ isil,pwr-bsw = <0>;
+ isil,pwr-sbib = <1>;
+ };
+ };
--
2.34.1
^ permalink raw reply related
* Re: [PATCH v2] dt-bindings: rtc: isl12026: convert to YAML schema
From: Krzysztof Kozlowski @ 2026-02-20 7:48 UTC (permalink / raw)
To: Piyush Patle
Cc: alexandre.belloni, robh, krzk+dt, conor+dt, linux-rtc, devicetree,
linux-kernel
In-Reply-To: <20260219055115.195302-1-piyushpatle228@gmail.com>
On Thu, Feb 19, 2026 at 11:21:15AM +0530, Piyush Patle wrote:
> diff --git a/Documentation/devicetree/bindings/rtc/isil,isl12026.yaml b/Documentation/devicetree/bindings/rtc/isil,isl12026.yaml
> new file mode 100644
> index 000000000000..a6822605fd72
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/rtc/isil,isl12026.yaml
> @@ -0,0 +1,64 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/rtc/isil,isl12026.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Intersil ISL12026 I2C RTC/EEPROM
> +
> +maintainers:
> + - Piyush Patle <piyushpatle228@gmail.com>
> +
> +description: |
Do not need '|' unless you need to preserve formatting.
> + The ISL12026 is a combination RTC and EEPROM device connected via I2C.
> + The RTC and control registers respond at address 0x6f, while the EEPROM
> + array responds at address 0x57. The "reg" property refers to the RTC
> + portion of the device.
> +
> +select:
> + properties:
> + compatible:
> + const: isil,isl12026
> + required:
> + - compatible
Why do you have this select? Look at existing bindings - NONE have that.
Just in case if that was not obvious: don't send us AI microslop.
> +
> +allOf:
> + - $ref: rtc.yaml#
Best regards,
Krzysztof
^ permalink raw reply
* [PATCH v2] dt-bindings: rtc: isl12026: convert to YAML schema
From: Piyush Patle @ 2026-02-19 5:51 UTC (permalink / raw)
To: alexandre.belloni, robh, krzk+dt, conor+dt
Cc: linux-rtc, devicetree, linux-kernel
Convert the ISL12026 RTC binding from text format to YAML schema.
Remove the legacy text binding.
The new schema enables dtbs_check validation.
---
Changes in v2:
- Fixed schema validation issues pointed out in review
- Improved example node formatting
- Removed redundant description text
Signed-off-by: Piyush Patle <piyushpatle228@gmail.com>
---
.../devicetree/bindings/rtc/isil,isl12026.txt | 28 --------
.../bindings/rtc/isil,isl12026.yaml | 64 +++++++++++++++++++
2 files changed, 64 insertions(+), 28 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/rtc/isil,isl12026.txt
create mode 100644 Documentation/devicetree/bindings/rtc/isil,isl12026.yaml
diff --git a/Documentation/devicetree/bindings/rtc/isil,isl12026.txt b/Documentation/devicetree/bindings/rtc/isil,isl12026.txt
deleted file mode 100644
index 2e0be45193bb..000000000000
--- a/Documentation/devicetree/bindings/rtc/isil,isl12026.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-ISL12026 I2C RTC/EEPROM
-
-ISL12026 is an I2C RTC/EEPROM combination device. The RTC and control
-registers respond at bus address 0x6f, and the EEPROM array responds
-at bus address 0x57. The canonical "reg" value will be for the RTC portion.
-
-Required properties supported by the device:
-
- - "compatible": must be "isil,isl12026"
- - "reg": I2C bus address of the device (always 0x6f)
-
-Optional properties:
-
- - "isil,pwr-bsw": If present PWR.BSW bit must be set to the specified
- value for proper operation.
-
- - "isil,pwr-sbib": If present PWR.SBIB bit must be set to the specified
- value for proper operation.
-
-
-Example:
-
- rtc@6f {
- compatible = "isil,isl12026";
- reg = <0x6f>;
- isil,pwr-bsw = <0>;
- isil,pwr-sbib = <1>;
- }
diff --git a/Documentation/devicetree/bindings/rtc/isil,isl12026.yaml b/Documentation/devicetree/bindings/rtc/isil,isl12026.yaml
new file mode 100644
index 000000000000..a6822605fd72
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/isil,isl12026.yaml
@@ -0,0 +1,64 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/rtc/isil,isl12026.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Intersil ISL12026 I2C RTC/EEPROM
+
+maintainers:
+ - Piyush Patle <piyushpatle228@gmail.com>
+
+description: |
+ The ISL12026 is a combination RTC and EEPROM device connected via I2C.
+ The RTC and control registers respond at address 0x6f, while the EEPROM
+ array responds at address 0x57. The "reg" property refers to the RTC
+ portion of the device.
+
+select:
+ properties:
+ compatible:
+ const: isil,isl12026
+ required:
+ - compatible
+
+allOf:
+ - $ref: rtc.yaml#
+
+properties:
+ compatible:
+ const: isil,isl12026
+
+ reg:
+ maxItems: 1
+ description: I2C address of the RTC portion (must be 0x6f)
+
+ isil,pwr-bsw:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ Value written to the PWR.BSW bit for proper device operation.
+
+ isil,pwr-sbib:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ Value written to the PWR.SBIB bit for proper device operation.
+
+required:
+ - compatible
+ - reg
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ rtc@6f {
+ compatible = "isil,isl12026";
+ reg = <0x6f>;
+ isil,pwr-bsw = <0>;
+ isil,pwr-sbib = <1>;
+ };
+ };
--
2.34.1
^ permalink raw reply related
* Re: [PATCH RFC 02/10] rtc: prepare for struct device member groups becoming a constant array
From: yanjun.zhu @ 2026-02-19 0:53 UTC (permalink / raw)
To: Heiner Kallweit, Thomas Weißschuh, Greg Kroah-Hartman,
Rafael J. Wysocki, Danilo Krummrich, Jason Gunthorpe,
Leon Romanovsky, Alexandre Belloni
Cc: driver-core, Linux Kernel Mailing List, linux-rdma, linux-rtc
In-Reply-To: <95e5af90-ed53-4009-a4ea-19ed04499ecc@kernel.org>
On 2/17/26 2:26 PM, Heiner Kallweit wrote:
> This prepares for making struct device member groups a constant array.
> The assignment groups = rtc->dev.groups would result in a "discarding
> const qualifier" warning with this change.
> No functional change intended.
>
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
> ---
> drivers/rtc/sysfs.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/rtc/sysfs.c b/drivers/rtc/sysfs.c
> index 4ab05e105a7..ae5e1252b4c 100644
> --- a/drivers/rtc/sysfs.c
> +++ b/drivers/rtc/sysfs.c
> @@ -308,7 +308,7 @@ const struct attribute_group **rtc_get_dev_attribute_groups(void)
> int rtc_add_groups(struct rtc_device *rtc, const struct attribute_group **grps)
> {
> size_t old_cnt = 0, add_cnt = 0, new_cnt;
> - const struct attribute_group **groups, **old;
> + const struct attribute_group **groups, *const *old;
>
> if (grps) {
> for (groups = grps; *groups; groups++)
> @@ -320,9 +320,9 @@ int rtc_add_groups(struct rtc_device *rtc, const struct attribute_group **grps)
> return -EINVAL;
> }
>
> - groups = rtc->dev.groups;
> - if (groups)
> - for (; *groups; groups++)
> + old = rtc->dev.groups;
> + if (old)
> + while (*old++)
> old_cnt++;
The change from for (; *groups; groups++) to while (*old++) is not
functionally equivalent. In the while version, the post-increment old++
executes even when *old is NULL. This leaves the pointer old pointing
one element past the NULL terminator. While old_cnt remains correct,
this is a side-effect-heavy idiom that differs from standard kernel
patterns and could be fragile if old is used later in the function.
Best Regards,
Zhu Yanjun
>
> new_cnt = old_cnt + add_cnt + 1;
^ permalink raw reply
* Re: [PATCH] dt-bindings: rtc: isl12026: convert to YAML schema
From: Rob Herring (Arm) @ 2026-02-18 20:27 UTC (permalink / raw)
To: Piyush Patle
Cc: krzk+dt, linux-rtc, devicetree, conor+dt, linux-kernel,
alexandre.belloni
In-Reply-To: <20260218190213.429892-1-piyushpatle228@gmail.com>
On Thu, 19 Feb 2026 00:32:13 +0530, Piyush Patle wrote:
> Convert the ISL12026 RTC binding to DT schema format.
>
> The binding was previously documented in text format.
> This converts it to YAML and enables dtbs_check validation.
>
> Signed-off-by: Piyush Patle <piyushpatle228@gmail.com>
> ---
> .../bindings/rtc/isil,isl12026.yaml | 57 +++++++++++++++++++
> 1 file changed, 57 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/rtc/isil,isl12026.yaml
>
My bot found errors running 'make dt_binding_check' on your patch:
yamllint warnings/errors:
./Documentation/devicetree/bindings/rtc/isil,isl12026.yaml:4:6: [error] string value is redundantly quoted with any quotes (quoted-strings)
./Documentation/devicetree/bindings/rtc/isil,isl12026.yaml:5:10: [error] string value is redundantly quoted with any quotes (quoted-strings)
dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/rtc/isil,isl12026.yaml: maintainers:0: 'Piyush Patle piyushpatle228@gmail.com' does not match '^(.+ <[\\S]+@[\\S]+>|[\\S]+@[\\S]+)$'
from schema $id: http://devicetree.org/meta-schemas/base.yaml
doc reference errors (make refcheckdocs):
See https://patchwork.kernel.org/project/devicetree/patch/20260218190213.429892-1-piyushpatle228@gmail.com
The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
^ permalink raw reply
* Re: [PATCH] dt-bindings: rtc: isl12026: convert to YAML schema
From: Krzysztof Kozlowski @ 2026-02-18 19:20 UTC (permalink / raw)
To: Piyush Patle, alexandre.belloni
Cc: robh, krzk+dt, conor+dt, linux-rtc, devicetree, linux-kernel
In-Reply-To: <20260218190213.429892-1-piyushpatle228@gmail.com>
On 18/02/2026 20:02, Piyush Patle wrote:
> Convert the ISL12026 RTC binding to DT schema format.
>
> The binding was previously documented in text format.
> This converts it to YAML and enables dtbs_check validation.
You already said it in the first sentence.
>
> Signed-off-by: Piyush Patle <piyushpatle228@gmail.com>
> ---
> .../bindings/rtc/isil,isl12026.yaml | 57 +++++++++++++++++++
Where is the conversion?
Best regards,
Krzysztof
^ permalink raw reply
* [PATCH] dt-bindings: rtc: isl12026: convert to YAML schema
From: Piyush Patle @ 2026-02-18 19:02 UTC (permalink / raw)
To: alexandre.belloni
Cc: robh, krzk+dt, conor+dt, linux-rtc, devicetree, linux-kernel
Convert the ISL12026 RTC binding to DT schema format.
The binding was previously documented in text format.
This converts it to YAML and enables dtbs_check validation.
Signed-off-by: Piyush Patle <piyushpatle228@gmail.com>
---
.../bindings/rtc/isil,isl12026.yaml | 57 +++++++++++++++++++
1 file changed, 57 insertions(+)
create mode 100644 Documentation/devicetree/bindings/rtc/isil,isl12026.yaml
diff --git a/Documentation/devicetree/bindings/rtc/isil,isl12026.yaml b/Documentation/devicetree/bindings/rtc/isil,isl12026.yaml
new file mode 100644
index 000000000000..5f0ac73b1fde
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/isil,isl12026.yaml
@@ -0,0 +1,57 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/rtc/isil,isl12026.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Intersil ISL12026 I2C RTC/EEPROM
+
+maintainers:
+ - Piyush Patle piyushpatle228@gmail.com
+
+description: |
+ The ISL12026 is a combination RTC and EEPROM device connected via I2C.
+ The RTC and control registers respond at address 0x6f, while the EEPROM
+ array responds at address 0x57. The "reg" property refers to the RTC
+ portion of the device.
+
+allOf:
+ - $ref: rtc.yaml#
+
+properties:
+ compatible:
+ const: isil,isl12026
+
+ reg:
+ maxItems: 1
+ description: I2C address of the RTC portion (must be 0x6f)
+
+ isil,pwr-bsw:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ Value written to the PWR.BSW bit for proper device operation.
+
+ isil,pwr-sbib:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ Value written to the PWR.SBIB bit for proper device operation.
+
+required:
+ - compatible
+ - reg
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ rtc@6f {
+ compatible = "isil,isl12026";
+ reg = <0x6f>;
+ isil,pwr-bsw = <0>;
+ isil,pwr-sbib = <1>;
+ };
+ };
--
2.34.1
^ permalink raw reply related
* Re: [PATCH RFC 01/10] IB/core: Prepare for immutable device groups
From: Leon Romanovsky @ 2026-02-18 8:54 UTC (permalink / raw)
To: Heiner Kallweit
Cc: Thomas Weißschuh, Greg Kroah-Hartman, Rafael J. Wysocki,
Danilo Krummrich, Jason Gunthorpe, Alexandre Belloni, driver-core,
Linux Kernel Mailing List, linux-rdma, linux-rtc
In-Reply-To: <0f7f4ffa-1465-4c54-8d3d-e9b551136669@kernel.org>
On Tue, Feb 17, 2026 at 11:25:20PM +0100, Heiner Kallweit wrote:
> This prepares for making struct device member groups a constant array.
> No functional change intended.
>
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
> ---
> drivers/infiniband/core/device.c | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
>
Thanks,
Acked-by: Leon Romanovsky <leon@kernel.org>
^ permalink raw reply
* [PATCH RFC 10/10] kobject: make struct kobject member default_groups a constant array
From: Heiner Kallweit @ 2026-02-17 22:32 UTC (permalink / raw)
To: Thomas Weißschuh, Greg Kroah-Hartman, Rafael J. Wysocki,
Danilo Krummrich, Jason Gunthorpe, Leon Romanovsky,
Alexandre Belloni
Cc: driver-core, Linux Kernel Mailing List, linux-rdma, linux-rtc
In-Reply-To: <5d0951ec-42c9-453f-9966-ecca593c4153@kernel.org>
Constify the default_groups array, allowing to assign constant arrays.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
include/linux/kobject.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/kobject.h b/include/linux/kobject.h
index c8219505a79..e45ee843931 100644
--- a/include/linux/kobject.h
+++ b/include/linux/kobject.h
@@ -116,7 +116,7 @@ char *kobject_get_path(const struct kobject *kobj, gfp_t flag);
struct kobj_type {
void (*release)(struct kobject *kobj);
const struct sysfs_ops *sysfs_ops;
- const struct attribute_group **default_groups;
+ const struct attribute_group *const *default_groups;
const struct kobj_ns_type_operations *(*child_ns_type)(const struct kobject *kobj);
const void *(*namespace)(const struct kobject *kobj);
void (*get_ownership)(const struct kobject *kobj, kuid_t *uid, kgid_t *gid);
--
2.53.0
^ permalink raw reply related
* [PATCH RFC 09/10] driver core: make struct device_driver groups members contact arrays
From: Heiner Kallweit @ 2026-02-17 22:31 UTC (permalink / raw)
To: Thomas Weißschuh, Greg Kroah-Hartman, Rafael J. Wysocki,
Danilo Krummrich, Jason Gunthorpe, Leon Romanovsky,
Alexandre Belloni
Cc: driver-core, Linux Kernel Mailing List, linux-rdma, linux-rtc
In-Reply-To: <5d0951ec-42c9-453f-9966-ecca593c4153@kernel.org>
Constify the groups arrays, allowing to assign constant arrays.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
include/linux/device/driver.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/device/driver.h b/include/linux/device/driver.h
index bbc67ec513e..c882daaef01 100644
--- a/include/linux/device/driver.h
+++ b/include/linux/device/driver.h
@@ -114,8 +114,8 @@ struct device_driver {
void (*shutdown) (struct device *dev);
int (*suspend) (struct device *dev, pm_message_t state);
int (*resume) (struct device *dev);
- const struct attribute_group **groups;
- const struct attribute_group **dev_groups;
+ const struct attribute_group *const *groups;
+ const struct attribute_group *const *dev_groups;
const struct dev_pm_ops *pm;
void (*coredump) (struct device *dev);
--
2.53.0
^ permalink raw reply related
* [PATCH RFC 08/10] driver core: make struct class groups members constant arrays
From: Heiner Kallweit @ 2026-02-17 22:30 UTC (permalink / raw)
To: Thomas Weißschuh, Greg Kroah-Hartman, Rafael J. Wysocki,
Danilo Krummrich, Jason Gunthorpe, Leon Romanovsky,
Alexandre Belloni
Cc: driver-core, Linux Kernel Mailing List, linux-rdma, linux-rtc
In-Reply-To: <5d0951ec-42c9-453f-9966-ecca593c4153@kernel.org>
Constify the groups arrays, allowing to assign constant arrays.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
include/linux/device/class.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/device/class.h b/include/linux/device/class.h
index 65880e60c72..2079239a5aa 100644
--- a/include/linux/device/class.h
+++ b/include/linux/device/class.h
@@ -50,8 +50,8 @@ struct fwnode_handle;
struct class {
const char *name;
- const struct attribute_group **class_groups;
- const struct attribute_group **dev_groups;
+ const struct attribute_group *const *class_groups;
+ const struct attribute_group *const *dev_groups;
int (*dev_uevent)(const struct device *dev, struct kobj_uevent_env *env);
char *(*devnode)(const struct device *dev, umode_t *mode);
--
2.53.0
^ permalink raw reply related
* [PATCH RFC 07/10] driver core: make struct bus_type groups members constant arrays
From: Heiner Kallweit @ 2026-02-17 22:30 UTC (permalink / raw)
To: Thomas Weißschuh, Greg Kroah-Hartman, Rafael J. Wysocki,
Danilo Krummrich, Jason Gunthorpe, Leon Romanovsky,
Alexandre Belloni
Cc: driver-core, Linux Kernel Mailing List, linux-rdma, linux-rtc
In-Reply-To: <5d0951ec-42c9-453f-9966-ecca593c4153@kernel.org>
Constify the groupss arrays, allowing to assign constant arrays.
As a prerequisite this requires to constify the groups array argument
in few functions.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
drivers/base/base.h | 6 ++++--
drivers/base/driver.c | 4 ++--
include/linux/device/bus.h | 6 +++---
3 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/drivers/base/base.h b/drivers/base/base.h
index 8c2175820da..b6852ba45cd 100644
--- a/drivers/base/base.h
+++ b/drivers/base/base.h
@@ -202,8 +202,10 @@ static inline void dev_sync_state(struct device *dev)
dev->driver->sync_state(dev);
}
-int driver_add_groups(const struct device_driver *drv, const struct attribute_group **groups);
-void driver_remove_groups(const struct device_driver *drv, const struct attribute_group **groups);
+int driver_add_groups(const struct device_driver *drv,
+ const struct attribute_group *const *groups);
+void driver_remove_groups(const struct device_driver *drv,
+ const struct attribute_group *const *groups);
void device_driver_detach(struct device *dev);
static inline void device_set_driver(struct device *dev, const struct device_driver *drv)
diff --git a/drivers/base/driver.c b/drivers/base/driver.c
index 8ab010ddf70..c5ebf1fdad7 100644
--- a/drivers/base/driver.c
+++ b/drivers/base/driver.c
@@ -203,13 +203,13 @@ void driver_remove_file(const struct device_driver *drv,
EXPORT_SYMBOL_GPL(driver_remove_file);
int driver_add_groups(const struct device_driver *drv,
- const struct attribute_group **groups)
+ const struct attribute_group *const *groups)
{
return sysfs_create_groups(&drv->p->kobj, groups);
}
void driver_remove_groups(const struct device_driver *drv,
- const struct attribute_group **groups)
+ const struct attribute_group *const *groups)
{
sysfs_remove_groups(&drv->p->kobj, groups);
}
diff --git a/include/linux/device/bus.h b/include/linux/device/bus.h
index 99c3c83ea52..00d8a080f93 100644
--- a/include/linux/device/bus.h
+++ b/include/linux/device/bus.h
@@ -78,9 +78,9 @@ struct fwnode_handle;
struct bus_type {
const char *name;
const char *dev_name;
- const struct attribute_group **bus_groups;
- const struct attribute_group **dev_groups;
- const struct attribute_group **drv_groups;
+ const struct attribute_group *const *bus_groups;
+ const struct attribute_group *const *dev_groups;
+ const struct attribute_group *const *drv_groups;
int (*match)(struct device *dev, const struct device_driver *drv);
int (*uevent)(const struct device *dev, struct kobj_uevent_env *env);
--
2.53.0
^ permalink raw reply related
* [PATCH RFC 06/10] driver core: make struct device_type member groups a constant array
From: Heiner Kallweit @ 2026-02-17 22:29 UTC (permalink / raw)
To: Thomas Weißschuh, Greg Kroah-Hartman, Rafael J. Wysocki,
Danilo Krummrich, Jason Gunthorpe, Leon Romanovsky,
Alexandre Belloni
Cc: driver-core, Linux Kernel Mailing List, linux-rdma, linux-rtc
In-Reply-To: <5d0951ec-42c9-453f-9966-ecca593c4153@kernel.org>
Constify the groups array, allowing to assign constant arrays.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
include/linux/device.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/device.h b/include/linux/device.h
index bfa2ca603c2..808f723bbcf 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -87,7 +87,7 @@ int subsys_virtual_register(const struct bus_type *subsys,
*/
struct device_type {
const char *name;
- const struct attribute_group **groups;
+ const struct attribute_group *const *groups;
int (*uevent)(const struct device *dev, struct kobj_uevent_env *env);
char *(*devnode)(const struct device *dev, umode_t *mode,
kuid_t *uid, kgid_t *gid);
--
2.53.0
^ permalink raw reply related
* [PATCH RFC 05/10] driver core: make struct device member groups a constant array
From: Heiner Kallweit @ 2026-02-17 22:28 UTC (permalink / raw)
To: Thomas Weißschuh, Greg Kroah-Hartman, Rafael J. Wysocki,
Danilo Krummrich, Jason Gunthorpe, Leon Romanovsky,
Alexandre Belloni
Cc: driver-core, Linux Kernel Mailing List, linux-rdma, linux-rtc
In-Reply-To: <5d0951ec-42c9-453f-9966-ecca593c4153@kernel.org>
Constify the groups array, allowing to assign constant arrays.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
include/linux/device.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/device.h b/include/linux/device.h
index 48a0444ccc1..bfa2ca603c2 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -640,7 +640,7 @@ struct device {
struct list_head devres_head;
const struct class *class;
- const struct attribute_group **groups; /* optional groups */
+ const struct attribute_group *const *groups; /* optional groups */
void (*release)(struct device *dev);
struct iommu_group *iommu_group;
--
2.53.0
^ permalink raw reply related
* [PATCH RFC 04/10] driver: core: constify groups array argument in device_add_groups and device_remove_groups
From: Heiner Kallweit @ 2026-02-17 22:28 UTC (permalink / raw)
To: Thomas Weißschuh, Greg Kroah-Hartman, Rafael J. Wysocki,
Danilo Krummrich, Jason Gunthorpe, Leon Romanovsky,
Alexandre Belloni
Cc: driver-core, Linux Kernel Mailing List, linux-rdma, linux-rtc
In-Reply-To: <5d0951ec-42c9-453f-9966-ecca593c4153@kernel.org>
Now that sysfs_create_groups() and sysfs_remove_groups() allow to
pass constant groups arrays, we can constify the groups array argument
also here.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
drivers/base/core.c | 5 +++--
include/linux/device.h | 4 ++--
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/base/core.c b/drivers/base/core.c
index f599a1384ee..4db63b2603c 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -2831,14 +2831,15 @@ static ssize_t removable_show(struct device *dev, struct device_attribute *attr,
}
static DEVICE_ATTR_RO(removable);
-int device_add_groups(struct device *dev, const struct attribute_group **groups)
+int device_add_groups(struct device *dev,
+ const struct attribute_group *const *groups)
{
return sysfs_create_groups(&dev->kobj, groups);
}
EXPORT_SYMBOL_GPL(device_add_groups);
void device_remove_groups(struct device *dev,
- const struct attribute_group **groups)
+ const struct attribute_group *const *groups)
{
sysfs_remove_groups(&dev->kobj, groups);
}
diff --git a/include/linux/device.h b/include/linux/device.h
index 0be95294b6e..48a0444ccc1 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -1131,9 +1131,9 @@ device_create_with_groups(const struct class *cls, struct device *parent, dev_t
void device_destroy(const struct class *cls, dev_t devt);
int __must_check device_add_groups(struct device *dev,
- const struct attribute_group **groups);
+ const struct attribute_group *const *groups);
void device_remove_groups(struct device *dev,
- const struct attribute_group **groups);
+ const struct attribute_group *const *groups);
static inline int __must_check device_add_group(struct device *dev,
const struct attribute_group *grp)
--
2.53.0
^ permalink raw reply related
* [PATCH RFC 03/10] sysfs: constify group arrays in function arguments
From: Heiner Kallweit @ 2026-02-17 22:27 UTC (permalink / raw)
To: Thomas Weißschuh, Greg Kroah-Hartman, Rafael J. Wysocki,
Danilo Krummrich, Jason Gunthorpe, Leon Romanovsky,
Alexandre Belloni
Cc: driver-core, Linux Kernel Mailing List, linux-rdma, linux-rtc
In-Reply-To: <5d0951ec-42c9-453f-9966-ecca593c4153@kernel.org>
Constify the groups array argument where applicable. This allows to
pass constant arrays as arguments.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
fs/sysfs/group.c | 10 +++++-----
include/linux/sysfs.h | 16 ++++++++--------
2 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/fs/sysfs/group.c b/fs/sysfs/group.c
index e1e639f515a..b3edae0578c 100644
--- a/fs/sysfs/group.c
+++ b/fs/sysfs/group.c
@@ -217,7 +217,7 @@ int sysfs_create_group(struct kobject *kobj,
EXPORT_SYMBOL_GPL(sysfs_create_group);
static int internal_create_groups(struct kobject *kobj, int update,
- const struct attribute_group **groups)
+ const struct attribute_group *const *groups)
{
int error = 0;
int i;
@@ -250,7 +250,7 @@ static int internal_create_groups(struct kobject *kobj, int update,
* Returns 0 on success or error code from sysfs_create_group on failure.
*/
int sysfs_create_groups(struct kobject *kobj,
- const struct attribute_group **groups)
+ const struct attribute_group *const *groups)
{
return internal_create_groups(kobj, 0, groups);
}
@@ -268,7 +268,7 @@ EXPORT_SYMBOL_GPL(sysfs_create_groups);
* Returns 0 on success or error code from sysfs_update_group on failure.
*/
int sysfs_update_groups(struct kobject *kobj,
- const struct attribute_group **groups)
+ const struct attribute_group *const *groups)
{
return internal_create_groups(kobj, 1, groups);
}
@@ -342,7 +342,7 @@ EXPORT_SYMBOL_GPL(sysfs_remove_group);
* If groups is not NULL, remove the specified groups from the kobject.
*/
void sysfs_remove_groups(struct kobject *kobj,
- const struct attribute_group **groups)
+ const struct attribute_group *const *groups)
{
int i;
@@ -613,7 +613,7 @@ EXPORT_SYMBOL_GPL(sysfs_group_change_owner);
* Returns 0 on success or error code on failure.
*/
int sysfs_groups_change_owner(struct kobject *kobj,
- const struct attribute_group **groups,
+ const struct attribute_group *const *groups,
kuid_t kuid, kgid_t kgid)
{
int error = 0, i;
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h
index c33a96b7391..445869ce0f4 100644
--- a/include/linux/sysfs.h
+++ b/include/linux/sysfs.h
@@ -445,15 +445,15 @@ void sysfs_delete_link(struct kobject *dir, struct kobject *targ,
int __must_check sysfs_create_group(struct kobject *kobj,
const struct attribute_group *grp);
int __must_check sysfs_create_groups(struct kobject *kobj,
- const struct attribute_group **groups);
+ const struct attribute_group *const *groups);
int __must_check sysfs_update_groups(struct kobject *kobj,
- const struct attribute_group **groups);
+ const struct attribute_group *const *groups);
int sysfs_update_group(struct kobject *kobj,
const struct attribute_group *grp);
void sysfs_remove_group(struct kobject *kobj,
const struct attribute_group *grp);
void sysfs_remove_groups(struct kobject *kobj,
- const struct attribute_group **groups);
+ const struct attribute_group *const *groups);
int sysfs_add_file_to_group(struct kobject *kobj,
const struct attribute *attr, const char *group);
void sysfs_remove_file_from_group(struct kobject *kobj,
@@ -486,7 +486,7 @@ int sysfs_change_owner(struct kobject *kobj, kuid_t kuid, kgid_t kgid);
int sysfs_link_change_owner(struct kobject *kobj, struct kobject *targ,
const char *name, kuid_t kuid, kgid_t kgid);
int sysfs_groups_change_owner(struct kobject *kobj,
- const struct attribute_group **groups,
+ const struct attribute_group *const *groups,
kuid_t kuid, kgid_t kgid);
int sysfs_group_change_owner(struct kobject *kobj,
const struct attribute_group *groups, kuid_t kuid,
@@ -629,13 +629,13 @@ static inline int sysfs_create_group(struct kobject *kobj,
}
static inline int sysfs_create_groups(struct kobject *kobj,
- const struct attribute_group **groups)
+ const struct attribute_group *const *groups)
{
return 0;
}
static inline int sysfs_update_groups(struct kobject *kobj,
- const struct attribute_group **groups)
+ const struct attribute_group *const *groups)
{
return 0;
}
@@ -652,7 +652,7 @@ static inline void sysfs_remove_group(struct kobject *kobj,
}
static inline void sysfs_remove_groups(struct kobject *kobj,
- const struct attribute_group **groups)
+ const struct attribute_group *const *groups)
{
}
@@ -733,7 +733,7 @@ static inline int sysfs_change_owner(struct kobject *kobj, kuid_t kuid, kgid_t k
}
static inline int sysfs_groups_change_owner(struct kobject *kobj,
- const struct attribute_group **groups,
+ const struct attribute_group *const *groups,
kuid_t kuid, kgid_t kgid)
{
return 0;
--
2.53.0
^ permalink raw reply related
* [PATCH RFC 02/10] rtc: prepare for struct device member groups becoming a constant array
From: Heiner Kallweit @ 2026-02-17 22:26 UTC (permalink / raw)
To: Thomas Weißschuh, Greg Kroah-Hartman, Rafael J. Wysocki,
Danilo Krummrich, Jason Gunthorpe, Leon Romanovsky,
Alexandre Belloni
Cc: driver-core, Linux Kernel Mailing List, linux-rdma, linux-rtc
In-Reply-To: <5d0951ec-42c9-453f-9966-ecca593c4153@kernel.org>
This prepares for making struct device member groups a constant array.
The assignment groups = rtc->dev.groups would result in a "discarding
const qualifier" warning with this change.
No functional change intended.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
drivers/rtc/sysfs.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/rtc/sysfs.c b/drivers/rtc/sysfs.c
index 4ab05e105a7..ae5e1252b4c 100644
--- a/drivers/rtc/sysfs.c
+++ b/drivers/rtc/sysfs.c
@@ -308,7 +308,7 @@ const struct attribute_group **rtc_get_dev_attribute_groups(void)
int rtc_add_groups(struct rtc_device *rtc, const struct attribute_group **grps)
{
size_t old_cnt = 0, add_cnt = 0, new_cnt;
- const struct attribute_group **groups, **old;
+ const struct attribute_group **groups, *const *old;
if (grps) {
for (groups = grps; *groups; groups++)
@@ -320,9 +320,9 @@ int rtc_add_groups(struct rtc_device *rtc, const struct attribute_group **grps)
return -EINVAL;
}
- groups = rtc->dev.groups;
- if (groups)
- for (; *groups; groups++)
+ old = rtc->dev.groups;
+ if (old)
+ while (*old++)
old_cnt++;
new_cnt = old_cnt + add_cnt + 1;
--
2.53.0
^ permalink raw reply related
* [PATCH RFC 01/10] IB/core: Prepare for immutable device groups
From: Heiner Kallweit @ 2026-02-17 22:25 UTC (permalink / raw)
To: Thomas Weißschuh, Greg Kroah-Hartman, Rafael J. Wysocki,
Danilo Krummrich, Jason Gunthorpe, Leon Romanovsky,
Alexandre Belloni
Cc: driver-core, Linux Kernel Mailing List, linux-rdma, linux-rtc
In-Reply-To: <5d0951ec-42c9-453f-9966-ecca593c4153@kernel.org>
This prepares for making struct device member groups a constant array.
No functional change intended.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
drivers/infiniband/core/device.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c
index 1174ab7da62..f967ad534fc 100644
--- a/drivers/infiniband/core/device.c
+++ b/drivers/infiniband/core/device.c
@@ -565,15 +565,14 @@ static void rdma_init_coredev(struct ib_core_device *coredev,
*/
BUILD_BUG_ON(offsetof(struct ib_device, coredev.dev) !=
offsetof(struct ib_device, dev));
-
- coredev->dev.class = &ib_class;
- coredev->dev.groups = dev->groups;
-
/*
* Don't expose hw counters outside of the init namespace.
*/
if (!is_full_dev && dev->hw_stats_attr_index)
- coredev->dev.groups[dev->hw_stats_attr_index] = NULL;
+ dev->groups[dev->hw_stats_attr_index] = NULL;
+
+ coredev->dev.class = &ib_class;
+ coredev->dev.groups = dev->groups;
device_initialize(&coredev->dev);
coredev->owner = dev;
--
2.53.0
^ permalink raw reply related
* [PATCH RFC 00/10] driver core: constify groups arrays in several structs
From: Heiner Kallweit @ 2026-02-17 22:24 UTC (permalink / raw)
To: Thomas Weißschuh, Greg Kroah-Hartman, Rafael J. Wysocki,
Danilo Krummrich, Jason Gunthorpe, Leon Romanovsky,
Alexandre Belloni
Cc: driver-core, Linux Kernel Mailing List, linux-rdma, linux-rtc
This series constifies the attribute group groups arrays in a number
of structs, plus some preparation work. This allows to assign constant
arrays, w/o "discards const qualifier" compiler warning.
This is a step towards to goal to e.g. create constant arrays in macro
__ATTRIBUTE_GROUPS().
There may be drivers not covered by my test scenarios which conflict
with this series. Therefore I send it as RFC for now.
Hopefully some CI checking this series provides additional hints.
Heiner Kallweit (10):
IB/core: Prepare for immutable device groups
rtc: prepare for struct device member groups becoming a constant array
sysfs: constify group arrays in function arguments
driver: core: constify groups array argument in device_add_groups and
device_remove_groups
driver core: make struct device member groups a constant array
driver core: make struct device_type member groups a constant array
driver core: make struct bus_type groups members constant arrays
driver core: make struct class groups members constant arrays
driver core: make struct device_driver groups members contact arrays
kobject: make struct kobject member default_groups a constant array
drivers/base/base.h | 6 ++++--
drivers/base/core.c | 5 +++--
drivers/base/driver.c | 4 ++--
drivers/infiniband/core/device.c | 9 ++++-----
drivers/rtc/sysfs.c | 8 ++++----
fs/sysfs/group.c | 10 +++++-----
include/linux/device.h | 8 ++++----
include/linux/device/bus.h | 6 +++---
include/linux/device/class.h | 4 ++--
include/linux/device/driver.h | 4 ++--
include/linux/kobject.h | 2 +-
include/linux/sysfs.h | 16 ++++++++--------
12 files changed, 42 insertions(+), 40 deletions(-)
--
2.53.0
^ permalink raw reply
* Re: [PATCH v1 1/2] dt-bindings: mfd: maxim,max77686: document optional RTC address
From: Krzysztof Kozlowski @ 2026-02-12 11:27 UTC (permalink / raw)
To: Svyatoslav Ryhel, Chanwoo Choi, Lee Jones, Rob Herring,
Conor Dooley, Alexandre Belloni
Cc: linux-kernel, devicetree, linux-rtc
In-Reply-To: <8E149750-19F1-4274-BD24-B13ED47D1D51@gmail.com>
On 12/02/2026 09:08, Svyatoslav Ryhel wrote:
>
>
> 12 лютого 2026 р. 09:26:33 GMT+02:00, Krzysztof Kozlowski <krzk@kernel.org> пише:
>> On 11/02/2026 19:49, Svyatoslav Ryhel wrote:
>>> Document an optional second I2C address for the PMIC's RTC device, to be
>>> used if the RTC is located at a non-default I2C address
>>
>> MAX77686 did not allow changing the I2C address and there are no other
>> devices in the bindings.
>>
>
> That is true, MAX77663 RTC does this, should I adjust Documentation/devicetree/bindings/mfd/max77620.txt instead?
I don't know which binding you should update instead, but I know that it
must not be max77686. Please update the binding for the device you are
actually changing, not some other devices.
Best regards,
Krzysztof
^ permalink raw reply
* Re: [PATCH v1 1/2] dt-bindings: mfd: maxim,max77686: document optional RTC address
From: Svyatoslav Ryhel @ 2026-02-12 8:08 UTC (permalink / raw)
To: Krzysztof Kozlowski, Chanwoo Choi, Lee Jones, Rob Herring,
Conor Dooley, Alexandre Belloni
Cc: linux-kernel, devicetree, linux-rtc
In-Reply-To: <a58587d3-65ec-4d40-aab9-dca08278c2f2@kernel.org>
12 лютого 2026 р. 09:26:33 GMT+02:00, Krzysztof Kozlowski <krzk@kernel.org> пише:
>On 11/02/2026 19:49, Svyatoslav Ryhel wrote:
>> Document an optional second I2C address for the PMIC's RTC device, to be
>> used if the RTC is located at a non-default I2C address
>
>MAX77686 did not allow changing the I2C address and there are no other
>devices in the bindings.
>
That is true, MAX77663 RTC does this, should I adjust Documentation/devicetree/bindings/mfd/max77620.txt instead?
>
>Best regards,
>Krzysztof
^ permalink raw reply
* Re: [PATCH v1 1/2] dt-bindings: mfd: maxim,max77686: document optional RTC address
From: Krzysztof Kozlowski @ 2026-02-12 7:26 UTC (permalink / raw)
To: Svyatoslav Ryhel, Chanwoo Choi, Lee Jones, Rob Herring,
Conor Dooley, Alexandre Belloni
Cc: linux-kernel, devicetree, linux-rtc
In-Reply-To: <20260211184941.6756-2-clamor95@gmail.com>
On 11/02/2026 19:49, Svyatoslav Ryhel wrote:
> Document an optional second I2C address for the PMIC's RTC device, to be
> used if the RTC is located at a non-default I2C address
MAX77686 did not allow changing the I2C address and there are no other
devices in the bindings.
Best regards,
Krzysztof
^ permalink raw reply
* [PATCH v1 2/2] rtc: max77686: convert to i2c_new_ancillary_device
From: Svyatoslav Ryhel @ 2026-02-11 18:49 UTC (permalink / raw)
To: Chanwoo Choi, Krzysztof Kozlowski, Lee Jones, Rob Herring,
Conor Dooley, Alexandre Belloni
Cc: linux-kernel, devicetree, linux-rtc
In-Reply-To: <20260211184941.6756-1-clamor95@gmail.com>
Convert RTC I2C device creation from devm_i2c_new_dummy_device() to
i2c_new_ancillary_device() to enable the use of a device tree-specified
RTC address instead of a hardcoded value. If the device tree does not
provide an address, use hardcoded values as a fallback.
This addresses an issue with the MAX77663 PMIC, which can have the RTC at
different I2C positions (either 0x48, like the MAX77714, or 0x68, like
the MAX77620). The MAX77620 value is used as the default. The I2C position
of the MAX77663 is factory-set and cannot be detected from the chip
itself.
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
---
drivers/rtc/rtc-max77686.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/drivers/rtc/rtc-max77686.c b/drivers/rtc/rtc-max77686.c
index 69ea3ce75b5a..3cdfd78a07cc 100644
--- a/drivers/rtc/rtc-max77686.c
+++ b/drivers/rtc/rtc-max77686.c
@@ -686,6 +686,11 @@ static int max77686_rtc_init_reg(struct max77686_rtc_info *info)
return ret;
}
+static void max77686_rtc_release_dev(void *client)
+{
+ i2c_unregister_device(client);
+}
+
static int max77686_init_rtc_regmap(struct max77686_rtc_info *info)
{
struct device *parent = info->dev->parent;
@@ -713,12 +718,17 @@ static int max77686_init_rtc_regmap(struct max77686_rtc_info *info)
goto add_rtc_irq;
}
- client = devm_i2c_new_dummy_device(info->dev, parent_i2c->adapter,
- info->drv_data->rtc_i2c_addr);
+ client = i2c_new_ancillary_device(parent_i2c, "rtc",
+ info->drv_data->rtc_i2c_addr);
if (IS_ERR(client))
return dev_err_probe(info->dev, PTR_ERR(client),
"Failed to allocate I2C device for RTC\n");
+ ret = devm_add_action_or_reset(info->dev, max77686_rtc_release_dev,
+ client);
+ if (ret)
+ return ret;
+
info->rtc_regmap = devm_regmap_init_i2c(client,
info->drv_data->regmap_config);
if (IS_ERR(info->rtc_regmap))
--
2.51.0
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox