* [PATCH v2 0/2] mfd: Add ROHM BD71879 @ 2024-04-04 19:54 Andreas Kemnade 2024-04-04 19:54 ` [PATCH v2 1/2] dt-bindings: " Andreas Kemnade 2024-04-04 19:54 ` [PATCH v2 2/2] mfd: rohm-bd71828: Add software-compatible variant BD71879 Andreas Kemnade 0 siblings, 2 replies; 9+ messages in thread From: Andreas Kemnade @ 2024-04-04 19:54 UTC (permalink / raw) To: lee, robh+dt, krzysztof.kozlowski+dt, conor+dt, mazziesaccount, devicetree, linux-kernel Cc: Andreas Kemnade Add software-compatible variant of the BD71828. Changes in v2: allow compatible = "rohm,bd71879", "rohm,bd71828" Andreas Kemnade (2): dt-bindings: mfd: Add ROHM BD71879 mfd: rohm-bd71828: Add software-compatible variant BD71879 .../devicetree/bindings/mfd/rohm,bd71828-pmic.yaml | 7 ++++++- drivers/mfd/rohm-bd71828.c | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) -- 2.39.2 ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v2 1/2] dt-bindings: mfd: Add ROHM BD71879 2024-04-04 19:54 [PATCH v2 0/2] mfd: Add ROHM BD71879 Andreas Kemnade @ 2024-04-04 19:54 ` Andreas Kemnade 2024-04-05 6:56 ` Krzysztof Kozlowski ` (2 more replies) 2024-04-04 19:54 ` [PATCH v2 2/2] mfd: rohm-bd71828: Add software-compatible variant BD71879 Andreas Kemnade 1 sibling, 3 replies; 9+ messages in thread From: Andreas Kemnade @ 2024-04-04 19:54 UTC (permalink / raw) To: lee, robh+dt, krzysztof.kozlowski+dt, conor+dt, mazziesaccount, devicetree, linux-kernel Cc: Andreas Kemnade As this chip was seen in several devices in the wild, add it. Signed-off-by: Andreas Kemnade <andreas@kemnade.info> Suggested-by: Matti Vaittinen <mazziesaccount@gmail.com> --- .../devicetree/bindings/mfd/rohm,bd71828-pmic.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/mfd/rohm,bd71828-pmic.yaml b/Documentation/devicetree/bindings/mfd/rohm,bd71828-pmic.yaml index 0b62f854bf6b..07f99738fcf6 100644 --- a/Documentation/devicetree/bindings/mfd/rohm,bd71828-pmic.yaml +++ b/Documentation/devicetree/bindings/mfd/rohm,bd71828-pmic.yaml @@ -17,7 +17,12 @@ description: | properties: compatible: - const: rohm,bd71828 + oneOf: + - const: rohm,bd71828 + + - items: + - const: rohm,bd71879 + - const: rohm,bd71828 reg: description: -- 2.39.2 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH v2 1/2] dt-bindings: mfd: Add ROHM BD71879 2024-04-04 19:54 ` [PATCH v2 1/2] dt-bindings: " Andreas Kemnade @ 2024-04-05 6:56 ` Krzysztof Kozlowski 2024-04-10 7:57 ` Matti Vaittinen 2024-04-11 16:31 ` (subset) " Lee Jones 2 siblings, 0 replies; 9+ messages in thread From: Krzysztof Kozlowski @ 2024-04-05 6:56 UTC (permalink / raw) To: Andreas Kemnade, lee, robh+dt, krzysztof.kozlowski+dt, conor+dt, mazziesaccount, devicetree, linux-kernel On 04/04/2024 21:54, Andreas Kemnade wrote: > As this chip was seen in several devices in the wild, add it. > > Signed-off-by: Andreas Kemnade <andreas@kemnade.info> > Suggested-by: Matti Vaittinen <mazziesaccount@gmail.com> > --- > .../devicetree/bindings/mfd/rohm,bd71828-pmic.yaml | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Best regards, Krzysztof ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 1/2] dt-bindings: mfd: Add ROHM BD71879 2024-04-04 19:54 ` [PATCH v2 1/2] dt-bindings: " Andreas Kemnade 2024-04-05 6:56 ` Krzysztof Kozlowski @ 2024-04-10 7:57 ` Matti Vaittinen 2024-04-10 10:03 ` Conor Dooley 2024-04-11 16:31 ` (subset) " Lee Jones 2 siblings, 1 reply; 9+ messages in thread From: Matti Vaittinen @ 2024-04-10 7:57 UTC (permalink / raw) To: Andreas Kemnade, lee, robh+dt, krzysztof.kozlowski+dt, conor+dt, devicetree, linux-kernel On 4/4/24 22:54, Andreas Kemnade wrote: > As this chip was seen in several devices in the wild, add it. > > Signed-off-by: Andreas Kemnade <andreas@kemnade.info> > Suggested-by: Matti Vaittinen <mazziesaccount@gmail.com> > --- > .../devicetree/bindings/mfd/rohm,bd71828-pmic.yaml | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/Documentation/devicetree/bindings/mfd/rohm,bd71828-pmic.yaml b/Documentation/devicetree/bindings/mfd/rohm,bd71828-pmic.yaml > index 0b62f854bf6b..07f99738fcf6 100644 > --- a/Documentation/devicetree/bindings/mfd/rohm,bd71828-pmic.yaml > +++ b/Documentation/devicetree/bindings/mfd/rohm,bd71828-pmic.yaml > @@ -17,7 +17,12 @@ description: | > > properties: > compatible: > - const: rohm,bd71828 > + oneOf: > + - const: rohm,bd71828 > + > + - items: > + - const: rohm,bd71879 > + - const: rohm,bd71828 > > reg: > description: Am I correct, this reads as: Either compatible = rohm,bd71828 or compatible = rohm,bd71879, rohm,bd71828 but not compatible = rohm,bd71879? If so, this looks ok to me. :) -- Matti Vaittinen Linux kernel developer at ROHM Semiconductors Oulu Finland ~~ When things go utterly wrong vim users can always type :help! ~~ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 1/2] dt-bindings: mfd: Add ROHM BD71879 2024-04-10 7:57 ` Matti Vaittinen @ 2024-04-10 10:03 ` Conor Dooley 2024-04-10 10:57 ` Matti Vaittinen 0 siblings, 1 reply; 9+ messages in thread From: Conor Dooley @ 2024-04-10 10:03 UTC (permalink / raw) To: Matti Vaittinen Cc: Andreas Kemnade, lee, robh+dt, krzysztof.kozlowski+dt, conor+dt, devicetree, linux-kernel [-- Attachment #1: Type: text/plain, Size: 1267 bytes --] On Wed, Apr 10, 2024 at 10:57:08AM +0300, Matti Vaittinen wrote: > On 4/4/24 22:54, Andreas Kemnade wrote: > > As this chip was seen in several devices in the wild, add it. > > > > Signed-off-by: Andreas Kemnade <andreas@kemnade.info> > > Suggested-by: Matti Vaittinen <mazziesaccount@gmail.com> > > --- > > .../devicetree/bindings/mfd/rohm,bd71828-pmic.yaml | 7 ++++++- > > 1 file changed, 6 insertions(+), 1 deletion(-) > > > > diff --git a/Documentation/devicetree/bindings/mfd/rohm,bd71828-pmic.yaml b/Documentation/devicetree/bindings/mfd/rohm,bd71828-pmic.yaml > > index 0b62f854bf6b..07f99738fcf6 100644 > > --- a/Documentation/devicetree/bindings/mfd/rohm,bd71828-pmic.yaml > > +++ b/Documentation/devicetree/bindings/mfd/rohm,bd71828-pmic.yaml > > @@ -17,7 +17,12 @@ description: | > > properties: > > compatible: > > - const: rohm,bd71828 > > + oneOf: > > + - const: rohm,bd71828 > > + > > + - items: > > + - const: rohm,bd71879 > > + - const: rohm,bd71828 > > reg: > > description: > > Am I correct, this reads as: > > Either > compatible = rohm,bd71828 > or > compatible = rohm,bd71879, rohm,bd71828 > > but not compatible = rohm,bd71879? Correct. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 228 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 1/2] dt-bindings: mfd: Add ROHM BD71879 2024-04-10 10:03 ` Conor Dooley @ 2024-04-10 10:57 ` Matti Vaittinen 0 siblings, 0 replies; 9+ messages in thread From: Matti Vaittinen @ 2024-04-10 10:57 UTC (permalink / raw) To: Conor Dooley Cc: Andreas Kemnade, lee, robh+dt, krzysztof.kozlowski+dt, conor+dt, devicetree, linux-kernel On 4/10/24 13:03, Conor Dooley wrote: > On Wed, Apr 10, 2024 at 10:57:08AM +0300, Matti Vaittinen wrote: >> On 4/4/24 22:54, Andreas Kemnade wrote: >>> As this chip was seen in several devices in the wild, add it. >>> >>> Signed-off-by: Andreas Kemnade <andreas@kemnade.info> >>> Suggested-by: Matti Vaittinen <mazziesaccount@gmail.com> >>> --- >>> .../devicetree/bindings/mfd/rohm,bd71828-pmic.yaml | 7 ++++++- >>> 1 file changed, 6 insertions(+), 1 deletion(-) >>> >>> diff --git a/Documentation/devicetree/bindings/mfd/rohm,bd71828-pmic.yaml b/Documentation/devicetree/bindings/mfd/rohm,bd71828-pmic.yaml >>> index 0b62f854bf6b..07f99738fcf6 100644 >>> --- a/Documentation/devicetree/bindings/mfd/rohm,bd71828-pmic.yaml >>> +++ b/Documentation/devicetree/bindings/mfd/rohm,bd71828-pmic.yaml >>> @@ -17,7 +17,12 @@ description: | >>> properties: >>> compatible: >>> - const: rohm,bd71828 >>> + oneOf: >>> + - const: rohm,bd71828 >>> + >>> + - items: >>> + - const: rohm,bd71879 >>> + - const: rohm,bd71828 >>> reg: >>> description: >> >> Am I correct, this reads as: >> >> Either >> compatible = rohm,bd71828 >> or >> compatible = rohm,bd71879, rohm,bd71828 >> >> but not compatible = rohm,bd71879? > > Correct. Thanks Conor! I guess that if we later find out that there is a 'gizmo' in BD71828 which is not present on BD71879 - and if we write driver supporting this, then we need to have handling for both the BD71879 and BD71828 in this driver to ensure the fall-back wont happen. It's a bit ugly as I think the fall-back compatible should be used only in case where the "fall-back" HW can be guaranteed to have exactly same, or a subset of, features of the "full board". Well, I've been told these are similar by HW colleagues. I have my doubts if 'similar' really is '_similar_', or if it's 'similar, except of course...' - but let's trust the HW guys on this. We have the above mentioned workaround if we should not have trusted... Acked-By: Matti Vaittinen <mazziesaccount@gmail.com> -- Matti Vaittinen Linux kernel developer at ROHM Semiconductors Oulu Finland ~~ When things go utterly wrong vim users can always type :help! ~~ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: (subset) [PATCH v2 1/2] dt-bindings: mfd: Add ROHM BD71879 2024-04-04 19:54 ` [PATCH v2 1/2] dt-bindings: " Andreas Kemnade 2024-04-05 6:56 ` Krzysztof Kozlowski 2024-04-10 7:57 ` Matti Vaittinen @ 2024-04-11 16:31 ` Lee Jones 2 siblings, 0 replies; 9+ messages in thread From: Lee Jones @ 2024-04-11 16:31 UTC (permalink / raw) To: lee, robh+dt, krzysztof.kozlowski+dt, conor+dt, mazziesaccount, devicetree, linux-kernel, Andreas Kemnade On Thu, 04 Apr 2024 21:54:22 +0200, Andreas Kemnade wrote: > As this chip was seen in several devices in the wild, add it. > > Applied, thanks! [1/2] dt-bindings: mfd: Add ROHM BD71879 commit: 9814ee9b64c06aae57c8a8f003014b3d90e09a3d -- Lee Jones [李琼斯] ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v2 2/2] mfd: rohm-bd71828: Add software-compatible variant BD71879 2024-04-04 19:54 [PATCH v2 0/2] mfd: Add ROHM BD71879 Andreas Kemnade 2024-04-04 19:54 ` [PATCH v2 1/2] dt-bindings: " Andreas Kemnade @ 2024-04-04 19:54 ` Andreas Kemnade 2024-04-05 7:00 ` Krzysztof Kozlowski 1 sibling, 1 reply; 9+ messages in thread From: Andreas Kemnade @ 2024-04-04 19:54 UTC (permalink / raw) To: lee, robh+dt, krzysztof.kozlowski+dt, conor+dt, mazziesaccount, devicetree, linux-kernel Cc: Andreas Kemnade Add the BD71879 PMIC which is software-compatible to the BD71828, so reuse the same device_type enum. Signed-off-by: Andreas Kemnade <andreas@kemnade.info> Suggested-by: Matti Vaittinen <mazziesaccount@gmail.com> Acked-by: Matti Vaittinen <mazziesaccount@gmail.com> --- drivers/mfd/rohm-bd71828.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/mfd/rohm-bd71828.c b/drivers/mfd/rohm-bd71828.c index 4a1fa8a0d76a..f0b444690d4d 100644 --- a/drivers/mfd/rohm-bd71828.c +++ b/drivers/mfd/rohm-bd71828.c @@ -585,6 +585,10 @@ static const struct of_device_id bd71828_of_match[] = { { .compatible = "rohm,bd71828", .data = (void *)ROHM_CHIP_TYPE_BD71828, + }, { + .compatible = "rohm,bd71879", + /* equivalent from a software point of view */ + .data = (void *)ROHM_CHIP_TYPE_BD71828, }, { .compatible = "rohm,bd71815", .data = (void *)ROHM_CHIP_TYPE_BD71815, -- 2.39.2 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH v2 2/2] mfd: rohm-bd71828: Add software-compatible variant BD71879 2024-04-04 19:54 ` [PATCH v2 2/2] mfd: rohm-bd71828: Add software-compatible variant BD71879 Andreas Kemnade @ 2024-04-05 7:00 ` Krzysztof Kozlowski 0 siblings, 0 replies; 9+ messages in thread From: Krzysztof Kozlowski @ 2024-04-05 7:00 UTC (permalink / raw) To: Andreas Kemnade, lee, robh+dt, krzysztof.kozlowski+dt, conor+dt, mazziesaccount, devicetree, linux-kernel On 04/04/2024 21:54, Andreas Kemnade wrote: > Add the BD71879 PMIC which is software-compatible to the BD71828, so reuse > the same device_type enum. > > Signed-off-by: Andreas Kemnade <andreas@kemnade.info> > Suggested-by: Matti Vaittinen <mazziesaccount@gmail.com> > Acked-by: Matti Vaittinen <mazziesaccount@gmail.com> > --- Now you can drop this patch. The benefit of the compatibility is to drop this code. Best regards, Krzysztof ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2024-04-11 16:31 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-04-04 19:54 [PATCH v2 0/2] mfd: Add ROHM BD71879 Andreas Kemnade 2024-04-04 19:54 ` [PATCH v2 1/2] dt-bindings: " Andreas Kemnade 2024-04-05 6:56 ` Krzysztof Kozlowski 2024-04-10 7:57 ` Matti Vaittinen 2024-04-10 10:03 ` Conor Dooley 2024-04-10 10:57 ` Matti Vaittinen 2024-04-11 16:31 ` (subset) " Lee Jones 2024-04-04 19:54 ` [PATCH v2 2/2] mfd: rohm-bd71828: Add software-compatible variant BD71879 Andreas Kemnade 2024-04-05 7:00 ` Krzysztof Kozlowski
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox