linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wolfram Sang <w.sang@pengutronix.de>
To: Karol Lewandowski <k.lewandowsk@samsung.com>
Cc: ben-linux@fluff.org, m.szyprowski@samsung.com,
	thomas.abraham@linaro.org, linux-kernel@vger.kernel.org,
	linux-i2c@vger.kernel.org, devicetree-discuss@lists.ozlabs.org,
	linux-samsung-soc@vger.kernel.org, t.stanislaws@samsung.com,
	kyungmin.park@samsung.com, broonie@opensource.wolfsonmicro.com,
	Grant Likely <grant.likely@secretlab.ca>,
	Rob Herring <robherring2@gmail.com>
Subject: Re: [PATCH 2/3] i2c-s3c2410: Rework device type handling
Date: Wed, 18 Apr 2012 15:39:45 +0200	[thread overview]
Message-ID: <20120418133945.GA19220@pengutronix.de> (raw)
In-Reply-To: <4F8EAB94.7080707@samsung.com>

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

Hi,

> >> Reorganize driver a bit to better handle device tree-based systems:
> >>
> >>  - move machine type to driver's private structure instead of
> >>    quering platform device variants in runtime
> >>
> >>  - replace s3c24xx_i2c_type enum with unsigned int that holds
> >>    bitmask with revision-specific quirks
> >>
> >> Signed-off-by: Karol Lewandowski <k.lewandowsk@samsung.com>
> >> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> > 
> > Okay, so this driver needs to the 'data' field from either
> > platform_device_id or of_device_id and implements a function for that,
> > namely s3c24xx_get_device_quirks(). Grant, Rob: I'd think there might be
> > more drivers in need of that, so maybe it makes sense to have a generic
> > of-helper function?

Please wait one or two days before resending. Maybe Grant or Rob find
some time to answer this question. (Yeah, we can fix it later if such a
generic function is introduced somewhen).

> >> -/* i2c controller state */
> >> +#ifdef CONFIG_OF
> >> +static const struct of_device_id s3c24xx_i2c_match[];
> >> +#endif
> > 
> > Uh, forward declaration with #ifdef. I'd think we should get this simply
> > to the front.
> 
> 
> Ok, as I think it's better to have dt and non-dt definitions together
> I'll move both of_device_id and platform_device_id to the top.

Agreed.

> 
> >> +/* Treat S3C2410 as baseline hardware, anything else is supported via quirks */
> >> +#define QUIRK_S3C2440		(1 << 0)
> > 
> > Minor: Is it really a quirk being s3c2440? Maybe FLAG_*, dunno.
> 
> 
> In first version[1] of this patch I've used TYPEs for device types
> and FLAGS for quirks. However, I've squashed these into "quirks" after
> discussion with Mark[2].
> 
> [1] http://permalink.gmane.org/gmane.linux.kernel/1266759
> [2] http://permalink.gmane.org/gmane.linux.kernel.samsung-soc/10255

It's minor, keep the QUIRKs.

> [ I'll also drop above CONFIG_OF ifdef, as of_match_node() seem
>   to be always defined since v3.2-rc1. ]

Great.

Thanks,

   Wolfram

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

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

  reply	other threads:[~2012-04-18 13:40 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-21 19:11 [PATCH v3 0/3] i2c-s3c2410: Updates for exynos4210 and DT-based systems Karol Lewandowski
2012-03-21 19:11 ` [PATCH 1/3] i2c-s3c2410: Drop unused define Karol Lewandowski
2012-04-18 10:56   ` Wolfram Sang
2012-03-21 19:11 ` [PATCH 2/3] i2c-s3c2410: Rework device type handling Karol Lewandowski
2012-03-21 20:30   ` Mark Brown
2012-04-17 17:31   ` Wolfram Sang
2012-04-18 11:55     ` Karol Lewandowski
2012-04-18 13:39       ` Wolfram Sang [this message]
2012-03-21 19:11 ` [PATCH 3/3] i2c-s3c2410: Add HDMIPHY quirk for S3C2440 Karol Lewandowski
2012-04-17 17:40   ` Wolfram Sang
2012-04-18 12:11     ` Marek Szyprowski
2012-04-18 13:46       ` Wolfram Sang
2012-04-18 16:31         ` Karol Lewandowski
2012-04-23 10:01           ` Wolfram Sang
2012-04-23 16:22             ` Karol Lewandowski
2012-04-13  9:30 ` [PATCH v3 0/3] i2c-s3c2410: Updates for exynos4210 and DT-based systems Karol Lewandowski
  -- strict thread matches above, loose matches on Subject: below --
2012-03-13 16:54 [PATCH 0/3 v2] " Karol Lewandowski
2012-03-13 16:54 ` [PATCH 2/3] i2c-s3c2410: Rework device type handling Karol Lewandowski
2012-03-14 17:29   ` Mark Brown
2012-03-15 10:04     ` Karol Lewandowski
2012-03-15 12:56       ` Mark Brown
2012-03-15 16:54         ` Karol Lewandowski
2012-03-19 19:55           ` Mark Brown
2012-03-21 10:33             ` Karol Lewandowski
2012-03-21 11:50               ` Mark Brown
2012-03-21 11:54                 ` Karol Lewandowski

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=20120418133945.GA19220@pengutronix.de \
    --to=w.sang@pengutronix.de \
    --cc=ben-linux@fluff.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=grant.likely@secretlab.ca \
    --cc=k.lewandowsk@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=robherring2@gmail.com \
    --cc=t.stanislaws@samsung.com \
    --cc=thomas.abraham@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;
as well as URLs for NNTP newsgroup(s).