All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Jassi Brar <jassi.brar@samsung.com>
Cc: alsa-devel@alsa-project.org, ben-linux@fluff.org
Subject: Re: [PATCH 5/7] S3C AUDIO: Add header to pass	platform data to device drivers.
Date: Fri, 6 Nov 2009 16:52:14 +0000	[thread overview]
Message-ID: <20091106165214.GF4938@sirena.org.uk> (raw)
In-Reply-To: <1257384900-18308-1-git-send-email-jassi.brar@samsung.com>

On Thu, Nov 05, 2009 at 10:35:00AM +0900, Jassi Brar wrote:

> +/**
> + * struct s3c_audio_pdata - common platform data for audio device drivers
> + * @pdata: Pointer to protocol(I2S, PCM or AC97) specific platform data
> + * @cfg_gpio: Callback function to setup mux'ed pins in I2S/PCM/AC97 mode
> + */
> +struct s3c_audio_pdata {
> +	void *pdata;
> +
> +	int (*cfg_gpio)(struct platform_device *);
> +};

I don't see much benefit in this structure with the pdata embedded in it
- you just end up with an additional layer of indirection in your
platform data if you need to add device specific stuff which is annoying
to specify in machine drivers.

I'd just embed the GPIO configuration callback in a driver-specific
platform data.

  reply	other threads:[~2009-11-06 16:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-05  1:35 [PATCH 5/7] S3C AUDIO: Add header to pass platform data to device drivers Jassi Brar
2009-11-06 16:52 ` Mark Brown [this message]
2009-11-07  3:31   ` jassi brar
2009-11-07 12:12     ` Mark Brown
  -- strict thread matches above, loose matches on Subject: below --
2009-11-11  4:45 Jassi Brar
2009-11-16 10:49 ` Ben Dooks
2009-11-16 11:46   ` jassi brar
2009-11-04  8:29 [PATCH 1/7] S3C AUDIO: Rename s3c24xx_pcm prefix to generic s3c_audio jassisinghbrar
2009-11-04  8:29 ` [PATCH 2/7] S3C AUDIO: Rename s3c24xx-pcm driver " jassisinghbrar
2009-11-04  8:29   ` [PATCH 3/7] S3C64XX PCM: Define PCM Controller base registers jassisinghbrar
2009-11-04  8:29     ` [PATCH 4/7] S3C64XX PCM: Added PCLK clock source for the PCM controllers jassisinghbrar
2009-11-04  8:29       ` [PATCH 5/7] S3C AUDIO: Add header to pass platform data to device drivers jassisinghbrar

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=20091106165214.GF4938@sirena.org.uk \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=ben-linux@fluff.org \
    --cc=jassi.brar@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.