From: Nguyen Viet Dung <nv-dung-HEF513clHfp3+QwDJ9on6Q@public.gmane.org>
To: Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
kuninori.morimoto.gx-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org
Subject: Re: [PATCH v3 1/1 resend] i2c: rcar: modify I2C driver
Date: Thu, 29 Aug 2013 18:46:17 +0900 [thread overview]
Message-ID: <521F1869.1090408@jinso.co.jp> (raw)
In-Reply-To: <20130828090246.GC4086@katana>
Hi Wolfram,
Thank your for the guide.
I have understood your guide.
And I have released version 4 of I2C patch.
Please check it for me.
Thanks,
Nguyen Viet Dung
On 08/28/2013 06:02 PM, Wolfram Sang wrote:
> On Tue, Aug 27, 2013 at 04:55:22PM +0900, Nguyen Viet Dung wrote:
>> This patch modify I2C driver of rcar-H1 to usable on both rcar-H1 and rcar-H2.
>>
>> Signed-off-by: Nguyen Viet Dung <nv-dung-HEF513clHfp3+QwDJ9on6Q@public.gmane.org>
> Yes, this is much better. Only minor things...
>
>> + switch (priv->devtype) {
>> + default:
>> + case I2C_RCAR_H1:
>> + cdf_width = 2;
>> + break;
>> + case I2C_RCAR_H2:
>> + cdf_width = 3;
>> + break;
>> + }
>> +
> Please put the default case block at the end.
>
>> @@ -632,6 +649,13 @@ static int rcar_i2c_probe(struct platform_device *pdev)
>> bus_speed = 100000; /* default 100 kHz */
>> if (pdata && pdata->bus_speed)
>> bus_speed = pdata->bus_speed;
>> +
>> + if (!pdev->id_entry) {
>> + dev_err(&pdev->dev, "no entry\n");
>> + return -ENODEV;
>> + }
> This cannot happen. Since you have 'i2c-rcar' in the id_table, the
> driver core will always match against the id_table and there is always a
> driver_data defined.
>
>
>> + priv->devtype = pdev->id_entry->driver_data;
> Basically the same, but please use
>
> platform_get_device_id(pdev)->driver_data;
>
> Otherwise good!
>
> Thanks,
>
> Wolfram
WARNING: multiple messages have this Message-ID (diff)
From: Nguyen Viet Dung <nv-dung@jinso.co.jp>
To: Wolfram Sang <wsa@the-dreams.de>
Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,
kuninori.morimoto.gx@renesas.com
Subject: Re: [PATCH v3 1/1 resend] i2c: rcar: modify I2C driver
Date: Thu, 29 Aug 2013 18:46:17 +0900 [thread overview]
Message-ID: <521F1869.1090408@jinso.co.jp> (raw)
In-Reply-To: <20130828090246.GC4086@katana>
Hi Wolfram,
Thank your for the guide.
I have understood your guide.
And I have released version 4 of I2C patch.
Please check it for me.
Thanks,
Nguyen Viet Dung
On 08/28/2013 06:02 PM, Wolfram Sang wrote:
> On Tue, Aug 27, 2013 at 04:55:22PM +0900, Nguyen Viet Dung wrote:
>> This patch modify I2C driver of rcar-H1 to usable on both rcar-H1 and rcar-H2.
>>
>> Signed-off-by: Nguyen Viet Dung <nv-dung@jinso.co.jp>
> Yes, this is much better. Only minor things...
>
>> + switch (priv->devtype) {
>> + default:
>> + case I2C_RCAR_H1:
>> + cdf_width = 2;
>> + break;
>> + case I2C_RCAR_H2:
>> + cdf_width = 3;
>> + break;
>> + }
>> +
> Please put the default case block at the end.
>
>> @@ -632,6 +649,13 @@ static int rcar_i2c_probe(struct platform_device *pdev)
>> bus_speed = 100000; /* default 100 kHz */
>> if (pdata && pdata->bus_speed)
>> bus_speed = pdata->bus_speed;
>> +
>> + if (!pdev->id_entry) {
>> + dev_err(&pdev->dev, "no entry\n");
>> + return -ENODEV;
>> + }
> This cannot happen. Since you have 'i2c-rcar' in the id_table, the
> driver core will always match against the id_table and there is always a
> driver_data defined.
>
>
>> + priv->devtype = pdev->id_entry->driver_data;
> Basically the same, but please use
>
> platform_get_device_id(pdev)->driver_data;
>
> Otherwise good!
>
> Thanks,
>
> Wolfram
next prev parent reply other threads:[~2013-08-29 9:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-27 7:55 [PATCH v3 0/1 resend] ARM: shmobile: r8a7790: add I2C support Nguyen Viet Dung
2013-08-27 7:55 ` Nguyen Viet Dung
2013-08-27 7:55 ` [PATCH v3 1/1 resend] i2c: rcar: modify I2C driver Nguyen Viet Dung
2013-08-28 9:02 ` Wolfram Sang
2013-08-29 9:46 ` Nguyen Viet Dung [this message]
2013-08-29 9:46 ` Nguyen Viet Dung
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=521F1869.1090408@jinso.co.jp \
--to=nv-dung-hef513clhfp3+qwdj9on6q@public.gmane.org \
--cc=kuninori.morimoto.gx-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=wsa-z923LK4zBo2bacvFa/9K2g@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 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.