Message ID | 20221202113226.114465-1-Mr.Bossman075@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp781168wrr; Fri, 2 Dec 2022 03:37:57 -0800 (PST) X-Google-Smtp-Source: AA0mqf7D4aWwIGVBGjaW0UNZ3yyLDOoUA3wmwIY24k1wsWq88qEBfqn1dnjzCaT8PGVKSW4G+JcB X-Received: by 2002:aa7:cf82:0:b0:46b:34b:5804 with SMTP id z2-20020aa7cf82000000b0046b034b5804mr23588663edx.240.1669981077679; Fri, 02 Dec 2022 03:37:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669981077; cv=none; d=google.com; s=arc-20160816; b=nw4cvSBa6BaWlXJkuHq/bGWyAtOfB+nSyj4mDFmndbafq0H3zGMWcXmGvfuiAslUdj g/pK3KKCbkHdh4B1E7A9AfLaMEGpPxc6K3h/QBzscdtLS/V5bJk+k31th/mWTcRl9OZH inoP5TXqvfA1W598L9rcGvSzvh0uJWlDFXvVuo6/5MM7kU+7w616TiQGqW7mC4aeZ0Ib 02nSXCDxuft8USPSb+ecWuAgVK7VKKm/4XEHmZTmixe6fKpoM1Q7EzfroPmiV2jtDNBv yg5IVrCG6eBL5491H019X1si8caCP5ZslSdcwM2+CLA1qpyXaBW4KLyVJZpFDFK/4ZXm LVag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=kKMmcMkr+j9BB+n8Fm2ml56npFsgtQtlINX/YhhToLk=; b=put/edwLPaOgYXLFImvV1mpr/27WT5m+YCkbbXRzvREkzy1zwXfY1gTOOWpeLzSie7 jAA0Jz/JEupOE4XhvTknIrbgXwx0XIS6NYTmTAb5McmFkngvILv74qc145+5ZTAnU5lm 7x35mUBptHxGY27EkU4mnCuoU7qaIBWd+HvLbGoCG5UJP5vyCvixlq1focysOzLwQmqw tYWFsGQ6WJAoosnI/7s/GJFBr5fzns45qgrJ6tsV6rxeSIkyEpx8T9ntPcyp62MBhJmF Ai29CS684+sFIuqo8e+Cjs/5uAafsgfru1FUeufNUwPh6h9h8e5UwXbHi7SkfKQIoXq1 poZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=X95XJiV6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dt18-20020a170907729200b007b2912955desi6356075ejc.125.2022.12.02.03.37.33; Fri, 02 Dec 2022 03:37:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=X95XJiV6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232750AbiLBLca (ORCPT <rfc822;lhua1029@gmail.com> + 99 others); Fri, 2 Dec 2022 06:32:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232313AbiLBLc3 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 2 Dec 2022 06:32:29 -0500 Received: from mail-qv1-xf2c.google.com (mail-qv1-xf2c.google.com [IPv6:2607:f8b0:4864:20::f2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4BE7A9854C; Fri, 2 Dec 2022 03:32:28 -0800 (PST) Received: by mail-qv1-xf2c.google.com with SMTP id c14so3241901qvq.0; Fri, 02 Dec 2022 03:32:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=kKMmcMkr+j9BB+n8Fm2ml56npFsgtQtlINX/YhhToLk=; b=X95XJiV6MMyJnPyOY2F5zvNYMMJ0xjdXsvtJ8JBGkzMeaIAGMLZsnclKiiCpPB8gcU tpAqtTeN3xTKacRPkIDmNF/2zgOQm2aAiu2rE44OhOxNWXa004rtu/iIZ26Pc9fqeE1/ NNjChcOSbPJ3Mu7pru9XoFd6OeMLGEuzGSEp/6FWvQAvaNMBIMhwhoZGmdunJk012iqz wcbh92FuKyfrB6kR20vJQZdtLmPBvSqTopVz/qtgRU1S7aRqIWdxUdJI4AoVzuuKoKtY /WJ+1TT7EkMHuQsKBgjirfymnBqlsOV/Not06zlkDy9I1IJcOCU0TFepmVErJF2pa2ch BG2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=kKMmcMkr+j9BB+n8Fm2ml56npFsgtQtlINX/YhhToLk=; b=klEcZPYtkKMAUNXfDZbA+e5SjGy6pxFaGQZd93FPY5dZ4K3OrZd/2Czfxa4fEfIJ9p KIdM7UpwvoD8wqcy8LvsVYmhsK0qH9YLZVcI36aVFK4+/k6V0puUG6BHKbmR9erRetkA 6rtQj7RVtbKJSmrCDlLmHhQijbDcnk2naOD86dv5/SFbIdjLRo6MOjdZuYPuFkY7irjS n7Cmfm3LOFMXwbmjf8QlNMpcADBfplG0bVLC68UyAnYUiQcYTSdqLc8mzRr+ead8KjPz 3t1/mD7h1vbctFx4JyiByDJeKeKBw/23CjMfFYI7K0HfvmhtWaPnzeWhxfXojsH4Abfi 5FAA== X-Gm-Message-State: ANoB5pl9niY07WtwfQh4fbb957iKhSbp+8QIbKqMrQhUZLmMzusAP0Wb M4Jz9pKUJS4X9RvGWugY2I4vrCe+aFE= X-Received: by 2002:a0c:fde3:0:b0:4c6:5908:84f0 with SMTP id m3-20020a0cfde3000000b004c6590884f0mr63424362qvu.9.1669980747169; Fri, 02 Dec 2022 03:32:27 -0800 (PST) Received: from jesse-desktop.jtp-bos.lab ([96.237.180.62]) by smtp.gmail.com with ESMTPSA id x9-20020ac85389000000b003a530a32f67sm3904772qtp.65.2022.12.02.03.32.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Dec 2022 03:32:26 -0800 (PST) From: Jesse Taube <mr.bossman075@gmail.com> X-Google-Original-From: Jesse Taube <Mr.Bossman075@gmail.com> To: linux-kernel@vger.kernel.org Cc: linux-input@vger.kernel.org, lee@kernel.org, lee.jones@linaro.org, Mr.Bossman075@gmail.com Subject: [PATCH v2] drivers/mfd: simple-mfd-i2c: Add generic compatible Date: Fri, 2 Dec 2022 06:32:26 -0500 Message-Id: <20221202113226.114465-1-Mr.Bossman075@gmail.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751102078769744217?= X-GMAIL-MSGID: =?utf-8?q?1751102078769744217?= |
Series |
[v2] drivers/mfd: simple-mfd-i2c: Add generic compatible
|
|
Commit Message
Jesse T
Dec. 2, 2022, 11:32 a.m. UTC
Some devices may want to use this driver without having a specific
compatible string. Add a generic compatible string to allow this.
Signed-off-by: Jesse Taube <Mr.Bossman075@gmail.com>
---
drivers/mfd/simple-mfd-i2c.c | 1 +
1 file changed, 1 insertion(+)
Comments
Are there any updates? On 12/2/22 06:32, Jesse Taube wrote: > Some devices may want to use this driver without having a specific > compatible string. Add a generic compatible string to allow this. > > Signed-off-by: Jesse Taube <Mr.Bossman075@gmail.com> > --- > drivers/mfd/simple-mfd-i2c.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/mfd/simple-mfd-i2c.c b/drivers/mfd/simple-mfd-i2c.c > index f4c8fc3ee463..0bda0dd9276e 100644 > --- a/drivers/mfd/simple-mfd-i2c.c > +++ b/drivers/mfd/simple-mfd-i2c.c > @@ -73,6 +73,7 @@ static const struct simple_mfd_data silergy_sy7636a = { > }; > > static const struct of_device_id simple_mfd_i2c_of_match[] = { > + { .compatible = "simple-mfd-i2c-generic" }, > { .compatible = "kontron,sl28cpld" }, > { .compatible = "silergy,sy7636a", .data = &silergy_sy7636a}, > {}
On Wed, 14 Dec 2022, Jesse Taube wrote: > Are there any updates? Please refrain from top-posting. I'll get around to it after the merge-window has closed. > On 12/2/22 06:32, Jesse Taube wrote: > > Some devices may want to use this driver without having a specific > > compatible string. Add a generic compatible string to allow this. > > > > Signed-off-by: Jesse Taube <Mr.Bossman075@gmail.com> > > --- > > drivers/mfd/simple-mfd-i2c.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/drivers/mfd/simple-mfd-i2c.c b/drivers/mfd/simple-mfd-i2c.c > > index f4c8fc3ee463..0bda0dd9276e 100644 > > --- a/drivers/mfd/simple-mfd-i2c.c > > +++ b/drivers/mfd/simple-mfd-i2c.c > > @@ -73,6 +73,7 @@ static const struct simple_mfd_data silergy_sy7636a = { > > }; > > static const struct of_device_id simple_mfd_i2c_of_match[] = { > > + { .compatible = "simple-mfd-i2c-generic" }, > > { .compatible = "kontron,sl28cpld" }, > > { .compatible = "silergy,sy7636a", .data = &silergy_sy7636a}, > > {}
On Fri, 02 Dec 2022, Jesse Taube wrote: > Some devices may want to use this driver without having a specific > compatible string. Add a generic compatible string to allow this. > > Signed-off-by: Jesse Taube <Mr.Bossman075@gmail.com> > --- > drivers/mfd/simple-mfd-i2c.c | 1 + > 1 file changed, 1 insertion(+) Sounds like a good idea. I've changed the subject line a little (no need to say 'drivers') and applied the patch, thanks. > diff --git a/drivers/mfd/simple-mfd-i2c.c b/drivers/mfd/simple-mfd-i2c.c > index f4c8fc3ee463..0bda0dd9276e 100644 > --- a/drivers/mfd/simple-mfd-i2c.c > +++ b/drivers/mfd/simple-mfd-i2c.c > @@ -73,6 +73,7 @@ static const struct simple_mfd_data silergy_sy7636a = { > }; > > static const struct of_device_id simple_mfd_i2c_of_match[] = { > + { .compatible = "simple-mfd-i2c-generic" }, > { .compatible = "kontron,sl28cpld" }, > { .compatible = "silergy,sy7636a", .data = &silergy_sy7636a}, > {} > -- > 2.38.1 >
On Fri, Dec 02, 2022 at 06:32:26AM -0500, Jesse Taube wrote: > Some devices may want to use this driver without having a specific > compatible string. Add a generic compatible string to allow this. What devices need this? Is that no specific compatible string at all or just in the kernel? Because the former definitely goes against DT requirements. The latter enables the former without a schema. > > Signed-off-by: Jesse Taube <Mr.Bossman075@gmail.com> > --- > drivers/mfd/simple-mfd-i2c.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/mfd/simple-mfd-i2c.c b/drivers/mfd/simple-mfd-i2c.c > index f4c8fc3ee463..0bda0dd9276e 100644 > --- a/drivers/mfd/simple-mfd-i2c.c > +++ b/drivers/mfd/simple-mfd-i2c.c > @@ -73,6 +73,7 @@ static const struct simple_mfd_data silergy_sy7636a = { > }; > > static const struct of_device_id simple_mfd_i2c_of_match[] = { > + { .compatible = "simple-mfd-i2c-generic" }, Simple and generic? There is no such device. Anywhere. This is also not documented which is how I found it (make dt_compatible_check). But this should be reverted or dropped rather than documented IMO. Rob
On Thu, 19 Jan 2023, Rob Herring wrote: > On Fri, Dec 02, 2022 at 06:32:26AM -0500, Jesse Taube wrote: > > Some devices may want to use this driver without having a specific > > compatible string. Add a generic compatible string to allow this. > > What devices need this? > > Is that no specific compatible string at all or just in the kernel? > Because the former definitely goes against DT requirements. The latter > enables the former without a schema. > > > > > Signed-off-by: Jesse Taube <Mr.Bossman075@gmail.com> > > --- > > drivers/mfd/simple-mfd-i2c.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/drivers/mfd/simple-mfd-i2c.c b/drivers/mfd/simple-mfd-i2c.c > > index f4c8fc3ee463..0bda0dd9276e 100644 > > --- a/drivers/mfd/simple-mfd-i2c.c > > +++ b/drivers/mfd/simple-mfd-i2c.c > > @@ -73,6 +73,7 @@ static const struct simple_mfd_data silergy_sy7636a = { > > }; > > > > static const struct of_device_id simple_mfd_i2c_of_match[] = { > > + { .compatible = "simple-mfd-i2c-generic" }, > > Simple and generic? There is no such device. Anywhere. > > This is also not documented which is how I found it (make > dt_compatible_check). But this should be reverted or dropped rather than > documented IMO. I thought it would be better than having a huge list here. Devices should *also* be allocated a specific compatible string. $ git grep simple-mfd -- arch
On 1/19/23 15:54, Lee Jones wrote: > On Thu, 19 Jan 2023, Rob Herring wrote: > >> On Fri, Dec 02, 2022 at 06:32:26AM -0500, Jesse Taube wrote: >>> Some devices may want to use this driver without having a specific >>> compatible string. Add a generic compatible string to allow this. >> >> What devices need this? >> >> Is that no specific compatible string at all or just in the kernel? >> Because the former definitely goes against DT requirements. The latter >> enables the former without a schema. >> >>> >>> Signed-off-by: Jesse Taube <Mr.Bossman075@gmail.com> >>> --- >>> drivers/mfd/simple-mfd-i2c.c | 1 + >>> 1 file changed, 1 insertion(+) >>> >>> diff --git a/drivers/mfd/simple-mfd-i2c.c b/drivers/mfd/simple-mfd-i2c.c >>> index f4c8fc3ee463..0bda0dd9276e 100644 >>> --- a/drivers/mfd/simple-mfd-i2c.c >>> +++ b/drivers/mfd/simple-mfd-i2c.c >>> @@ -73,6 +73,7 @@ static const struct simple_mfd_data silergy_sy7636a = { >>> }; >>> >>> static const struct of_device_id simple_mfd_i2c_of_match[] = { >>> + { .compatible = "simple-mfd-i2c-generic" }, >> >> Simple and generic? There is no such device. Anywhere. >> >> This is also not documented which is how I found it (make >> dt_compatible_check). I will write docs if needed. But this should be reverted or dropped rather than >> documented IMO. Hi Rob, sorry for the disturbance. The reason I submitted this patch is this driver is generic and can be used by many different devices. Adding a generic compatible handle allows device tree writers avoid editing the C source. I also will be submitting device trees that use this in the future if added. Thanks, Jesse Taube > > I thought it would be better than having a huge list here. > > Devices should *also* be allocated a specific compatible string. > > $ git grep simple-mfd -- arch >
On Thu, Jan 19, 2023 at 2:54 PM Lee Jones <lee@kernel.org> wrote: > > On Thu, 19 Jan 2023, Rob Herring wrote: > > > On Fri, Dec 02, 2022 at 06:32:26AM -0500, Jesse Taube wrote: > > > Some devices may want to use this driver without having a specific > > > compatible string. Add a generic compatible string to allow this. > > > > What devices need this? > > > > Is that no specific compatible string at all or just in the kernel? > > Because the former definitely goes against DT requirements. The latter > > enables the former without a schema. > > > > > > > > Signed-off-by: Jesse Taube <Mr.Bossman075@gmail.com> > > > --- > > > drivers/mfd/simple-mfd-i2c.c | 1 + > > > 1 file changed, 1 insertion(+) > > > > > > diff --git a/drivers/mfd/simple-mfd-i2c.c b/drivers/mfd/simple-mfd-i2c.c > > > index f4c8fc3ee463..0bda0dd9276e 100644 > > > --- a/drivers/mfd/simple-mfd-i2c.c > > > +++ b/drivers/mfd/simple-mfd-i2c.c > > > @@ -73,6 +73,7 @@ static const struct simple_mfd_data silergy_sy7636a = { > > > }; > > > > > > static const struct of_device_id simple_mfd_i2c_of_match[] = { > > > + { .compatible = "simple-mfd-i2c-generic" }, > > > > Simple and generic? There is no such device. Anywhere. > > > > This is also not documented which is how I found it (make > > dt_compatible_check). But this should be reverted or dropped rather than > > documented IMO. > > I thought it would be better than having a huge list here. What indication is there that the list would be huge? We have 2 out of 137 MFD bindings. Usually if the MFD is simple, we'd make it a single node. It just needs to be clear what the conditions are for using it. > Devices should *also* be allocated a specific compatible string. > > $ git grep simple-mfd -- arch Why can't simple-mfd be used here? Rob
On Fri, 20 Jan 2023, Rob Herring wrote: > On Thu, Jan 19, 2023 at 2:54 PM Lee Jones <lee@kernel.org> wrote: > > > > On Thu, 19 Jan 2023, Rob Herring wrote: > > > > > On Fri, Dec 02, 2022 at 06:32:26AM -0500, Jesse Taube wrote: > > > > Some devices may want to use this driver without having a specific > > > > compatible string. Add a generic compatible string to allow this. > > > > > > What devices need this? > > > > > > Is that no specific compatible string at all or just in the kernel? > > > Because the former definitely goes against DT requirements. The latter > > > enables the former without a schema. > > > > > > > > > > > Signed-off-by: Jesse Taube <Mr.Bossman075@gmail.com> > > > > --- > > > > drivers/mfd/simple-mfd-i2c.c | 1 + > > > > 1 file changed, 1 insertion(+) > > > > > > > > diff --git a/drivers/mfd/simple-mfd-i2c.c b/drivers/mfd/simple-mfd-i2c.c > > > > index f4c8fc3ee463..0bda0dd9276e 100644 > > > > --- a/drivers/mfd/simple-mfd-i2c.c > > > > +++ b/drivers/mfd/simple-mfd-i2c.c > > > > @@ -73,6 +73,7 @@ static const struct simple_mfd_data silergy_sy7636a = { > > > > }; > > > > > > > > static const struct of_device_id simple_mfd_i2c_of_match[] = { > > > > + { .compatible = "simple-mfd-i2c-generic" }, > > > > > > Simple and generic? There is no such device. Anywhere. > > > > > > This is also not documented which is how I found it (make > > > dt_compatible_check). But this should be reverted or dropped rather than > > > documented IMO. > > > > I thought it would be better than having a huge list here. > > What indication is there that the list would be huge? We have 2 out of > 137 MFD bindings. Usually if the MFD is simple, we'd make it a single > node. It just needs to be clear what the conditions are for using it. > > > Devices should *also* be allocated a specific compatible string. > > > > $ git grep simple-mfd -- arch > > Why can't simple-mfd be used here? Until this is clarified, agreed and documented, I'm dropping the patch.
diff --git a/drivers/mfd/simple-mfd-i2c.c b/drivers/mfd/simple-mfd-i2c.c index f4c8fc3ee463..0bda0dd9276e 100644 --- a/drivers/mfd/simple-mfd-i2c.c +++ b/drivers/mfd/simple-mfd-i2c.c @@ -73,6 +73,7 @@ static const struct simple_mfd_data silergy_sy7636a = { }; static const struct of_device_id simple_mfd_i2c_of_match[] = { + { .compatible = "simple-mfd-i2c-generic" }, { .compatible = "kontron,sl28cpld" }, { .compatible = "silergy,sy7636a", .data = &silergy_sy7636a}, {}