From: Takashi Iwai <tiwai@suse.de>
To: pavel.hofman@ivitera.com
Cc: alsa-devel@alsa-project.org
Subject: Re: [PATCH 4/6] Adding GPIO routines for mask and direction
Date: Tue, 15 Sep 2009 13:19:24 +0200 [thread overview]
Message-ID: <s5hocpcbglf.wl%tiwai@suse.de> (raw)
In-Reply-To: <1252968303-29334-4-git-send-email-pavel.hofman@ivitera.com>
At Tue, 15 Sep 2009 00:45:01 +0200,
pavel.hofman@ivitera.com wrote:
>
> diff --git a/pci/ice1712/ice1712.h b/pci/ice1712/ice1712.h
> index 9da2dae..2105055 100644
> --- a/pci/ice1712/ice1712.h
> +++ b/pci/ice1712/ice1712.h
> @@ -28,6 +28,7 @@
> #include <sound/i2c.h>
> #include <sound/ak4xxx-adda.h>
> #include <sound/ak4114.h>
> +#include <sound/ak4113.h>
Here you don't need to include this header, at this stage.
> @@ -359,7 +360,9 @@ struct snd_ice1712 {
> unsigned int saved[2]; /* for ewx_i2c */
> /* operators */
> void (*set_mask)(struct snd_ice1712 *ice, unsigned int data);
> + unsigned int (*get_mask)(struct snd_ice1712 *ice);
> void (*set_dir)(struct snd_ice1712 *ice, unsigned int data);
> + unsigned int (*get_dir)(struct snd_ice1712 *ice);
> void (*set_data)(struct snd_ice1712 *ice, unsigned int data);
> unsigned int (*get_data)(struct snd_ice1712 *ice);
> /* misc operators - move to another place? */
> @@ -399,6 +402,11 @@ static inline void snd_ice1712_gpio_set_dir(struct snd_ice1712 *ice, unsigned in
> ice->gpio.set_dir(ice, bits);
> }
>
> +static inline unsigned int snd_ice1712_gpio_get_dir(struct snd_ice1712 *ice)
> +{
> + return ice->gpio.get_dir(ice);
> +}
> +
> static inline void snd_ice1712_gpio_set_mask(struct snd_ice1712 *ice, unsigned int bits)
> {
> ice->gpio.set_mask(ice, bits);
No get_mask() accessor defined?
> diff --git a/pci/ice1712/ice1724.c b/pci/ice1712/ice1724.c
> index af6e001..673edd5 100644
> --- a/pci/ice1712/ice1724.c
> +++ b/pci/ice1712/ice1724.c
> @@ -196,6 +196,12 @@ static void snd_vt1724_set_gpio_dir(struct snd_ice1712 *ice, unsigned int data)
> inw(ICEREG1724(ice, GPIO_DIRECTION)); /* dummy read for pci-posting */
> }
>
> +/* get gpio direction 0 = read, 1 = write */
> +static unsigned int snd_vt1724_get_gpio_dir(struct snd_ice1712 *ice)
> +{
> + return inl(ICEREG1724(ice, GPIO_DIRECTION));
> +}
> +
> /* set the gpio mask (0 = writable) */
> static void snd_vt1724_set_gpio_mask(struct snd_ice1712 *ice, unsigned int data)
> {
> @@ -2435,6 +2441,7 @@ static int __devinit snd_vt1724_create(struct snd_card *card,
> mutex_init(&ice->i2c_mutex);
> ice->gpio.set_mask = snd_vt1724_set_gpio_mask;
> ice->gpio.set_dir = snd_vt1724_set_gpio_dir;
> + ice->gpio.get_dir = snd_vt1724_get_gpio_dir;
> ice->gpio.set_data = snd_vt1724_set_gpio_data;
> ice->gpio.get_data = snd_vt1724_get_gpio_data;
> ice->card = card;
Include get_mask definitions rather in this patch.
No reason to split and put into another changes.
thanks,
Takashi
next prev parent reply other threads:[~2009-09-15 11:19 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-14 22:44 [PATCH 1/6] AK4114 - fix output selector bits, fix spelling pavel.hofman
2009-09-14 22:44 ` [PATCH 2/6] ak4620 support, moving the proc codec regs entry to ak4xxx-adda, pavel.hofman
2009-09-14 22:45 ` [PATCH 3/6] ak4113 support pavel.hofman
2009-09-14 22:45 ` [PATCH 4/6] Adding GPIO routines for mask and direction pavel.hofman
2009-09-14 22:45 ` [PATCH 5/6] adding support for multiple external clock types pavel.hofman
2009-09-14 22:45 ` [PATCH 6/6] Infrasonic Quartet support pavel.hofman
2009-09-15 11:36 ` Takashi Iwai
2009-09-15 11:24 ` [PATCH 5/6] adding support for multiple external clock types Takashi Iwai
2009-09-15 13:09 ` Pavel Hofman
2009-09-15 13:29 ` Takashi Iwai
2009-09-15 11:19 ` Takashi Iwai [this message]
2009-09-15 11:55 ` [PATCH 4/6] Adding GPIO routines for mask and direction Pavel Hofman
2009-09-15 11:15 ` [PATCH 3/6] ak4113 support Takashi Iwai
2009-09-15 11:54 ` Pavel Hofman
2009-09-15 11:12 ` [PATCH 2/6] ak4620 support, moving the proc codec regs entry to ak4xxx-adda, Takashi Iwai
2009-09-15 11:07 ` [PATCH 1/6] AK4114 - fix output selector bits, fix spelling Takashi Iwai
2009-09-15 11:51 ` Pavel Hofman
2009-09-15 12:31 ` Takashi Iwai
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=s5hocpcbglf.wl%tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=pavel.hofman@ivitera.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox