linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Maxime Ripard <maxime.ripard@free-electrons.com>
To: Lee Jones <lee.jones@linaro.org>
Cc: Quentin Schulz <quentin.schulz@free-electrons.com>,
	jdelvare@suse.com, linux@roeck-us.net, jic23@kernel.org,
	knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net,
	wens@csie.org, thomas.petazzoni@free-electrons.com,
	antoine.tenart@free-electrons.com, linux-kernel@vger.kernel.org,
	linux-hwmon@vger.kernel.org, linux-iio@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v5 2/3] mfd: add support for Allwinner SoCs ADC
Date: Mon, 12 Sep 2016 12:07:19 +0200	[thread overview]
Message-ID: <20160912100719.GJ9449@lukather> (raw)
In-Reply-To: <20160912095923.GD1873@dell>

[-- Attachment #1: Type: text/plain, Size: 1260 bytes --]

On Mon, Sep 12, 2016 at 10:59:23AM +0100, Lee Jones wrote:
> > >> +static const struct of_device_id sun4i_gpadc_mfd_of_match[] = {
> > >> +	{
> > >> +		.compatible = "allwinner,sun4i-a10-ts",
> > >> +		.data = &sun4i_gpadc_mfd_cells,
> > >> +	}, {
> > >> +		.compatible = "allwinner,sun5i-a13-ts",
> > >> +		.data = &sun5i_gpadc_mfd_cells,
> > >> +	}, {
> > >> +		.compatible = "allwinner,sun6i-a31-ts",
> > >> +		.data = &sun6i_gpadc_mfd_cells,
> > >> +	}, { /* sentinel */ }
> > >> +};
> > > 
> > > Don't mix OF and MFD functionality.
> > > 
> > > Why don't you create a node for "iio_hwmon" and have
> > > platform_of_populate() do your bidding?
> > > 
> > 
> > We are using a stable binding which we cannot modify. This means, the DT
> > in its current state can only be modified to add features, which is not
> > the case of this driver (it is a rewriting of an existing driver which
> > uses the rtp node).
> 
> Then use .data = <defined model ID> and set up a switch() in .probe().

Uh? Why? It just adds a non-standard indirection, while using
of_match_device is very standard, and used extensively in Linux.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2016-09-12 10:07 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-08 14:28 [PATCH v5 0/3] add support for Allwinner SoCs ADC Quentin Schulz
2016-09-08 14:28 ` [PATCH v5 1/3] hwmon: iio_hwmon: defer probe when no channel is found Quentin Schulz
2016-09-09  4:26   ` Guenter Roeck
2016-09-10 15:02     ` Jonathan Cameron
2016-09-08 14:28 ` [PATCH v5 2/3] mfd: add support for Allwinner SoCs ADC Quentin Schulz
2016-09-09 14:38   ` Maxime Ripard
2016-09-10 15:07   ` Jonathan Cameron
2016-09-12  9:18   ` Lee Jones
2016-09-12  9:43     ` Quentin Schulz
2016-09-12  9:59       ` Lee Jones
2016-09-12 10:07         ` Maxime Ripard [this message]
2016-09-12 10:49           ` Lee Jones
2016-09-12 10:58             ` Quentin Schulz
2016-09-12 13:56               ` Lee Jones
2016-09-12 14:35                 ` Maxime Ripard
2016-09-12 15:07                   ` Lee Jones
2016-09-12 11:08         ` Quentin Schulz
2016-09-12 13:56           ` Lee Jones
2016-09-13  7:06             ` Quentin Schulz
2016-09-13  8:21               ` Lee Jones
2016-09-08 14:28 ` [PATCH v5 3/3] iio: adc: " Quentin Schulz
2016-09-09 14:50   ` Maxime Ripard
2016-09-10 15:09   ` 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=20160912100719.GJ9449@lukather \
    --to=maxime.ripard@free-electrons.com \
    --cc=antoine.tenart@free-electrons.com \
    --cc=jdelvare@suse.com \
    --cc=jic23@kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=lee.jones@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=pmeerw@pmeerw.net \
    --cc=quentin.schulz@free-electrons.com \
    --cc=thomas.petazzoni@free-electrons.com \
    --cc=wens@csie.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).