public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Stephen Warren <swarren@wwwdotorg.org>
To: Dong Aisheng <b29396@freescale.com>
Cc: linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linus.walleij@stericsson.com, s.hauer@pengutronix.de,
	shawn.guo@linaro.org, kernel@pengutronix.de,
	grant.likely@secretlab.ca, rob.herring@calxeda.com,
	sameo@linux.intel.com, lrg@ti.com,
	broonie@opensource.wolfsonmicro.com, richard.zhao@freescale.com,
	devicetree-discuss@lists.ozlabs.org
Subject: Re: [PATCH v3 1/7] mfd: add syscon driver based on regmap
Date: Tue, 28 Aug 2012 15:54:00 -0700	[thread overview]
Message-ID: <503D4C08.8040605@wwwdotorg.org> (raw)
In-Reply-To: <1346145005-17961-2-git-send-email-b29396@freescale.com>

On 08/28/2012 02:09 AM, Dong Aisheng wrote:
> From: Dong Aisheng <dong.aisheng@linaro.org>
> 
> Add regmap based syscon driver.
> This is usually used for access misc bits in registers which does not belong
> to a specific module, for example, IMX IOMUXC GPR and ANATOP.
> With this driver, client can use generic regmap API to access registers
> which are registered into syscon.

> diff --git a/Documentation/devicetree/bindings/mfd/syscon.txt b/Documentation/devicetree/bindings/mfd/syscon.txt

> +* System Controller Registers R/W driver

I think the binding document could use some information about what a
"syscon" actually is, especially since the compatible value is something
generic like "syscon" rather than something with a vendor-specific
prefix. How about:

A system controller node represents a register region containing a set
of miscellaneous registers. The registers are not cohesive enough to
represent as any specific type of device. The typical use-case is for
some other node's driver, or platform-specific code, to acquire a
reference to the syscon node (e.g. by phandle, node path, or search
using a specific compatible value), interrogate the node (or associated
OS driver) to determine the location of the registers, and access the
registers directly.

> +Required properties:
> +- compatible: Should contain "syscon".
> +- reg: the register range can be access from syscon
> +
> +Examples:
> +gpr: iomuxc-gpr@020e0000 {
> +	compatible = "fsl,imx6q-iomuxc-gpr", "syscon";
> +	reg = <0x020e0000 0x38>;
> +};

> diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig

> +config MFD_SYSCON
> +        bool "System Controller Register R/W Based on Regmap"
> +        select REGMAP_MMIO
> +        help
> +          Select this option to enable accessing system control registers
> +	  via regmap.

I think the indentation is off there.

> +static int __devinit syscon_probe(struct platform_device *pdev)
...
> +	regcache_cache_only(syscon->regmap, false);

Isn't that the default?

Aside from that, I don't have any particular comments on this series, so
please consider it,

Acked-by: Stephen Warren <swarren@wwwdotorg.org>

  reply	other threads:[~2012-08-28 22:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-28  9:09 [PATCH v3 0/7] add syscon driver based on regmap for general registers access Dong Aisheng
2012-08-28  9:09 ` [PATCH v3 1/7] mfd: add syscon driver based on regmap Dong Aisheng
2012-08-28 22:54   ` Stephen Warren [this message]
2012-08-29  2:00     ` Dong Aisheng
2012-08-28  9:10 ` [PATCH v3 2/7] ARM: imx6q: add iomuxc gpr support into syscon Dong Aisheng
2012-08-28  9:10 ` [PATCH v3 3/7] ARM: imx6q: add anatop " Dong Aisheng
2012-08-28  9:10 ` [PATCH v3 4/7] regulator: anatop-regulator: convert to use syscon to access anatop register Dong Aisheng
2012-08-28  9:10 ` [PATCH v3 5/7] ARM: imx6q: convert to use syscon to access anatop registers Dong Aisheng
2012-08-28  9:10 ` [PATCH v3 6/7] ARM: dts: imx6q: add simple-bus compatible string for anatop Dong Aisheng
2012-08-28  9:10 ` [PATCH v3 7/7] mfd: anatop-mfd: remove anatop driver Dong Aisheng

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=503D4C08.8040605@wwwdotorg.org \
    --to=swarren@wwwdotorg.org \
    --cc=b29396@freescale.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=grant.likely@secretlab.ca \
    --cc=kernel@pengutronix.de \
    --cc=linus.walleij@stericsson.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lrg@ti.com \
    --cc=richard.zhao@freescale.com \
    --cc=rob.herring@calxeda.com \
    --cc=s.hauer@pengutronix.de \
    --cc=sameo@linux.intel.com \
    --cc=shawn.guo@linaro.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