All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa@the-dreams.de>
To: Pankaj Dubey <pankaj.dubey@samsung.com>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org, kgene.kim@samsung.com,
	linux@arm.linux.org.uk, thomas.ab@samsung.com,
	Rob Herring <robh+dt@kernel.org>,
	Randy Dunlap <rdunlap@infradead.org>,
	devicetree@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-i2c@vger.kernel.org
Subject: Re: [PATCH v4 1/2] i2c: s3c2410: Handle i2c sys_cfg register in i2c driver
Date: Fri, 21 Nov 2014 08:25:45 +0100	[thread overview]
Message-ID: <20141121072545.GG1480@katana> (raw)
In-Reply-To: <1414656270-8048-2-git-send-email-pankaj.dubey@samsung.com>

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

On Thu, Oct 30, 2014 at 01:34:29PM +0530, Pankaj Dubey wrote:
> Let's handle i2c interrupt re-configuration in i2c driver. This will
> help us in removing some soc specific checks from machine files and
> will help in removing static iomapping of SYS register in exynos.c
> 
> Since only Exynos5250, and Exynos5420 has i2c nodes in DT, added syscon
> based phandle to i2c device nodes of respective SoC DT files.
> 
> Also handle saving and restoring of SYS_I2C_CFG register during
> suspend and resume of i2c driver.
> 
> CC: Rob Herring <robh+dt@kernel.org>
> CC: Randy Dunlap <rdunlap@infradead.org>
> CC: Wolfram Sang <wsa@the-dreams.de>
> CC: Russell King <linux@arm.linux.org.uk>
> CC: devicetree@vger.kernel.org
> CC: linux-doc@vger.kernel.org
> CC: linux-i2c@vger.kernel.org
> Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
> ---
>  .../devicetree/bindings/i2c/i2c-s3c2410.txt        |    1 +
>  arch/arm/boot/dts/exynos5250.dtsi                  |    4 +++
>  arch/arm/boot/dts/exynos5420.dtsi                  |    4 +++

I usually don't take DTS patches. They should go via arm-soc. Please say
so if there are reasons I should take them.

> @@ -1084,6 +1092,23 @@ s3c24xx_i2c_parse_dt(struct device_node *np, struct s3c24xx_i2c *i2c)
>  	of_property_read_u32(np, "samsung,i2c-slave-addr", &pdata->slave_addr);
>  	of_property_read_u32(np, "samsung,i2c-max-bus-freq",
>  				(u32 *)&pdata->frequency);
> +	/*
> +	 * Exynos5's legacy i2c controller and new high speed i2c
> +	 * controller have muxed interrupt sources. By default the
> +	 * interrupts for 4-channel HS-I2C controller are enabled.
> +	 * If node for first four channels of legacy i2c controller

s/node/nodes/

> +	 * are available then re-configure the interrupts via the
> +	 * system register.
> +	 */
> +	id = of_alias_get_id(np, "i2c");
> +	i2c->sysreg = syscon_regmap_lookup_by_phandle(np,
> +			"samsung,sysreg-phandle");
> +	if (IS_ERR(i2c->sysreg)) {
> +		/* As this is not compulsory do not return error */
> +		pr_info("i2c-%d skipping re-configuration of interrutps\n", id);

I'd say drop this message. If you want to keep it, it should be dev_dbg.

> +		return;
> +	}
> +	regmap_update_bits(i2c->sysreg, EXYNOS5_SYS_I2C_CFG, BIT(id), 0);
>  }

Rest looks good, thanks!

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

WARNING: multiple messages have this Message-ID (diff)
From: wsa@the-dreams.de (Wolfram Sang)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 1/2] i2c: s3c2410: Handle i2c sys_cfg register in i2c driver
Date: Fri, 21 Nov 2014 08:25:45 +0100	[thread overview]
Message-ID: <20141121072545.GG1480@katana> (raw)
In-Reply-To: <1414656270-8048-2-git-send-email-pankaj.dubey@samsung.com>

On Thu, Oct 30, 2014 at 01:34:29PM +0530, Pankaj Dubey wrote:
> Let's handle i2c interrupt re-configuration in i2c driver. This will
> help us in removing some soc specific checks from machine files and
> will help in removing static iomapping of SYS register in exynos.c
> 
> Since only Exynos5250, and Exynos5420 has i2c nodes in DT, added syscon
> based phandle to i2c device nodes of respective SoC DT files.
> 
> Also handle saving and restoring of SYS_I2C_CFG register during
> suspend and resume of i2c driver.
> 
> CC: Rob Herring <robh+dt@kernel.org>
> CC: Randy Dunlap <rdunlap@infradead.org>
> CC: Wolfram Sang <wsa@the-dreams.de>
> CC: Russell King <linux@arm.linux.org.uk>
> CC: devicetree at vger.kernel.org
> CC: linux-doc at vger.kernel.org
> CC: linux-i2c at vger.kernel.org
> Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
> ---
>  .../devicetree/bindings/i2c/i2c-s3c2410.txt        |    1 +
>  arch/arm/boot/dts/exynos5250.dtsi                  |    4 +++
>  arch/arm/boot/dts/exynos5420.dtsi                  |    4 +++

I usually don't take DTS patches. They should go via arm-soc. Please say
so if there are reasons I should take them.

> @@ -1084,6 +1092,23 @@ s3c24xx_i2c_parse_dt(struct device_node *np, struct s3c24xx_i2c *i2c)
>  	of_property_read_u32(np, "samsung,i2c-slave-addr", &pdata->slave_addr);
>  	of_property_read_u32(np, "samsung,i2c-max-bus-freq",
>  				(u32 *)&pdata->frequency);
> +	/*
> +	 * Exynos5's legacy i2c controller and new high speed i2c
> +	 * controller have muxed interrupt sources. By default the
> +	 * interrupts for 4-channel HS-I2C controller are enabled.
> +	 * If node for first four channels of legacy i2c controller

s/node/nodes/

> +	 * are available then re-configure the interrupts via the
> +	 * system register.
> +	 */
> +	id = of_alias_get_id(np, "i2c");
> +	i2c->sysreg = syscon_regmap_lookup_by_phandle(np,
> +			"samsung,sysreg-phandle");
> +	if (IS_ERR(i2c->sysreg)) {
> +		/* As this is not compulsory do not return error */
> +		pr_info("i2c-%d skipping re-configuration of interrutps\n", id);

I'd say drop this message. If you want to keep it, it should be dev_dbg.

> +		return;
> +	}
> +	regmap_update_bits(i2c->sysreg, EXYNOS5_SYS_I2C_CFG, BIT(id), 0);
>  }

Rest looks good, thanks!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20141121/a9b5fa9e/attachment.sig>

  reply	other threads:[~2014-11-21  7:25 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-30  8:04 [PATCH v4 0/2] Move i2c sys_cfg register configuration to i2c driver Pankaj Dubey
2014-10-30  8:04 ` Pankaj Dubey
2014-10-30  8:04 ` [PATCH v4 1/2] i2c: s3c2410: Handle i2c sys_cfg register in " Pankaj Dubey
2014-10-30  8:04   ` Pankaj Dubey
2014-11-21  7:25   ` Wolfram Sang [this message]
2014-11-21  7:25     ` Wolfram Sang
2014-11-21 10:17     ` Pankaj Dubey
2014-11-21 10:17       ` Pankaj Dubey
2014-11-21 16:47       ` Wolfram Sang
2014-11-21 16:47         ` Wolfram Sang
2014-11-22  0:48         ` Kukjin Kim
2014-11-22  0:48           ` Kukjin Kim
2014-11-24  9:01           ` Pankaj Dubey
2014-11-24  9:01             ` Pankaj Dubey
2014-11-22  0:42       ` Kukjin Kim
2014-11-22  0:42         ` Kukjin Kim
2014-10-30  8:04 ` [PATCH v4 2/2] ARM: EXYNOS: Remove i2c sys configuration related code Pankaj Dubey
2014-10-30  8:04   ` Pankaj Dubey

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=20141121072545.GG1480@katana \
    --to=wsa@the-dreams.de \
    --cc=devicetree@vger.kernel.org \
    --cc=kgene.kim@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=pankaj.dubey@samsung.com \
    --cc=rdunlap@infradead.org \
    --cc=robh+dt@kernel.org \
    --cc=thomas.ab@samsung.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 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.