linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linus.walleij@linaro.org (Linus Walleij)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC] What is the preferred way to share ADC unit between hwmon and input(ts) drivers?
Date: Sat, 7 May 2011 20:11:00 +0200	[thread overview]
Message-ID: <BANLkTikOjdAjbo+qcKoH_uqpb4YikbHxzA@mail.gmail.com> (raw)
In-Reply-To: <4DB4C252.30005@emcraft.com>

2011/4/25 Ilya Yanok <yanok@emcraft.com>:

> So, to add both input and hwmon drivers we need to serialize the
> register accesses.(...) Should we use a multi-function device driver
> for this

Yes. Use MFD. We use MFD for say drivers/mfd/ab3100-core.c and
what is does is essentially serialize the I2C read/writes using a
mutex, it spawnd MFD cell children for say drivers/regulator/ab3100.c

In your case spawn a foo-hwmon and foo-input MFD cell from your
MFD driver core.

> or just some platform-specific code (as S3C does)?

And where are you going to put that? Into arch/arm/mach-* where
Linus (the other one) is already upset with the prevalence of
driver code not being factored to share common infrastructure?

Yours,
Linus Walleij

      parent reply	other threads:[~2011-05-07 18:11 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-25  0:37 [RFC] What is the preferred way to share ADC unit between hwmon and input(ts) drivers? Ilya Yanok
2011-04-25  5:25 ` Kurt Van Dijck
2011-05-05 23:41   ` Ilya Yanok
2011-04-25 11:02 ` Mark Brown
2011-05-05 23:43   ` Ilya Yanok
2011-05-06 13:43   ` Jonathan Cameron
2011-05-06 14:13     ` Ithamar R. Adema
2011-05-06 14:23       ` Mark Brown
2011-05-06 15:15         ` Jonathan Cameron
2011-05-06 15:56           ` Mark Brown
2011-05-06 16:29             ` Jonathan Cameron
2011-05-06 17:20               ` Mark Brown
2011-05-09 13:25                 ` Jonathan Cameron
2011-05-09 14:39                   ` Mark Brown
2011-05-09 16:35                     ` Jonathan Cameron
2011-05-09 19:54                       ` Mark Brown
2011-05-10  9:51                         ` Jonathan Cameron
2011-05-06 15:21         ` Ithamar R. Adema
2011-05-07 18:11 ` Linus Walleij [this message]

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=BANLkTikOjdAjbo+qcKoH_uqpb4YikbHxzA@mail.gmail.com \
    --to=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).