All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matt Ranostay <matt.ranostay@konsulko.com>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: rishi gupta <gupt21@gmail.com>,
	"open list:IIO SUBSYSTEM AND DRIVERS" <linux-iio@vger.kernel.org>,
	"open list:HID CORE LAYER" <linux-input@vger.kernel.org>
Subject: Re: [PATCH] HID: mcp2221: add ADC support
Date: Fri, 20 Nov 2020 12:31:23 -0800	[thread overview]
Message-ID: <CAJCx=gkHYsu6=ne2BPCajVP+N9natV3stieP0cKd5nTSC8ARRA@mail.gmail.com> (raw)
In-Reply-To: <8151a886-b2db-8d44-eee6-46e8eb300ffb@metafoo.de>

On Fri, Nov 20, 2020 at 11:54 AM Lars-Peter Clausen <lars@metafoo.de> wrote:
>
> On 11/20/20 8:17 PM, Matt Ranostay wrote:
> > On Fri, Nov 20, 2020 at 5:15 AM rishi gupta <gupt21@gmail.com> wrote:
> >> On Fri, Nov 20, 2020 at 8:31 AM Matt Ranostay
> >> <matt.ranostay@konsulko.com> wrote:
> >>> Add support for the three 10-bit ADC channels registered via
> >>> the IIO subsystem.
> >>>
> >>> Cc: linux-input@vger.kernel.org
> >>> Cc: linux-iio@vger.kernel.org
> >>> CC: Rishi Gupta <gupt21@gmail.com>
> >>> Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
> >>> ---
> >>>   drivers/hid/Kconfig       |  1 +
> >>>   drivers/hid/hid-mcp2221.c | 65 ++++++++++++++++++++++++++++++++++++++-
> >>>   2 files changed, 65 insertions(+), 1 deletion(-)
> >>>
> >>> diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
> >>> index 05315b434276..4795744d9979 100644
> >>> --- a/drivers/hid/Kconfig
> >>> +++ b/drivers/hid/Kconfig
> >>> @@ -1157,6 +1157,7 @@ config HID_MCP2221
> >>>          tristate "Microchip MCP2221 HID USB-to-I2C/SMbus host support"
> >>>          depends on USB_HID && I2C
> >>>          depends on GPIOLIB
> >>> +       depends on IIO
> >> I am wondering what will happen on systems which do not enable IIO.
> >> This driver can not be used there.
> >> Is my understanding correct?
> > Actually yeah this should be "select IIO" to avoid that issue.
>
> No, we should not have a individual driver select a framework. This will
> cause all kinds of issues with reverse dependencies.
>
> It might be worth splitting this driver into a MFD driver, then the MFD
> cells could have their own module that depend on the subsystem and if
> not enabled the functionality will not be provided.

Would it make sense to use IS_REACHABLE(CONFIG_IIO) for the iio blocks?

Guessing the weak reference "imply IIO" would still be bad for the
driver selecting a framework?

Thanks,

Matt

>
> - Lars
>

  reply	other threads:[~2020-11-20 20:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-20  3:01 [PATCH] HID: mcp2221: add ADC support Matt Ranostay
2020-11-20 13:14 ` rishi gupta
2020-11-20 19:17   ` Matt Ranostay
2020-11-20 19:54     ` Lars-Peter Clausen
2020-11-20 20:31       ` Matt Ranostay [this message]
2020-11-21 15:10         ` Jonathan Cameron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJCx=gkHYsu6=ne2BPCajVP+N9natV3stieP0cKd5nTSC8ARRA@mail.gmail.com' \
    --to=matt.ranostay@konsulko.com \
    --cc=gupt21@gmail.com \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.