public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: Laszlo Papp <lpapp@kde.org>
Cc: sameo@linux.intel.com, linux-kernel@vger.kernel.org
Subject: Re: Simple MFD driver example
Date: Mon, 16 Dec 2013 08:25:56 +0000	[thread overview]
Message-ID: <20131216082556.GE18769@lee--X1> (raw)
In-Reply-To: <CAOMwXhN5UfR=Y8V3i=A2zSCv7V9sRDd0Z+D1AQFahvRS-mV5Fw@mail.gmail.com>

> I have been trying to write about 50-100 LOC for 1-2 weeks now. I have
> a fairly simple use case for MFD where I need to have gpio and hwmon
> functionality for a GPIO.
> 
> I read the mfd drivers inside and out by now, but it looks a bit
> inconsistent to me. I am not sure what to follow etc. The
> documentation seems to be virtually missing which makes my life and
> involvement even more difficult. :(
> 
> May I ask for some pointer how to do all this? It would be nice to see
> a minimal example where the parent does not do anything else than just
> enumerating the sub-device drivers. Is that possible with an empty
> probe callback?
> 
> If I understand the regmap correctly (again, it is possible I do not),
> then I would not need this. But in general, it is really hard to deal
> with the linux kernel in this regard when basic documentations are
> missing.
> 
> I hope this would change over time for the posterity. It is a pity
> that contributors do not join probably due to this. It is a bit
> chaotic, but I hope it can be changed in the future.
> 
> Apologies for my frustration...

Due to the nature of the MFD subsystem, there isn't a simple use-case
which you can use as a template. It's completely dependent on the
device you are trying to enable. There are lots of well written
drivers in the subsystem that you can use as good examples though.

Which device are you trying to write a driver for? Is there a
datasheet you can point to?

NB: When emailing subsystem maintainers for help, please don't forget
to CC the relevant Mailing Lists. All lists can be found in the
MAINTAINERS file, which is parsed by <kernel>/scripts/get_maintainer.pl.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

       reply	other threads:[~2013-12-16  8:26 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAOMwXhN5UfR=Y8V3i=A2zSCv7V9sRDd0Z+D1AQFahvRS-mV5Fw@mail.gmail.com>
2013-12-16  8:25 ` Lee Jones [this message]
2013-12-16 14:00   ` Simple MFD driver example Laszlo Papp
2013-12-16 15:05     ` Lee Jones
2013-12-16 16:39       ` Laszlo Papp
2013-12-16 16:48         ` Lee Jones
2013-12-17 17:09           ` Laszlo Papp
2013-12-18  9:16             ` Lee Jones
2013-12-18 10:42               ` Laszlo Papp
2013-12-18 11:12                 ` Lee Jones
2013-12-18 11:17                   ` Laszlo Papp
2013-12-18 11:34                     ` Lee Jones
2013-12-18 11:49                       ` Laszlo Papp
2013-12-18 11:59                         ` Lee Jones
2013-12-18 12:01                           ` Laszlo Papp

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=20131216082556.GE18769@lee--X1 \
    --to=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lpapp@kde.org \
    --cc=sameo@linux.intel.com \
    /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