Linux on ARM based TI OMAP SoCs
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>
To: Shubhrajyoti D <shubhrajyoti-l0cyMroinI0@public.gmane.org>
Cc: linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org,
	tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org,
	b-cousson-l0cyMroinI0@public.gmane.org,
	balbi-l0cyMroinI0@public.gmane.org,
	w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org
Subject: Re: [PATCHv3 3/8] i2c: omap: remove the dtrev
Date: Mon, 5 Nov 2012 16:11:54 +0200	[thread overview]
Message-ID: <20121105141154.GC4815@arwen.pp.htv.fi> (raw)
In-Reply-To: <1352118223-3796-4-git-send-email-shubhrajyoti-l0cyMroinI0@public.gmane.org>

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

On Mon, Nov 05, 2012 at 05:53:38PM +0530, Shubhrajyoti D wrote:
> The dtrev is used only for the comments. Remove the same and use
> the scheme instead to know if it is version2.
> 
> Signed-off-by: Shubhrajyoti D <shubhrajyoti-l0cyMroinI0@public.gmane.org>

Reviewed-by: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>

> ---
> v3: remove the scheme from the commments.
> todo: remove the dtrev from hwmod etc.
> 
>  drivers/i2c/busses/i2c-omap.c |   12 +++++-------
>  1 files changed, 5 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
> index 737d843..5f0c06c 100644
> --- a/drivers/i2c/busses/i2c-omap.c
> +++ b/drivers/i2c/busses/i2c-omap.c
> @@ -191,7 +191,6 @@ struct omap_i2c_dev {
>  	u32			latency;	/* maximum MPU wkup latency */
>  	struct pm_qos_request	pm_qos_request;
>  	u32			speed;		/* Speed of bus in kHz */
> -	u32			dtrev;		/* extra revision from DT */
>  	u32			flags;
>  	u16			cmd_err;
>  	u8			*buf;
> @@ -1076,7 +1075,7 @@ omap_i2c_probe(struct platform_device *pdev)
>  	int irq;
>  	int r;
>  	u32 rev;
> -	u16 minor, major;
> +	u16 minor, major, scheme;
>  
>  	/* NOTE: driver uses the static register mapping */
>  	mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> @@ -1108,7 +1107,6 @@ omap_i2c_probe(struct platform_device *pdev)
>  		u32 freq = 100000; /* default to 100000 Hz */
>  
>  		pdata = match->data;
> -		dev->dtrev = pdata->rev;
>  		dev->flags = pdata->flags;
>  
>  		of_property_read_u32(node, "clock-frequency", &freq);
> @@ -1117,7 +1115,6 @@ omap_i2c_probe(struct platform_device *pdev)
>  	} else if (pdata != NULL) {
>  		dev->speed = pdata->clkrate;
>  		dev->flags = pdata->flags;
> -		dev->dtrev = pdata->rev;
>  	}
>  
>  	dev->dev = &pdev->dev;
> @@ -1146,7 +1143,8 @@ omap_i2c_probe(struct platform_device *pdev)
>  	 */
>  	rev = __raw_readw(dev->base + 0x04);
>  
> -	switch (OMAP_I2C_SCHEME(rev)) {
> +	scheme = OMAP_I2C_SCHEME(rev);
> +	switch (scheme) {
>  	case OMAP_I2C_SCHEME_0:
>  		dev->regs = (u8 *)reg_map_ip_v1;
>  		dev->rev = omap_i2c_read_reg(dev, OMAP_I2C_REV_REG);
> @@ -1230,8 +1228,8 @@ omap_i2c_probe(struct platform_device *pdev)
>  		goto err_unuse_clocks;
>  	}
>  
> -	dev_info(dev->dev, "bus %d rev%d.%d.%d at %d kHz\n", adap->nr,
> -		 dev->dtrev, major, minor, dev->speed);
> +	dev_info(dev->dev, "bus %d rev%d.%d at %d kHz\n", adap->nr,
> +		 major, minor, dev->speed);
>  
>  	of_i2c_register_devices(adap);
>  
> -- 
> 1.7.5.4
> 

-- 
balbi

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

  parent reply	other threads:[~2012-11-05 14:11 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-05 12:23 [PATCHv3 0/7] i2c: omap: updates Shubhrajyoti D
2012-11-05 12:23 ` [PATCHv3 2/8] i2c: omap: use revision check for OMAP_I2C_FLAG_APPLY_ERRATA_I207 Shubhrajyoti D
2012-11-05 12:23 ` [PATCHv3 4/8] ARM: i2c: omap: Remove the i207 errata flag Shubhrajyoti D
2012-11-05 12:23 ` [PATCHv3 6/8] i2c: omap: make reset a seperate function Shubhrajyoti D
     [not found] ` <1352118223-3796-1-git-send-email-shubhrajyoti-l0cyMroinI0@public.gmane.org>
2012-11-05 12:23   ` [PATCHv3 1/8] i2c: omap: Fix the revision register read Shubhrajyoti D
2012-11-05 14:11     ` Felipe Balbi
2012-11-05 12:23   ` [PATCHv3 3/8] i2c: omap: remove the dtrev Shubhrajyoti D
     [not found]     ` <1352118223-3796-4-git-send-email-shubhrajyoti-l0cyMroinI0@public.gmane.org>
2012-11-05 14:11       ` Felipe Balbi [this message]
2012-11-05 12:23   ` [PATCHv3 5/8] i2c: omap: re-factor omap_i2c_init function Shubhrajyoti D
2012-11-05 12:23   ` [PATCHv3 7/8] i2c: omap: Restore i2c context always Shubhrajyoti D
2012-11-05 12:23   ` [PATCHv3 8/8] i2c: omap: cleanup the sysc write Shubhrajyoti D
     [not found]     ` <1352118223-3796-9-git-send-email-shubhrajyoti-l0cyMroinI0@public.gmane.org>
2012-11-05 14:14       ` Felipe Balbi
2012-11-05 14:23         ` Shubhrajyoti
     [not found]           ` <5097CBF1.6060108-l0cyMroinI0@public.gmane.org>
2012-11-05 14:25             ` Felipe Balbi
2012-11-05 17:24               ` Cousson, Benoit
     [not found]                 ` <5097F642.9010803-l0cyMroinI0@public.gmane.org>
2012-11-05 18:29                   ` Shubhrajyoti Datta
2012-11-13 12:50   ` [PATCHv3 0/7] i2c: omap: updates Shubhrajyoti Datta
2012-11-14 12:04   ` Wolfram Sang
2012-11-14 13:09     ` Shubhrajyoti

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=20121105141154.GC4815@arwen.pp.htv.fi \
    --to=balbi-l0cymroini0@public.gmane.org \
    --cc=b-cousson-l0cyMroinI0@public.gmane.org \
    --cc=ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=shubhrajyoti-l0cyMroinI0@public.gmane.org \
    --cc=tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org \
    --cc=w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.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